8000 Custom User Federation: username is read only error · keycloak keycloak · Discussion #38729 · GitHub
[go: up one dir, main page]

Skip to content
Discussion options

You must be logged in to vote

I fixed my issue. I didn't realize that I implemented the wrong UserModel interface.

Implementing AbstractUserAdapterFederatedStorage instead of AbstractUserAdapter and selecting NO_CACHE as cache policy for my custom user federation did the trick.

The fix is basically not storing the username as an attribute in the custom adapter code:

// This shouldn't be done (I was doing it as part of the custom adapter's code)
getFederatedStorage().setSingleAttribute(realm, getId(), mapAttribute(UserModel.USERNAME), "my-username");

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Nahuel92
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant
0