Skip to content

Commit 7b3441c

Browse files
committed
Add ldap & pki role mapping files
1 parent 8e167c9 commit 7b3441c

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

x-pack/plugin/security/qa/smoke-test-all-realms/src/javaRestTest/java/org/elasticsearch/xpack/security/authc/SecurityRealmSmokeTestCase.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ public abstract class SecurityRealmSmokeTestCase extends ESRestTestCase {
5353
.configFile("saml-metadata.xml", Resource.fromClasspath("saml-metadata.xml"))
5454
.configFile("kerberos.keytab", Resource.fromClasspath("kerberos.keytab"))
5555
.configFile("oidc-jwkset.json", Resource.fromClasspath("oidc-jwkset.json"))
56+
.configFile("ldap_role_mapping.yml", Resource.fromClasspath("ldap_role_mapping.yml"))
57+
.configFile("pki_role_mapping.yml", Resource.fromClasspath("pki_role_mapping.yml"))
5658
.setting("xpack.ml.enabled", "false")
5759
.setting("xpack.security.enabled", "true")
5860
.setting("xpack.security.authc.token.enabled", "true")
@@ -77,11 +79,14 @@ public abstract class SecurityRealmSmokeTestCase extends ESRestTestCase {
7779
.setting("xpack.security.authc.realms.ldap.ldap2.order", "2")
7880
.setting("xpack.security.authc.realms.ldap.ldap2.url", "ldap://localhost:7777")
7981
.setting("xpack.security.authc.realms.ldap.ldap2.user_search.base_dn", "OU=users,DC=example,DC=com")
82+
.setting("xpack.security.authc.realms.ldap.ldap2.files.role_mapping", "ldap_role_mapping.yml")
8083
// - AD (configured but won't work because we don't want external fixtures in this test suite)
8184
.setting("xpack.security.authc.realms.active_directory.ad3.order", "3")
8285
.setting("xpack.security.authc.realms.active_directory.ad3.domain_name", "localhost")
86+
.setting("xpack.security.authc.realms.active_directory.ad3.files.role_mapping", "ldap_role_mapping.yml")
8387
// - PKI (works)
8488
.setting("xpack.security.authc.realms.pki.pki4.order", "4")
89+
.setting("xpack.security.authc.realms.pki.pki4.files.role_mapping", "pki_role_mapping.yml")
8590
// - SAML (configured but won't work because we don't want external fixtures in this test suite)
8691
.setting("xpack.security.authc.realms.saml.saml5.order", "5")
8792
.setting("xpack.security.authc.realms.saml.saml5.idp.metadata.path", "saml-metadata.xml")
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# AD Realm Role Mapping
2+
group_role:
3+
- "CN=Avengers,CN=users,DC=ad,DC=test,DC=elasticsearch,DC=com"
4+
user_role:
5+
- "CN=Thor,CN=Users,DC=ad,DC=test,DC=elasticsearch,DC=com"
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Role mappings for PKI tests
2+
3+
user:
4+
- "CN=Elasticsearch Test Node, OU=elasticsearch, O=org"

0 commit comments

Comments
 (0)