From 8c786c04bfb9776017b6f3a0c312c1250c529b6e Mon Sep 17 00:00:00 2001 From: abhat Date: Fri, 16 Jul 2021 04:28:52 -0700 Subject: [PATCH 1/2] Remove parent conf inheriting for ldap group conf --- app/controllers/auth/ldap/LDAPAuthConfig.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/auth/ldap/LDAPAuthConfig.scala b/app/controllers/auth/ldap/LDAPAuthConfig.scala index 6e31fad9..3463c34b 100644 --- a/app/controllers/auth/ldap/LDAPAuthConfig.scala +++ b/app/controllers/auth/ldap/LDAPAuthConfig.scala @@ -21,9 +21,9 @@ class LDAPAuthConfig(config: Configuration) extends AuthConfig { LDAPGroupSearchConfig( bindDN, bindPwd, - groupAuthConfig.getOptional[String]("base-dn").getOrElse(baseDN), + groupAuthConfig.getOptional[String]("base-dn"), getSetting("user-attr")(groupAuthConfig), - groupAuthConfig.getOptional[String]("user-attr-template").getOrElse(userTemplate), + groupAuthConfig.getOptional[String]("user-attr-template"), group ) } From 2f1590f5159691f575afccbfd518fe8683c612e8 Mon Sep 17 00:00:00 2001 From: abhat Date: Fri, 16 Jul 2021 04:31:02 -0700 Subject: [PATCH 2/2] Update application.conf --- conf/application.conf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/conf/application.conf b/conf/application.conf index 3d8f3262..c93e50d1 100644 --- a/conf/application.conf +++ b/conf/application.conf @@ -47,12 +47,11 @@ auth = { bind-dn = ${?LDAP_BIND_DN} bind-pw = ${?LDAP_BIND_PWD} group-search { - // If left unset parent's base-dn will be used + // OpenLDAP might be something like "ou=People,dc=domain,dc=com" base-dn = ${?LDAP_GROUP_BASE_DN} // Attribute that represent the user, for example uid or mail user-attr = ${?LDAP_USER_ATTR} // Define a separate template for user-attr - // If left unset parent's user-template will be used user-attr-template = ${?LDAP_USER_ATTR_TEMPLATE} // Filter that tests membership of the group. If this property is empty then there is no group membership check // AD example => memberOf=CN=mygroup,ou=ouofthegroup,DC=domain,DC=com