-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
validation issuer for oidc discovery configuration #9019
Comments
@waiet The configuration Since you need to go through a Proxy, the As well, you will need to supply a custom I'm going to close this as a duplicate. |
@jgrandja My configuration from oidc discovery: |
This validation is required as per spec:
Based on your environments OIDC configuration metadata, I see a mix of My previous comment still applies as you will not be able to use OIDC Discovery and instead should specify the |
I have spring boot application with spring boot configuration.
spring: security: oauth2: client: provider: keycloak: issuer-uri: http://gateway:8080/auth/realms/myrealm registration: keycloak: client-id: spring-security client-secret: 6cea952f-10d0-4d00-ac79-cc865820dc2c
I want use openid connect discovery configuration, with oidc provider keycloak. My keycloak is behind proxy and keycloak frontend url(f.e.: login url) is different than backend keycloak url(f.e: url for obtaining token).. And Issue is when application is starting I got error:
The Issuer "http://myfrontend.com/auth/realms/myrealm" provided in the configuration metadata did not match the requested issuer "http://gateway:8080/auth/realms/myrealm
This validation is here:
https://github.com/spring-projects/spring-security/blob/master/oauth2/oauth2-jose/src/main/java/org/springframework/security/oauth2/jwt/JwtDecoderProviderConfigurationUtils.java#L67
My Openid connect discovery endpoint return issuer with frontend url
"issuer": "http://myfrontend.com/auth/realms/myrealm". And this is compared with value issuer-uri from configuration. I don't know why is existing this validation. I created ticket also for keycloak https://issues.redhat.com/browse/KEYCLOAK-14579, But according keycloak team issuer is right with frontend channel url
To Reproduce
spring boot application with spring security with oidc discovery configuration to keycloak. Keycloak should by behind proxy and should by configured different frontend url as backend url.
Error occurs when application starts
Expected behavior
Validation for should not exist. Or this validation is right and oidc dicovery endpoint(on keycloak) should be return issuer with backchannel url
The text was updated successfully, but these errors were encountered: