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

Generalize JWKS refresh in middleware #150

Merged
merged 11 commits into from
Jan 29, 2024
Merged

Conversation

ThibsG
Copy link
Contributor

@ThibsG ThibsG commented Jan 19, 2024

#86 was refreshing the JWKS only in Google CSE endpoints, which was later than in the Actix middleware, where the tokens are first evaluated.

This PR proposes to fix this by moving the refreshing call in the Auth middleware when a fail occurs, and propagates the same JWKS structure to the Google CSE endpoints.

The JWKS refresh can only occur once within a time interval currently set to 1 minute.

@ThibsG ThibsG requested review from Manuthor and ccorsin January 19, 2024 10:45
@ThibsG ThibsG force-pushed the generalize_jwks_refresh branch 3 times, most recently from 9731c03 to ec1ce6e Compare January 19, 2024 13:14
@Manuthor Manuthor changed the base branch from main to develop January 19, 2024 14:12
@ThibsG ThibsG force-pushed the generalize_jwks_refresh branch 5 times, most recently from 7cbcc2a to b84543d Compare January 23, 2024 10:07
Copy link
Contributor

@Manuthor Manuthor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great!
could you also add an entry in the changelog?

@ThibsG ThibsG force-pushed the generalize_jwks_refresh branch 2 times, most recently from 53844c8 to 149a711 Compare January 25, 2024 09:31
@ThibsG ThibsG force-pushed the generalize_jwks_refresh branch from 149a711 to 59bce77 Compare January 29, 2024 08:29
@ThibsG ThibsG merged commit 32e7006 into develop Jan 29, 2024
@ThibsG ThibsG deleted the generalize_jwks_refresh branch January 29, 2024 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants