Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #522: Ldap bind-dn and bind-pwd are required even for non group authentication. #523

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/controllers/auth/ldap/LDAPAuthConfig.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
}
Expand Down
3 changes: 1 addition & 2 deletions conf/application.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down