You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The base DN for searching LDAP groups. When set together with `groupSearch`, Druid performs a reverse group lookup to populate the `memberOf` attribute during authentication. This is needed when the LDAP server does not return `memberOf` in user search results. If not set, Druid relies on the `memberOf` attribute being returned directly by the user search.<br />
The LDAP search filter for finding groups that contain a user. The `%s` placeholder is replaced with the user's full DN. For example, `(uniqueMember=%s)` for `groupOfUniqueNames` or `(member=%s)` for `groupOfNames`.<br />
If true and the request credential doesn't exists or isn't fully configured in the credentials store, the request will proceed to next Authenticator in the chain.<br />
You use this information to map the LDAP group to Druid roles in a later step.
65
65
66
66
:::info
67
-
Druid uses the `memberOf` attribute to determine a group's membership using LDAP. If your LDAP server implementation doesn't include this attribute, you must complete some additional steps when you [map LDAP groups to Druid roles](#map-ldap-groups-to-druid-roles).
67
+
Druid uses the `memberOf` attribute to determine group membership. If your LDAP server does not return this attribute, you can either [map LDAP groups to Druid roles](#map-ldap-groups-to-druid-roles) manually or configure a [reverse group lookup](#group-search-reverse-lookup-configuration) to resolve groups automatically.
68
68
:::
69
69
70
70
## Configure Druid for LDAP authentication
@@ -296,6 +296,27 @@ Complete the following steps to set up LDAPS for Druid. See [Configuration refer
296
296
5. Restart Druid.
297
297
298
298
299
+
## Group search reverse lookup configuration
300
+
301
+
By default, Druid reads the `memberOf` attribute from the LDAP user entry to determine group membership. Some LDAP servers do not return `memberOf` because the feature is not enabled, it is stored as an operational attribute that Java JNDI cannot retrieve, or groups only store membership on the group entry itself. In these cases, group-based authorization denies all requests because no groups are found.
302
+
303
+
To resolve this, configure a reverse group lookup so that Druid searches group entries to find which groups contain the user. Add the following properties to your `common.runtime.properties`:
-`groupBaseDn`: The base DN under which your LDAP groups are stored.
312
+
-`groupSearch`: The LDAP filter to find groups containing a user. The `%s` placeholder is replaced with the user's full DN (for example, `uid=myuser,ou=People,dc=example,dc=com`). Use `(uniqueMember=%s)` for `groupOfUniqueNames` or `(member=%s)` for `groupOfNames`.
313
+
314
+
When these properties are set and the user search does not return a `memberOf` attribute, Druid automatically performs the reverse group lookup and populates `memberOf` in the authentication result. The authorizer processes these groups as usual, requiring no additional configuration.
315
+
316
+
:::info
317
+
If your LDAP server does return `memberOf` directly, the reverse lookup is skipped.
318
+
:::
319
+
299
320
## Troubleshooting tips
300
321
301
322
The following are some ideas to help you troubleshoot issues with LDAP and LDAPS.
Copy file name to clipboardExpand all lines: extensions-core/druid-basic-security/src/main/java/org/apache/druid/security/basic/BasicAuthLDAPConfig.java
+56Lines changed: 56 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,8 @@
21
21
22
22
importorg.apache.druid.metadata.PasswordProvider;
23
23
24
+
importjavax.annotation.Nullable;
25
+
24
26
publicclassBasicAuthLDAPConfig
25
27
{
26
28
privatefinalStringurl;
@@ -33,6 +35,10 @@ public class BasicAuthLDAPConfig
Copy file name to clipboardExpand all lines: extensions-core/druid-basic-security/src/main/java/org/apache/druid/security/basic/authentication/validator/LDAPCredentialsValidator.java
+79-3Lines changed: 79 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -41,6 +41,8 @@
41
41
importjavax.naming.Name;
42
42
importjavax.naming.NamingEnumeration;
43
43
importjavax.naming.NamingException;
44
+
importjavax.naming.directory.BasicAttribute;
45
+
importjavax.naming.directory.BasicAttributes;
44
46
importjavax.naming.directory.DirContext;
45
47
importjavax.naming.directory.InitialDirContext;
46
48
importjavax.naming.directory.SearchControls;
@@ -77,7 +79,9 @@ public LDAPCredentialsValidator(
0 commit comments