Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add optional refresh token timer to OIDC client #46673

Open
sberyozkin opened this issue Mar 7, 2025 · 1 comment
Open

Add optional refresh token timer to OIDC client #46673

sberyozkin opened this issue Mar 7, 2025 · 1 comment
Labels
area/oidc kind/enhancement New feature or request

Comments

@sberyozkin
Copy link
Member

Description

Based on #46644.

Right now, when the token expires, OIDC client needs to refresh it, with the current request having to wait.
In general, I believe it is not a real performance concern because it can happen once every access token lifespan period of time which is usually quite long. But if it were possible for the OIDC client never pause, with the timer refreshing expired tokens asynchronously, then it could be useful in some performance critical applications.

We already have something similar with @michalvavrik adding a timed Kubernetes JWT bearer token check.

Implementation ideas

Add an optional property such as quarkus.oidc-client.refresh-interval, it is configured, a Vertx timer is started, may be in AbstractTokensProducer and it will periodically call getTokens and subscribe to Uni. May be, rather than having a timer per client, OidcClientsImpl would have a single timer iterating over all registered clients.

Copy link

quarkus-bot bot commented Mar 7, 2025

/cc @geoand (kubernetes), @iocanel (kubernetes), @pedroigor (oidc)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/oidc kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant