feat: oidc background token refresh#23727
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 62.21% 62.22%
========================================
Files 351 351
Lines 49231 49346 +115
========================================
+ Hits 30629 30705 +76
- Misses 15677 15698 +21
- Partials 2925 2943 +18 ☔ View full report in Codecov by Sentry. |
6452b72 to
d0d9cc7
Compare
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 <mcutsail15@apple.com>
Signed-off-by: Mike Cutsail <mcutsail15@apple.com>
Signed-off-by: Mike Cutsail <mcutsail15@apple.com>
d5b6902 to
5c7be8d
Compare
Signed-off-by: Mike Cutsail <mcutsail15@apple.com>
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 <mcutsail15@apple.com> # Conflicts: # server/server.go # util/oidc/oidc.go # util/oidc/oidc_test.go
Signed-off-by: Mike Cutsail <mcutsail15@apple.com>
Signed-off-by: Mike Cutsail <mcutsail15@apple.com>
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: