Replies: 1 comment 18 replies
-
/cc @geoand (kubernetes), @iocanel (kubernetes), @pedroigor (bearer-token,oidc), @sberyozkin (bearer-token,jwt,oidc) |
Beta Was this translation helpful? Give feedback.
18 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Consider the following setup:
The quarkus application is running in an azure kubernetes cluster and is registered with the azure oidc provider (EntraID). The pod in which the application runs is configured to use azure workload identity.
As a result the kubernetes cluster "injects" a JWT token into the pod, available at a specific filesystem path
/var/run/secrets/azure/tokens/azure-identity-token
.This JWT token can be used instead of the usual client-secret to authenticate the client/application against the oidc provider to get an access token (RTF-7523, Section 2.2)
The request to obtain a valid access_token from the oidc using the injected jwt as an assertion parameter instead of the client_secret is documented here: Access token request with a federated credential
The injected token is only valid for a short period of time (default 1h) and only available inside the kubernetes cluster. This increases security, because there is no need to configure a static client secret anymore.
One way would be to implement a simple custom client request filter to exchange the token, check for expiration, handle caching...
But the whole process looks so similar to what has already been implemented for the oidc client filter documented here: Quarkus OIDC Supported Token Grants. But the static properties configuration is not enough, because the token is dynamic and must be read from the file-system again after expiration.
Any ideas how to re-use the existing oidc client filter implementations in this case?
Beta Was this translation helpful? Give feedback.
All reactions