Skip to content

tests: LDAP - Improvements to LDIF test data#3506

Merged
polarathene merged 3 commits intodocker-mailserver:masterfrom
polarathene:tests/ldap-ldif-users
Aug 28, 2023
Merged

tests: LDAP - Improvements to LDIF test data#3506
polarathene merged 3 commits intodocker-mailserver:masterfrom
polarathene:tests/ldap-ldif-users

Conversation

@polarathene
Copy link
Copy Markdown
Member

Description

Another iterative change for LDAP test.

I could stage these out in a multi-commit PR but I'm choosing to preserve some change history and provide smaller diff for review, before introducing a change for v13 (outside of the tests, but will also affect this LDAP test going forward).

No change to DMS beyond the LDAP test and it's test data.


Changes:

  • 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.

Relevant history:

Type of change

  • Improvement (non-breaking change that does improve existing functionality)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • New and existing unit tests pass locally with my changes

- 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.
@polarathene polarathene merged commit 351ef2a into docker-mailserver:master Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants