Skip to content

Commit 3285bb1

Browse files
committed
DOC-4577 Added dn_group_query and user_dn_query details and examples to LDAP REST API references
1 parent 73fda7e commit 3285bb1

File tree

2 files changed

+19
-11
lines changed
  • content/operate/rs/references/rest-api

2 files changed

+19
-11
lines changed

content/operate/rs/references/rest-api/objects/ldap.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ An API object that represents the cluster's [LDAP]({{< relref "/operate/rs/secur
1717
| bind_dn | string | DN used when binding with the LDAP server to run queries |
1818
| bind_pass | string | Password used when binding with the LDAP server to run queries |
1919
| ca_cert | string | PEM-encoded CA certificate(s) used to validate TLS connections to the LDAP server |
20-
| cache_ttl | integer (default:&nbsp;300) | Maximum TTL (in seconds) of cached entries |
21-
| control_plane | boolean (default:&nbsp;false) | Use LDAP for user authentication/authorization in the control plane |
22-
| data_plane | boolean (default:&nbsp;false) | Use LDAP for user authentication/authorization in the data plane |
23-
| directory_timeout_s | integer (range:&nbsp;5-60) (default:&nbsp;5) | The connection timeout to the LDAP server when authenticating a user, in seconds |
24-
| dn_group_attr | string | The name of an attribute of the LDAP user entity that contains a list of the groups that user belongs to. (Mutually exclusive with "dn_group_query") |
25-
| dn_group_query | complex object | An LDAP search query for mapping from a user DN to the groups the user is a member of. The substring "%D" in the filter will be replaced with the user's DN. (Mutually exclusive with "dn_group_attr") |
26-
| starttls | boolean (default:&nbsp;false) | Use StartTLS negotiation for the LDAP connection |
20+
| cache_ttl | integer (default: 300) | Maximum TTL (in seconds) of cached entries |
21+
| control_plane | boolean (default: false) | Use LDAP for user authentication/authorization in the control plane |
22+
| data_plane | boolean (default: false) | Use LDAP for user authentication/authorization in the data plane |
23+
| directory_timeout_s | integer (range: 5-60) (default: 5) | The connection timeout to the LDAP server when authenticating a user, in seconds |
24+
| dn_group_attr | string | The name of an attribute of the LDAP user entity that contains a list of the groups that user belongs to. `dn_group_attr` is mutually exclusive with `dn_group_query`. |
25+
| dn_group_query | complex object | An LDAP search query used to find a user’s groups, which determine the user’s level of access to the cluster and database as defined by Redis ACLs when [mapped to roles]({{<relref "/operate/rs/references/rest-api/requests/ldap_mappings">}}). `dn_group_query` is mutually exclusive with `dn_group_attr`.<br><br>Contains the following fields:<br>**base**: Defines the starting point DN (unique identifier Distinguished Name) in the directory information tree for the search. Example value: `"DC=example,DC=com"`<br>**filter**: An [RFC-4515](https://www.rfc-editor.org/info/rfc4515) string representation of the search filter to apply. Defines the conditions required for an entry to appear in the search results. Example value: `"member=%D"` where `%D` is replaced with the user's DN.<br>**scope**: Defines the scope of the LDAP search according to the following values:<br>**"base"**: Search the base entry.<br>**"one"**: Search the base entry's immediate children.<br>**"subtree"**: Search the base entry and all its descendants. |
26+
| starttls | boolean (default: false) | Use StartTLS negotiation for the LDAP connection |
2727
| uris | array of strings | URIs of LDAP servers that only contain the schema, host, and port |
28-
| user_dn_query | complex object | An LDAP search query for mapping from a username to a user DN. The substring "%u" in the filter will be replaced with the username. (Mutually exclusive with "user_dn_template") |
29-
| user_dn_template | string | A string template that maps between the username, provided to the cluster for authentication, and the LDAP DN. The substring "%u" will be replaced with the username. (Mutually exclusive with "user_dn_query") |
28+
| user_dn_query | complex object | An LDAP search query used to find and authenticate LDAP users. `user_dn_query` is mutually exclusive with `user_dn_template`.<br><br>Contains the following fields:<br>**base**: Defines the starting point DN (unique identifier Distinguished Name) in the directory information tree for the search. Example value: `"DC=example,DC=com"`<br>**filter**: An [RFC-4515](https://www.rfc-editor.org/info/rfc4515) string representation of the search filter to apply. Defines the conditions required for an entry to appear in the search results. Example value: `"(&(objectClass=Person)(cn=%u))"` where `%u` is replaced with the username.<br>**scope**: Defines the scope of the LDAP search according to the following values:<br>**"base"**: Search the base entry.<br>**"one"**: Search the base entry's immediate children.<br>**"subtree"**: Search the base entry and all its descendants. |
29+
| user_dn_template | string | A string template that maps between the username, provided to the cluster for authentication, and the LDAP DN. The substring "%u" will be replaced with the username. `user_dn_template` is mutually exclusive with `user_dn_query`. |

content/operate/rs/references/rest-api/requests/cluster/ldap.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,18 @@ Returns an [LDAP object]({{< relref "/operate/rs/references/rest-api/objects/lda
5656
"control_plane": false,
5757
"data_plane": false,
5858
"dn_group_attr": "MemberOf",
59-
"dn_group_query": {},
59+
"dn_group_query": {
60+
"base": "DC=windowsAD,DC=qa,DC=redislabs,DC=com",
61+
"filter": "member=%D",
62+
"scope": "subtree"
63+
},
6064
"starttls": false,
6165
"uris": ["ldap://ldap.example.org:636"],
62-
"user_dn_query": {},
66+
"user_dn_query": {
67+
"base": "DC=windowsAD,DC=qa,DC=redislabs,DC=com",
68+
"filter": "(&(objectClass=Person)(cn=%u))",
69+
"scope": "subtree"
70+
},
6371
"user_dn_template": "cn=%u, ou=users,dc=example,dc=org"
6472
}
6573
```

0 commit comments

Comments
 (0)