You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow local attribute updates for read-only LDAP users - #54840
Keep edit permissions aligned with User Profile policy: imported users can retain Keycloak-only profile data while LDAP remains authoritative for mapped attributes. Import-disabled users keep their existing restrictions.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Hardcoded attribute filters can hide unimported LDAP users, and email updates for imported users without an email mapper can pass validation but fail on a protected username when “Email as username” is enabled.
Allows imported read-only LDAP users to update Keycloak-only profile data while preserving LDAP ownership and User Profile permissions. Users with imports disabled retain their existing restrictions.
Changes:
Limits read-only protection to provider-owned and mapper-declared attributes.
Adds coverage for local updates, profile permissions, and mapped-attribute protection.
Documents the revised read-only behavior and mapper ownership contract.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Case-insensitive protection misses custom LDAP attribute aliases, allowing local writes that remain masked by LDAP reads; the delegate and User Profile metadata must protect these aliases consistently.
No open issues 🎉
1 previously missed issue
In code that hasn't changed since last review
Protect case-insensitive aliases for all LDAP-mapped attributes
Case-insensitive protection is limited to three properties, but UserAttributeLDAPStorageMapper also matches custom names case-insensitively. With a postal_code mapper and “Always Read Value From LDAP” enabled, writes to POSTAL_CODE now succeed as local writes while getAttributeStream("POSTAL_CODE") still returns the LDAP value; protect these aliases consistently in both the delegate and User Profile metadata.
Could you put the regression tests added by this PR in the new test framework under tests/base? The arquillian testsuite is now deprecated. The existing tests/base infrastructure should be sufficient.
Could you add a short upgrade note for custom LDAP mapper authors? Before this change, the read-only delegate blocked writes to custom attributes even if their mapper didn’t declare them. With this PR, an undeclared attribute can be treated as locally writable for imported users. AbstractLDAPStorageMapper#getUserAttributes() returns an empty set by default. The Javadoc explains the contract, and an upgrade note would prompt existing mapper authors to check that they declare every attribute they manage.
The reason will be displayed to describe this comment to others. Learn more.
🟢 Approval recommended
No active review issues block the change enabling policy-controlled edits to Keycloak-only attributes for imported read-only LDAP users.
No open issues 🎉
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Keep edit permissions aligned with User Profile policy: imported users can retain Keycloak-only profile data while LDAP remains authoritative for mapped attributes. Import-disabled users keep their existing restrictions.
Closes #54529