Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Registration Access Token's issuer claim prevents smooth migration of the realm's issuer #28045

Open
reda-alaoui opened this issue Mar 19, 2024 · 1 comment
Labels
area/oidc Indicates an issue on OIDC area kind/enhancement Categorizes a PR related to an enhancement status/triage team/core-clients

Comments

@reda-alaoui
Copy link
Contributor

reda-alaoui commented Mar 19, 2024

Description

Authenticating to Keycloak via internet domain A using Registration Access Token generated on internet domain B will fail.

Discussion

No response

Motivation

We have a Keycloak instance deployed on internet domain A that we want to move to domain B.
Many Keycloak's clients have persisted registration access tokens associated to domain A. Those tokens are rejected when trying to use them on domain B because of their issuer values.

Details

https://github.com/keycloak/keycloak/blob/main/services/src/main/java/org/keycloak/services/clientregistration/ClientRegistrationTokenUtils.java#L97-L97

The registration access token authentication, in addition to the usual JWT validations, compares the registrationToken stored in the Client entity with the JWT jti claim (https://github.com/keycloak/keycloak/blob/main/services/src/main/java/org/keycloak/services/clientregistration/ClientRegistrationAuth.java#L189-L189).
Therefore, isn't it overkill to also verify the issuer claim for this kind of token?

@reda-alaoui reda-alaoui added kind/enhancement Categorizes a PR related to an enhancement status/triage labels Mar 19, 2024
@reda-alaoui reda-alaoui changed the title Registration Access Token's issuer claim prevents smooth migration of the Keycloak issuer Registration Access Token's issuer claim prevents smooth migration of the realm's issuer Mar 19, 2024
@mposolda mposolda added the area/oidc Indicates an issue on OIDC area label Mar 27, 2024
@mposolda
Copy link
Contributor

It can be nice if this is handled by default client policies ( #27188 ) once they are supported. See this comment for the details: #28054 (review) .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/oidc Indicates an issue on OIDC area kind/enhancement Categorizes a PR related to an enhancement status/triage team/core-clients
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants