Support for "Curity style" Phantom Tokens #1358
thomasdarimont
started this conversation in
Ideas
Replies: 1 comment 2 replies
-
|
This OAuth 2 .0 use case is covered by using mod_oauth2 combined with mod_sts , in an architecturally proper way rather than (ab-)using the token introspection endpoint for this; FWIW: mod_auth_openidc is an OpenID Connect RP module and it supports propagating claims in a (self-)signed JWT, see: https://github.com/OpenIDC/mod_auth_openidc/blob/v2.4.18.1/auth_openidc.conf#L862-L870 |
Beta Was this translation helpful? Give feedback.
2 replies
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Curity supports a token translation pattern called "Phantom Token" that allows an API gateway to exchange an opaque access token for a JWT-based access token by using the token introspection endpoint with the request header "Accept: application/jwt".
The Curity server will respond with the JWT string of the access token.
Although not standardized, this, IMHO, is a neat integration pattern that allows exposing opaque tokens to external token consumers, while using enriched tokens for internal backend services behind an API gateway.
Could mod_auth_openidc provide similar capabilities?
I'm thinking of something along the lines:
There are some implementations for API gateways and HTTP servers for this pattern already, e.g., for nginx: https://curity.io/resources/learn/nginx-phantom-token-module/.
As a side note:
Keycloak can also be used to leverage the Phantom Pattern via Lightweight Access Tokens (minimal JWT access tokens) as it supports the Accept: application/jwt header in the token response. When generating the internal token, Keycloak can add additional information to the token.
One caveat with Keycloak: currently, Keycloak returns the JWT as a "jwt" claim in the regular token introspection response. However, I'll raise an issue to make this configurable so that it returns a proper JWT in the response body.
With a small custom Keycloak extension that behaves as expected by the Phantom Token pattern, I can successfully use the Nginx-based Phantom Token integration.
Would something like this make sense for mod_auth_openidc as well?
Beta Was this translation helpful? Give feedback.
All reactions