Is it possible to integrate with an OIDC identity provider, which encrypts its JWT tokens? #28061
-
|
We would like to integrate with an OIDC identity provider, which encrypts its JWS tokens (RFC7516). There is a token decrypting endpoint available (security.oauth2.resource.token-info-uri). Is there a way to integrate such a provider? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 3 replies
-
|
Keycloak does support brokering with an OIDC identity provider that encrypts its id tokens. The OIDC identity provider will need to be configured to use the public encryption keys configured in Keycloak, for instance by configuring the IDP with Keycloak's JWKS endpoint. That said I'm not sure what you mean by a token decrypting endpoint, that looks like a token introspection endpoint. |
Beta Was this translation helpful? Give feedback.
-
|
I was hoping that I may have missed a way to give Keycloak the token introspection endpoint and disable the (broker) nonce checking for everything to work out of the box (so to speak). For now I am getting this exception:
That said I'll have to see if that OIDC identity provider can be configured to use the public encryption keys configured in Keycloak. Thank you. |
Beta Was this translation helpful? Give feedback.
-
|
I think since Keycloak 23 there is an option to disable Keycloak from sending and verifying the nonce in the Having the |
Beta Was this translation helpful? Give feedback.
-
|
Hmm... if the IDP uses public keys from Keycloak's JWKS then it is, naturally, easy for Keycloak to enc./dec. the tokens using its private keys. But... isn't it natural for IDP to use private keys to encrypt its own tokens? Otherwise how, for example, can it serve data on a token introspection endpoint? Is there any specification OIDC IDPs have to follow to know when to be a client (using public keys) or a server (using private keys)? Basically, I would like to learn more about how exactly this "Support for JWE encrypted ID Tokens and UserInfo responses in OpenID Connect providers" should work in more details. |
Beta Was this translation helpful? Give feedback.
-
|
I am also facing the same kind of issue , I am configuring the Authetik endpoint as OIDC in keycloak. When users login I am getting private key not found in relam to decrypt the algorithm. Authtik team has shared the private key and certificate whihc I already added in key provider as RSA-OAEP-256 algorithm but no help. Any help will be apprecaited. Do I need to share the kid to Authentik team ? |
Beta Was this translation helpful? Give feedback.
Keycloak does support brokering with an OIDC identity provider that encrypts its id tokens. The OIDC identity provider will need to be configured to use the public encryption keys configured in Keycloak, for instance by configuring the IDP with Keycloak's JWKS endpoint.
That said I'm not sure what you mean by a token decrypting endpoint, that looks like a token introspection endpoint.