### CI Link

https://gradle-enterprise.elastic.co/s/jze725jpxi7ki/console-log?task=:x-pack:plugin:security:internalClusterTest

### Repro line

./gradlew ':x-pack:plugin:security:internalClusterTest' --tests "org.elasticsearch.xpack.security.authc.pki.PkiAuthDelegationIntegTests.testDelegateThenAuthenticate" -Dtests.seed=F5EC1FEFFC2FC08B -Dtests.locale=en-GB -Dtests.timezone=SystemV/PST8PDT -Druntime.java=20

### Does it reproduce?

Yes

### Applicable branches

main

### Failure history

_No response_

### Failure excerpt

The pki integ test began failing today. Looking at the certs the test uses, they are all expired:

```
❯ openssl x509 -enddate -noout -in testClient.crt
notAfter=Jul 18 13:33:41 2023 GMT
❯ openssl x509 -enddate -noout -in testIntermediateCA.crt
notAfter=Jul 18 13:32:34 2023 GMT
❯ openssl x509 -enddate -noout -in testRootCA.crt
notAfter=Jul 18 13:32:20 2023 GMT
```
x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/xpack/security/authc/pki/PkiAuthDelegationIntegTests.java
assertThat(realm, hasEntry(Fields.REALM_TYPE.getPreferredName(), "pki"));
        assertThat(authenticateResponse, hasEntry(Fields.AUTHENTICATION_TYPE.getPreferredName(), "token"));
        
        optionsBuilder = RequestOptions.DEFAULT.toBuilder();
        optionsBuilder.addHeader(
            "Authorization",
            basicAuthHeaderValue(delegateeUsername, SecuritySettingsSourceField.TEST_PASSWORD_SECURE_STRING)
        );
        var invalidateResponse = getSecurityClient(optionsBuilder.build()).invalidateAccessToken(token);
        assertThat(invalidateResponse.invalidated(), is(1));
        assertThat(invalidateResponse.errors(), hasSize(0));
        
        ResponseException ex = expectThrows(
            ResponseException.class,
            () -> new TestSecurityClient(
                getRestClient(),
                RequestOptions.DEFAULT.toBuilder().addHeader("Authorization", "Bearer " + token).build()
            ).authenticate()
        );
        assertThat(ex.getResponse().getStatusLine().getStatusCode(), is(RestStatus.UNAUTHORIZED.getStatus()));
        final Map<String, Object> response = ESRestTestCase.entityAsMap(ex.getResponse());
        assertThat(ObjectPath.eval("error.type", response), is("security_exception"));
        assertThat(ObjectPath.eval("error.reason", response), is("token expired"));
    }
    public void testDelegateUnauthorized() throws Exception {
        final X509Certificate clientCertificate = readCertForPkiDelegation("testClient.crt");
        final X509Certificate intermediateCA = readCertForPkiDelegation("testIntermediateCA.crt");
        final X509Certificate rootCA = readCertForPkiDelegation("testRootCA.crt");
        final List<X509Certificate> certificateChain;