You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a bearer access token must be bound to the client mTLS certificate. It requires that JWT tokens must contain a confirmation `cnf` claim with a SHA256 certificate thumbprint matching the client mTLS certificate's SHA256 certificate thumbprint.
68369
+
68370
+
For opaque tokens, SHA256 certificate thumbprint must be returned in their introspection response.
If a bearer access token must be bound to the client mTLS certificate. It requires that JWT tokens must contain a confirmation `cnf` claim with a SHA256 certificate thumbprint matching the client mTLS certificate's SHA256 certificate thumbprint.
2403
+
2404
+
For opaque tokens, SHA256 certificate thumbprint must be returned in their introspection response.
If a bearer access token must be bound to the client mTLS certificate. It requires that JWT tokens must contain a confirmation `cnf` claim with a SHA256 certificate thumbprint matching the client mTLS certificate's SHA256 certificate thumbprint.
2403
+
2404
+
For opaque tokens, SHA256 certificate thumbprint must be returned in their introspection response.
Copy file name to clipboardExpand all lines: _versions/main/guides/security-oidc-bearer-token-authentication.adoc
+75Lines changed: 75 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1244,6 +1244,81 @@ If you set `quarkus.oidc.client-id`, but your endpoint does not require remote a
1244
1244
Quarkus `web-app` applications always require the `quarkus.oidc.client-id` property.
1245
1245
====
1246
1246
1247
+
== Mutual TLS token binding
1248
+
1249
+
https://datatracker.ietf.org/doc/html/rfc8705[RFC8705] describes a mechanism for binding access tokens to Mutual TLS (mTLS) client authentication certificates.
1250
+
It requires that a client certificate's SHA256 thumbprint matches a JWT token or token introspection confirmation `x5t#S256` certificate thumbprint.
1251
+
1252
+
For example, see https://datatracker.ietf.org/doc/html/rfc8705#section-3.1[JWT Certificate Thumbprint Confirmation Method] and https://datatracker.ietf.org/doc/html/rfc8705#section-3.2[Confirmation Method for Token Introspection] sections of https://datatracker.ietf.org/doc/html/rfc8705[RFC8705].
1253
+
1254
+
MTLS token binding supports a `holder of key` concept, and can be used to confirm that the current access token was issued to the current authenticated client who presents this token.
1255
+
1256
+
When you use both mTLS and OIDC bearer authentication mechanisms, you can enforce that the access tokens must be certificate bound with a single property, after configuring your Quarkus endpoint and Quarkus OIDC to require the use of mTLS.
<1> Require that bearer access tokens must be bound to the client certificates.
1278
+
<2> TLS registry configuration for Quarkus OIDC be able to communicate with the OIDC provider over MTLS
1279
+
<3> TLS registry configuration requiring external clients to authenticate to the Quarkus endpoint over MTLS
1280
+
1281
+
The above configuration is sufficient to require that OIDC bearer tokens are bound to the client certificates.
1282
+
1283
+
Next, if you need to access both mTLS and OIDC bearer security identities, consider enabling xref:security-authentication-mechanisms#combining-authentication-mechanisms[Inclusive authentication] with `quarkus.http.auth.inclusive=true`.
1284
+
1285
+
Now you can access both MTLS and OIDC security identities as follows:
<1> `SecurityIdentity` always represents the primary mTLS authentication when mTLS is used and an inclusive authentication is enabled.
1319
+
<2> OIDC security identity is also available because enabling an inclusive authentication requires all registered mechanisms to produce the security identity.
1320
+
1321
+
1247
1322
== Authentication after an HTTP request has completed
1248
1323
1249
1324
Sometimes, `SecurityIdentity` for a given token must be created when there is no active HTTP request context.
0 commit comments