Skip to content

Commit 0bd5ad6

Browse files
authored
fix: Add LDAP config options (#414)
1 parent a2b72e4 commit 0bd5ad6

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

config.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,21 @@ options:
1414
config-server, or as a replica set.
1515
type: string
1616
default: replication
17+
ldap-user-to-dn-mapping:
18+
default: ''
19+
type: string
20+
description: |
21+
A quote-enclosed JSON-string representing an ordered array of documents. Each document contains a regular expression match and either a substitution or ldapQuery template used for transforming the incoming username. Since the list is ordered, this order can be used to provide fine-grained tuning for building the right DN or the right ldapQuery for the user.
22+
example: '[{
23+
match : "([^@]+)@([^@\\.]+)\\.example\\.com",
24+
substitution: "CN={0},CN=Users,DC={1},DC=example,DC=com"
25+
}]'
26+
ldap-query-template:
27+
default: ''
28+
type: string
29+
description: |
30+
A RFC4516 formatted LDAP query URL template, which is used for authorization.
31+
It must contain either `{USER}` representing the authenticated user, or `{PROVIDED_USER}` representing the supplied username (before authentication or LDAP transformation).
32+
`{PROVIDED_USER}` should be used only if no value in the `ldap-user-to-do-mapping` config option is provided.
33+
If this configuration is not provided, a default string will be computed based on the base_dn returned by the GLAuth k8s charm.
34+
example: “dc=example,dc=com??sub?(&(objectClass=groupOfNames)(member={USER}))"

0 commit comments

Comments
 (0)