feat: add support for editable users created by SAML identity provider #45845
+48
−0
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.
closed #45846
when keycloak user is created by saml
it's created in kc as readonly
we want to wrap this with a new flag
in identity provider -> saml settings section
that a new toggle there, disabled by default
when toggle is off/false
the keycloak user created by saml
will be readonly as it is today
when toggle is on/true
the keycloak user created by saml
will be not readonly
This pull request introduces a new option to make users created via SAML identity providers editable, even if they would otherwise be treated as read-only due to organization management policies. This includes UI changes for configuration, backend support for the new attribute, and updates to the logic that determines a user's editability.
SAML Identity Provider Enhancements:
createdUsersEditable) toSAMLIdentityProviderConfigthat allows users created via SAML to be editable in Keycloak. [1] [2]SAMLIdentityProviderto set a special user attribute when the new option is enabled, ensuring these users are not marked as read-only.User Editability Logic:
UserStorageManagerandOrganizationsutility to check for the new user attribute (kc.org.managed.member.editable) before marking a user as read-only, allowing exceptions for users created with the new SAML option. [1] [2]OrganizationModelfor consistent usage.Admin UI Improvements: