-
Notifications
You must be signed in to change notification settings - Fork 360
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
fix: remove the default retry policy for jwks fetch #4802
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Huabing Zhao <[email protected]>
arkodg
previously approved these changes
Nov 28, 2024
Signed-off-by: Huabing Zhao <[email protected]>
arkodg
reviewed
Nov 28, 2024
Co-authored-by: Arko Dasgupta <[email protected]> Signed-off-by: Huabing Zhao <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4802 +/- ##
==========================================
+ Coverage 65.59% 65.65% +0.05%
==========================================
Files 211 211
Lines 32001 32000 -1
==========================================
+ Hits 20992 21010 +18
+ Misses 9767 9750 -17
+ Partials 1242 1240 -2 ☔ View full report in Codecov by Sentry. |
arkodg
approved these changes
Nov 29, 2024
zirain
approved these changes
Nov 29, 2024
zhaohuabing
added a commit
to zhaohuabing/gateway
that referenced
this pull request
Nov 29, 2024
* remove the default retry policy for jwks fetch Signed-off-by: Huabing Zhao <[email protected]> * fix gen Signed-off-by: Huabing Zhao <[email protected]> * Update release-notes/current.yaml Co-authored-by: Arko Dasgupta <[email protected]> Signed-off-by: Huabing Zhao <[email protected]> --------- Signed-off-by: Huabing Zhao <[email protected]> Co-authored-by: Arko Dasgupta <[email protected]> (cherry picked from commit 526a05f) Signed-off-by: Huabing Zhao <[email protected]>
zhaohuabing
added a commit
to zhaohuabing/gateway
that referenced
this pull request
Nov 29, 2024
* remove the default retry policy for jwks fetch Signed-off-by: Huabing Zhao <[email protected]> * fix gen Signed-off-by: Huabing Zhao <[email protected]> * Update release-notes/current.yaml Co-authored-by: Arko Dasgupta <[email protected]> Signed-off-by: Huabing Zhao <[email protected]> --------- Signed-off-by: Huabing Zhao <[email protected]> Co-authored-by: Arko Dasgupta <[email protected]> (cherry picked from commit 526a05f) Signed-off-by: Huabing Zhao <[email protected]>
zhaohuabing
added a commit
that referenced
this pull request
Nov 29, 2024
* use a waitGroup instead of an enabled channel in the status updater (#4809) use a waitGroup instead of a channel in the status updater * use a waitGroup to synchronize to the `Send` method that the status updater is enabled and ready for updates Signed-off-by: Arko Dasgupta <[email protected]> (cherry picked from commit 36939dc) Signed-off-by: Huabing Zhao <[email protected]> * fix: remove the default retry policy for jwks fetch (#4802) * remove the default retry policy for jwks fetch Signed-off-by: Huabing Zhao <[email protected]> * fix gen Signed-off-by: Huabing Zhao <[email protected]> * Update release-notes/current.yaml Co-authored-by: Arko Dasgupta <[email protected]> Signed-off-by: Huabing Zhao <[email protected]> --------- Signed-off-by: Huabing Zhao <[email protected]> Co-authored-by: Arko Dasgupta <[email protected]> (cherry picked from commit 526a05f) Signed-off-by: Huabing Zhao <[email protected]> --------- Signed-off-by: Arko Dasgupta <[email protected]> Signed-off-by: Huabing Zhao <[email protected]> Co-authored-by: Arko Dasgupta <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The current jwt implementation in the SecurityPolicy uses a default retry policy. While this default is reasonable from the perspective of a single Envoy, it could potentially overwhelm the JWKS server if multiple Envoys and SecurityPolicy instances are configured with the same JWKS.
This default retry policy can be removed as EG already enables https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/filters/http/jwt_authn/v3/config.proto#extensions-filters-http-jwt-authn-v3-jwksasyncfetch with a failed_refetch_duration of 1s, which will refetch the jwks every 1s if failed.
Fixes #4791
Release Notes: Yes