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
This commit is contained in:
jaymode 2019-01-18 12:24:11 -07:00
parent fc1c47649a
commit 642e45e9e6
No known key found for this signature in database
GPG Key ID: D859847567B3493D
1 changed files with 2 additions and 2 deletions

View File

@ -51,7 +51,7 @@ public class OpenLdapUserSearchSessionFactoryTests extends ESTestCase {
private static final String LDAPCACERT_PATH = "/ca.crt";
@Before
public void init() throws Exception {
public void init() {
Path caPath = getDataPath(LDAPCACERT_PATH);
/*
* 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 class OpenLdapUserSearchSessionFactoryTests extends ESTestCase {
*/
globalSettings = Settings.builder()
.put("path.home", createTempDir())
.put("xpack.security.authc.realms.ldap.ssl.certificate_authorities", caPath)
.put("xpack.security.authc.realms.ldap.oldap-test.ssl.certificate_authorities", caPath)
.build();
threadPool = new TestThreadPool("LdapUserSearchSessionFactoryTests");
}