-
Notifications
You must be signed in to change notification settings - Fork 6.5k
feat: oidc background token refresh #23727
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
base: master
Are you sure you want to change the base?
Conversation
❌ Preview Environment deleted from BunnyshellAvailable commands (reply to this comment):
|
8d3a313 to
85d98b8
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #23727 +/- ##
==========================================
+ Coverage 60.89% 60.91% +0.02%
==========================================
Files 351 351
Lines 60489 60625 +136
==========================================
+ Hits 36832 36931 +99
- Misses 20736 20766 +30
- Partials 2921 2928 +7 ☔ View full report in Codecov by Sentry. |
6452b72 to
d0d9cc7
Compare
|
@agaudreault The PR has been updated to remove the OTEL feature for now and is ready for review. |
|
@devopsjedi can you resolve conflicts and ping me on here/slack when it is done. 🙇 |
Rebased and resolved 🫡 @agaudreault |
agaudreault
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM. Few nitpicks and maybe a refactor on how the cache is managed would help clarify the ccode. Please don't force push follow up commit.
Thanks- updated based on feedback |
|
Might want to update the PR description that OTEL was pulled out. Thanks for working through this though! |
|
Yes! thank you so much for chasing this down! We are very appreciative 👏 |
Adds background refresh functionality for OIDC tokens to prevent session timeouts and improve user experience. The refresh happens automatically when tokens are near expiration based on configurable threshold settings. Key changes: - Add OIDCRefreshTokenThreshold configuration - Implement CheckAndRefreshToken in OIDC client - Add token refresh logic to session verification - Update session manager to pass context for token operations Signed-off-by: Mike Cutsail <[email protected]>
Signed-off-by: Mike Cutsail <[email protected]>
Signed-off-by: Mike Cutsail <[email protected]>
d5b6902 to
5c7be8d
Compare
Signed-off-by: Mike Cutsail <[email protected]>
Adds background refresh functionality for OIDC tokens to prevent session timeouts and improve user experience. The refresh happens automatically when tokens are near expiration based on configurable threshold settings. Key changes: - Add OIDCRefreshTokenThreshold configuration - Implement CheckAndRefreshToken in OIDC client - Add token refresh logic to session verification - Update session manager to pass context for token operations Signed-off-by: Mike Cutsail <[email protected]> # Conflicts: # server/server.go # util/oidc/oidc.go # util/oidc/oidc_test.go
Signed-off-by: Mike Cutsail <[email protected]>
Signed-off-by: Mike Cutsail <[email protected]>
5c7be8d to
6710f9f
Compare
|
@agaudreault Updated based on your latest feedback |
Closes #12189
Adds support for background OIDC token refresh
refreshTokenThresholdfield tooidc.configspec. When authentication middleware verifies the current token, the remaining lifetime of the token is compared to the refresh token threshold. The token is refreshed by the server when the lifetime is lower than the threshold and a new token is returned to the client.- Adds OpenTelemetry tracing for authentication flowTested against keycloak.
Checklist: