mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Yubao Liu
24.10.2022 ba0527f3c3b1c639944d262951d59a21bbf59aa9
refs
author Yubao Liu <yubao.liu@gmail.com>
Tuesday, May 24, 2022 10:10 +0200
committer GitHub <noreply@github.com>
Tuesday, May 24, 2022 10:10 +0200
commitba0527f3c3b1c639944d262951d59a21bbf59aa9
tree a697270a430c6f8087d56de5cbbcb6023593dc47 tree | zip | gz
parent 0e25cf118d88428769f36c98c7a5b624d627ac94 view | diff
support AD attributes userAccountControl, msDS-UserAccountDisabled and pwdLastSet (#233)

It's a pity LDAP doesn't have standard attribute to represent disabling
an user account, Redhat's Keycloak supports an AD mapper to read and write
attribute `userAccountControl`, and an AD LDS mapper to read and write
attribute `msDS-UserAccountDisabled`, both mappers support attribute
`pwdLastSet` too.

With this patch, these three attributes basically work like AD and AD LDS:

* AD: if (userAccountControl & 2L) != 0, then the user account is disabled for binding.
* AD LDS: if msDS-UserAccountDisabled is TRUE, then the user account is disabled for binding.
* Both AD and AD LDS:
* new user added: if pwdLastSet != 0, it's automatically set to current time.
* user password modified: if new pwdLastSet != 0, it's automatically set to current time.
* pwdLastSet changed: if new pwdLastSet != 0, it's automatically set to current time.
* pwdLastSet deleted: pwdLastSet is automatically set to current time.

References:
* https://docs.microsoft.com/en-us/windows/win32/adschema/a-useraccountcontrol
* https://docs.microsoft.com/en-us/windows/win32/adschema/a-msds-useraccountdisabled
* https://docs.microsoft.com/en-us/windows/win32/adschema/a-pwdlastset
10 files added
1 files modified
417 ■■■■■ changed files
opendj-server-legacy/resource/schema/99-msad.ldif 11 ●●●●● diff | view | raw | blame | history
opendj-server-msad-plugin/README.msad.plugin 40 ●●●●● diff | view | raw | blame | history
opendj-server-msad-plugin/pom.xml 69 ●●●●● diff | view | raw | blame | history
opendj-server-msad-plugin/src/main/assembly/config/msad-plugin.ldif 10 ●●●●● diff | view | raw | blame | history
opendj-server-msad-plugin/src/main/assembly/config/schema/99-msad-plugin.ldif 7 ●●●●● diff | view | raw | blame | history
opendj-server-msad-plugin/src/main/assembly/descriptor.xml 30 ●●●●● diff | view | raw | blame | history
opendj-server-msad-plugin/src/main/java/opendj/MsadPlugin.java 221 ●●●●● diff | view | raw | blame | history
opendj-server-msad-plugin/src/main/java/opendj/MsadPluginConfiguration.xml 21 ●●●●● diff | view | raw | blame | history
opendj-server-msad-plugin/src/main/java/opendj/Package.xml 6 ●●●●● diff | view | raw | blame | history
opendj-server-msad-plugin/src/main/java/opendj/package-info.java 1 ●●●● diff | view | raw | blame | history
pom.xml 1 ●●●● diff | view | raw | blame | history