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

Improve CreateFakeJwks #47621

Merged
merged 8 commits into from Oct 31, 2023
Merged

Improve CreateFakeJwks #47621

merged 8 commits into from Oct 31, 2023

Conversation

zirain
Copy link
Member

@zirain zirain commented Oct 27, 2023

@istio-testing istio-testing added do-not-merge/work-in-progress Block merging of a PR because it isn't ready yet. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 27, 2023
@zirain zirain added the release-notes-none Indicates a PR that does not require release notes. label Oct 27, 2023
@zirain zirain closed this Oct 27, 2023
@zirain zirain reopened this Oct 27, 2023
@zirain zirain requested a review from a team as a code owner October 27, 2023 12:58
@istio-testing istio-testing added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 27, 2023
@zirain zirain force-pushed the fake-jwks branch 2 times, most recently from 9103721 to 8c0e089 Compare October 27, 2023 14:05
@zirain zirain requested a review from a team as a code owner October 27, 2023 14:05
@zirain zirain changed the title [WIP]test fake jwks Improve CreateFakeJwks Oct 27, 2023
@istio-testing istio-testing removed the do-not-merge/work-in-progress Block merging of a PR because it isn't ready yet. label Oct 27, 2023
@istio-testing istio-testing added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 28, 2023
// Encode jwksURI with base64 to make dynamic n in jwks
encodedString := base64.RawURLEncoding.EncodeToString([]byte(fakeJwksURI))
return fmt.Sprintf(`{"keys":[ {"e":"AQAB","kid":"abc","kty":"RSA","n":"%s"}]}`, encodedString)
func CreateFakeJwks() string {
Copy link
Member

Choose a reason for hiding this comment

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

Is this a const, can we cache it

Copy link
Member Author

Choose a reason for hiding this comment

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

updated

Copy link
Member

Choose a reason for hiding this comment

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

This is still not stable and will result in XDS draining as we hop between instances every 30min. This is really bad and this exact issue has caused massive production issues for our customers in the past./

This must be static and deterministic.

@istio-testing istio-testing merged commit 968a6f9 into istio:master Oct 31, 2023
28 checks passed
@zirain zirain deleted the fake-jwks branch October 31, 2023 02:07
howardjohn added a commit that referenced this pull request Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes-none Indicates a PR that does not require release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants