Skip to content

Commit 9b45607

Browse files
authored
Update bitnami/openldap/README.md (#75937)
* Update bitnami/openldap/README.md Add documentation for OpenLdap Dyn List and Member Of overlays consideration while using msuser schema Signed-off-by: Philippe Duveau <pduvax@gmail.com>
1 parent 6a8d0ae commit 9b45607

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

bitnami/openldap/README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,42 @@ Check the official page [OpenLDAP, Overlays, Access Logging](https://www.openlda
235235

236236
Check the official page [OpenLDAP, Overlays, Sync Provider](https://www.openldap.org/doc/admin26/overlays.html#Sync%20Provider) for detailed configuration information.
237237

238+
#### Dynamic List or Member Of
239+
240+
The overlays `dynlist` and `memberof` both require the operational `memberOf` attribute to be present in the loaded schema. During initialization, a check is performed for the presence of this attribute; if it is absent, it is created programmatically.
241+
242+
At the same time, the `msuser` schema declares the same attribute. If both the schema and at least one of the overlays are required, a conflict may arise depending on the load order, such as whether the schema is loaded before or after the overlays. If the overlays are loaded first, the process stops and raises a `Duplicate attribute` error.
243+
244+
In a standard {{ .Name }} installation (deb or rpm), its configuration is stored in the main file, which may include another one. In this case, the order is determined by the order of directives.
245+
246+
For configuration flexibility, the container-based approach relies on a file tree structure rather than a master file with includes. To ensure the correct order, the file tree must be read deterministically. Fortunately, Linux sorts folder content using alphanumeric order. This allows overlay loading after the schema by using a keyword that is after `schema` in alphanumeric sorting (i.e. `cn=z-module{N}` will be loaded after `cn=schema` as they are both children of `cn=config`). Doing so, the configuration merging `msuser` schema and `dynlist` (or `memberof`) will load without errors.
247+
248+
IMPORTANT: The `dynlist` requires the schema `dyngroup`. This can be done by adding it to the list of schemas to load through `LDAP_EXTRA_SCHEMAS`.
249+
250+
The following example shows how to declare the module `dynlist` with the support of dynamic (groupOfUrls) and static (groupOfNames) groups. The `olcDatabase={N}mdb` has to be adjusted to the target configuration.
251+
252+
```bash
253+
ldapadd -D "cn=admin,cn=config" -w "configpassword" <<EOF
254+
dn: cn=z-module,cn=config
255+
objectClass: olcModuleList
256+
cn: z-module
257+
olcModuleLoad: dynlist.so
258+
olcModulePath: /opt/bitnami/openldap/lib/openldap
259+
260+
dn: olcOverlay=dynlist,olcDatabase={N}mdb,cn=config
261+
objectClass: olcConfig
262+
objectClass: olcDynListConfig
263+
objectClass: olcOverlayConfig
264+
objectClass: top
265+
olcOverlay: dynlist
266+
olcDynListAttrSet: groupOfUrls memberURL member+memberOf@groupOfNames
267+
EOF
268+
```
269+
270+
This example is compatible with or without the usage of the `msuser` schema.
271+
272+
Check the official page [OpenLDAP, Overlays, Dynamic Lists](https://www.openldap.org/doc/admin26/overlays.html#Dynamic%20Lists) for detailed configuration information.
273+
238274
### Securing OpenLDAP traffic
239275

240276
OpenLDAP clients and servers are capable of using the Transport Layer Security (TLS) framework to provide integrity and confidentiality protections and to support LDAP authentication using the SASL EXTERNAL mechanism. Should you desire to enable this optional feature, you may use the following environment variables to configure the application:

0 commit comments

Comments
 (0)