tests: LDAP - Improvements to LDIF (#3506)

- The `uniqueIdentifier` attribute is not appropriate and was relying on `objectClass: extensibleObject` as a workaround to allow it. A more appropriate attribute to use instead is `userID` (_short name: `uid`_).
- Removing `extensibleObject` now requires switching the user accounts to use `inetOrgPerson` class (_which inherits from `organizationalPerson`_). which allows the attributes `givenName`, `userID` and `mail` (_also provided via the `PostfixBookMailAccount` class_).
- The LDAP root object now uses `dc` attributes for `example.test` instead of `localhost.localdomain`. This has nothing to do with DMS or LDAP containers networking config, nor the users mail addresses.
- Users are now grouped under the organizational unit of `users` instead of `people`. Purely a naming change out of preference, no functional difference.

The LDAP test ENV has been updated to accommodate the above changes. An additional ENV override was required for SASLAuthd to switch an attribute set for `ldap_filter` in `/etc/saslauthd.conf` from the implicit default of `uniqueIdentifier` (_that we set during startup as an ENV default for fallback_) to the `userID` attribute.
This commit is contained in:
Brennan Kinney 2023-08-29 10:16:08 +12:00 committed by GitHub
parent e9f04cf8a7
commit 351ef2afa1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 34 additions and 29 deletions

View file

@ -1,11 +1,16 @@
# The root object, all entries will branch off this one:
dn: dc=localhost,dc=localdomain
# The root object of the tree, all entries will branch off this one:
dn: dc=example,dc=test
# DN is formed from `example.test` DNS labels:
# NOTE: This is just a common convention (not dependent on hostname or any external config)
objectClass: dcObject
# Must reference left most component:
dc: example
# It's required to use an `objectClass` that implements a "Structural Class":
objectClass: organization
dc: localhost
# Value is purely descriptive, not important to tests:
o: DMS Test
# User accounts will belong to this subtree:
dn: ou=people,dc=localhost,dc=localdomain
dn: ou=users,dc=example,dc=test
objectClass: organizationalUnit
ou: people
ou: users