Repository navigation
Make "Mutual TLS Certificate Bound Access Tokens" work with non-certificate authentication #36802
Bragolgirith
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Keycloak has a setting to include a certificate's SHA-256 fingerprint as a Claim in the Access Token (
Client -> Client Details -> Advanced -> OAuth 2.0 Mutual TLS Certificate Bound Access Tokens Enabled), based on OAuth 2.0 Mutual-TLS Client Certificate-Bound Access Tokens .However, enabling this setting currently prevents all non-certificate authentication methods (e.g. username-password form login) with the following error:
{"error":"invalid_request","error_description":"Client Certification missing for MTLS HoK Token Binding"}.I feel that enabling certificate-bound tokens shouldn't necessarily break the non-certificate authentication methods. A better approach would be to still issue the Access Token, but without the certificate fingerprint claim.
This would support advanced workflows (which is something the linked specification also hints at) where a resource server has both MTLS and non-MTLS endpoints, allowing it to dynamically grant access based on the exact endpoint and the used authentication method.
All reactions