-
Bug
-
Resolution: Done
-
Undefined
-
None
-
False
-
-
False
-
-
Before reporting an issue
[X] I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.
Area
ldap
Describe the bug
When using Microsoft Active Directory LDAP backend, a default LDAP mapper is pre-configured, namely "MSAD Account Controls"
Now, if the user is disabled in LDAP, enable operation simply does not work. The userAccountControl is never modified in LDAP - but UI does say that "the user has been saved"
Additionally, if creation of Users in LDAP is enabled (WRITABLE edit mode), then the user is by default created with userAccountControl with value "546", which, according to online decoder located at https://www.techjutsu.ca/uac-decoder decodes to
Version
25.0.2
Regression
[ ] The issue is a regression
Expected behavior
I am able to enable an already disabled user in LDAP and enable a newly created one - or create a user that's enabled.
Actual behavior
I cannot enable newly created user and users disabled in LDAP
How to Reproduce?
I am providing partial export of the LDAP component
```
{
"realm": "primary",
"components":
"org.keycloak.storage.UserStorageProvider": [
{
"id": "3d9e47d1-5cd5-4df4-a4ea-3cdab797fb4f",
"name": "AD LDAP",
"providerId": "ldap",
"subComponents": {
"org.keycloak.storage.ldap.mappers.LDAPStorageMapper": [
{
"id": "2957f424-b4a1-4ff9-a070-55b64f91e963",
"name": "MSAD account controls",
"providerId": "msad-user-account-control-mapper",
"subComponents": {},
"config":
},
{
"id": "0e0a7c5f-de2f-4aa3-96b3-41905862d4f1",
"name": "sAMAccountName",
"providerId": "user-attribute-ldap-mapper",
"subComponents": {},
"config":
},
{
"id": "30bac14e-cfe7-44c7-8ceb-f183be54a9ae",
"name": "first name",
"providerId": "user-attribute-ldap-mapper",
"subComponents": {},
"config":
},
{
"id": "b9840a5e-5283-46b9-ad62-0c75f5fa1a21",
"name": "accountExpires",
"providerId": "hardcoded-ldap-attribute-mapper",
"subComponents": {},
"config":
},
{
"id": "447be09e-1790-4120-bd06-86721374e78d",
"name": "modify date",
"providerId": "user-attribute-ldap-mapper",
"subComponents": {},
"config":
},
{
"id": "952d61c4-46d1-48ae-bdd0-bdef55c6a0fb",
"name": "username",
"providerId": "user-attribute-ldap-mapper",
"subComponents": {},
"config":
},
{
"id": "e6fe0978-0846-4784-b975-26f2dcb88dde",
"name": "last name",
"providerId": "user-attribute-ldap-mapper",
"subComponents": {},
"config":
},
{
"id": "fdf58f39-125e-4675-a206-abe7d940711a",
"name": "email",
"providerId": "user-attribute-ldap-mapper",
"subComponents": {},
"config":
},
{
"id": "a1583f8e-0cfc-4202-a691-c382d15c7227",
"name": "creation date",
"providerId": "user-attribute-ldap-mapper",
"subComponents": {},
"config":
}
]
},
"config":
}
]
}
```
For my testing, I use samba AD. If necessary, I can provide instructions on how to set up a server on a virtual machine.
Anything else?
No response
- links to