Hello. I'm working on application which used javascript keycloak adapters to retrieve jwt keycloak token. This token front-end sends to back-end. Back-end uses this jwt token to get openshift 4 auth provider token. When back-end uses host public keycloak url for request - request works great(keycloak provides openshift oauth token). Example with curl:
But when back-end uses keycloak internal CoreDNS service url, then request fails with an error: Invalid token:
curl -k -H "Authorization: bearer ${jwt-token}" http://keycloak.app.svc.cluster.local:8080/auth/realms/che/broker/openshift-v4/token
When I enabled log level debug I see:
[0m [32m10:14:10,201 DEBUG [org.keycloak.services.managers.AuthenticationManager] (default task-2) Failed to verify identity token: Invalid token issuer. Expected 'http://keycloak.che.svc.cluster.local:8080/auth/realms/che', but was 'https://keycloak-che.apps-crc.testing/auth/realms/che'
Is it possible to use internal keycloak url for this case? In my case internal url - it's a CoreDNS url.
P.S.: we are working on operator which should install our application. One of the component of our application - is keycloak. And we want to provide ability to use internal network for all application services(back-ends). For now keycloak is it the last component which we can't to cover with internal network. Thanks for any hints...
--
You received this message because you are subscribed to the Google Groups "Keycloak User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keycloak-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/keycloak-user/e936251f-6aea-4c70-bd07-a41bdb764a42n%40googlegroups.com.