Skip to content

Commit 642e45e

Browse files
committed
Fix setting openldap realm ssl config
This change fixes the setup of the SSL configuration for the test openldap realm. The configuration was missing the realm identifier so the SSL settings being used were just the default JDK ones that do not trust the certificate of the idp fixture. See #37591
1 parent fc1c476 commit 642e45e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

x-pack/qa/openldap-tests/src/test/java/org/elasticsearch/xpack/security/authc/ldap/OpenLdapUserSearchSessionFactoryTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public class OpenLdapUserSearchSessionFactoryTests extends ESTestCase {
5151
private static final String LDAPCACERT_PATH = "/ca.crt";
5252

5353
@Before
54-
public void init() throws Exception {
54+
public void init() {
5555
Path caPath = getDataPath(LDAPCACERT_PATH);
5656
/*
5757
* Prior to each test we reinitialize the socket factory with a new SSLService so that we get a new SSLContext.
@@ -60,7 +60,7 @@ public void init() throws Exception {
6060
*/
6161
globalSettings = Settings.builder()
6262
.put("path.home", createTempDir())
63-
.put("xpack.security.authc.realms.ldap.ssl.certificate_authorities", caPath)
63+
.put("xpack.security.authc.realms.ldap.oldap-test.ssl.certificate_authorities", caPath)
6464
.build();
6565
threadPool = new TestThreadPool("LdapUserSearchSessionFactoryTests");
6666
}

0 commit comments

Comments
 (0)