You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
07:02:56 ERROR 0.06s J5 | LdapSessionFactoryTests.testBindWithTemplates <<< FAILURES!
07:02:56 > Throwable #1: LDAPException(resultCode=82 (local error), errorMessage='An error occurred while attempting to create an SSL client socket factory: KeyManagementException(FIPS mode: only SunJSSE TrustManagers may be used), ldapSDKVersion=4.0.8, revision=28812')
07:02:56 > at com.unboundid.ldap.listener.InMemoryListenerConfig.createLDAPSConfig(InMemoryListenerConfig.java:346)
07:02:56 > at com.unboundid.ldap.listener.InMemoryListenerConfig.createLDAPSConfig(InMemoryListenerConfig.java:258)
07:02:56 > at org.elasticsearch.xpack.security.authc.ldap.support.LdapTestCase.startLdap(LdapTestCase.java:90)
07:02:56 > at java.lang.Thread.run(Thread.java:748)
07:02:56 > Caused by: java.security.KeyManagementException: FIPS mode: only SunJSSE TrustManagers may be used
07:02:56 > at sun.security.ssl.SSLContextImpl.chooseTrustManager(SSLContextImpl.java:120)
07:02:56 > at sun.security.ssl.SSLContextImpl.engineInit(SSLContextImpl.java:83)
07:02:56 > at javax.net.ssl.SSLContext.init(SSLContext.java:282)
07:02:56 > at com.unboundid.util.ssl.SSLUtil.createSSLContext(SSLUtil.java:394)
07:02:56 > at com.unboundid.util.ssl.SSLUtil.createSSLContext(SSLUtil.java:367)
07:02:56 > at com.unboundid.util.ssl.SSLUtil.createSSLSocketFactory(SSLUtil.java:443)
07:02:56 > at com.unboundid.ldap.listener.InMemoryListenerConfig.createLDAPSConfig(InMemoryListenerConfig.java:341)
07:02:56 > ... 38 moreThrowable #2: java.lang.NullPointerException
07:02:56 > at org.elasticsearch.xpack.security.authc.ldap.support.LdapTestCase.stopLdap(LdapTestCase.java:114)
07:02:56 > at java.lang.Thread.run(Thread.java:748)
The text was updated successfully, but these errors were encountered:
Note: It looks like it only fails in FIPS 140 enabled JVMs.
Probably related to #36937. It's already late for Tim, I'll take a look shortly and address this or at least mute the offending tests
Update:
The issue is with com.unboundid.ldap.listener.InMemoryListenerConfig.createLDAPSConfig as we do not pass a clientSocketFactorySSLSocketFactory ( but only a serverSocketFactorySSLSocketFactory) so it results to attempting to create an com.unboundid.util.ssl.TrustAllTrustManager which is not allowed in a FIPS 140 JVM.
If we don't explicitly sett the client SSLSocketFactory when
creating an InMemoryDirectoryServer and setting its SSL config, it
will result in using a TrustAllTrustManager(that extends
X509TrustManager) which is not allowed in a FIPS 140 JVM.
Instead, we get the SSLSocketFactory from the existing SSLContext
and pass that to be used.
Resolves#37013
https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+master+matrix-java-periodic/ES_BUILD_JAVA=java11,ES_RUNTIME_JAVA=java8fips,nodes=virtual&&linux/145/
The text was updated successfully, but these errors were encountered: