Skip to content

Remove keycloak id from user model#599

Draft
thescouser89 wants to merge 1 commit intoproject-ncl:masterfrom
thescouser89:drop-user-id
Draft

Remove keycloak id from user model#599
thescouser89 wants to merge 1 commit intoproject-ncl:masterfrom
thescouser89:drop-user-id

Conversation

@thescouser89
Copy link
Contributor

The keycloak id is present in the user model to guarantee uniqueness. However, it is also pretty much guaranteed that the username will uniquely identify a single user only.

The other reason why this commit removes the keycloak id is because we need to support other ways of authentication (LDAP). LDAP doesn't provide such a keycloak id (but in theory we could use a unique ID from the LDAP entry for the user). However the same user authenticating through LDAP and then through OIDC would be considered 2 different 'persons' because of the different ids.

I believe it would be much easier to just use the username to uniquely identify a user as a result.

Checklist:

  • Have you added unit tests for your change?

The keycloak id is present in the user model to guarantee uniqueness.
However, it is also pretty much guaranteed that the username will
uniquely identify a single user only.

The other reason why this commit removes the keycloak id is because we
need to support other ways of authentication (LDAP). LDAP doesn't
provide such a keycloak id (but in theory we could use a unique ID from
the LDAP entry for the user). However the same user authenticating
through LDAP and then through OIDC would be considered 2 different
'persons' because of the different ids.

I believe it would be much easier to just use the username to uniquely
identify a user as a result.
@thescouser89 thescouser89 requested review from jomrazek and michalovjan and removed request for michalovjan February 2, 2026 20:53
@michalovjan
Copy link
Contributor

@thescouser89 btw, IIRC elytron-oidc is available only in EAP with XP pack which DA is not on.

@thescouser89
Copy link
Contributor Author

@michalovjan I just transformed DA to use XP pack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants