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

Supporting different ISS when validating token #308

Open
Nosfistis opened this issue Nov 19, 2021 · 2 comments
Open

Supporting different ISS when validating token #308

Nosfistis opened this issue Nov 19, 2021 · 2 comments

Comments

@Nosfistis
Copy link

Describe the bug

When validating a user-agent token (created via a public client) from a bearer-only client (backend application) that use different keycloak hostnames, the validation fails with error invalid token (wrong ISS).

Using the external, public url for the keycloak server in the backend application avoids this issue.

The bug also occurs when setting the frontend URL, which changes the authorization_endpoint to the public URL, while maintaining the request URL in the token_endpoint advertisement.

Version

15.0.2

Expected behavior

Given the proposal of the default hostname providers and the frontend url configuration, the nodejs client should accept tokens with ISS that is different from the current realm url.

Actual behavior

No response

How to Reproduce?

No response

Anything else?

I found the specific code to be here:

} else if (token.content.iss !== this.realmUrl) {

@sbellerwork
Copy link

I have the same issue, this pull request (#294) is trying to fix this, but there was no recent activity.

@elirenato
Copy link

+1

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

No branches or pull requests

3 participants