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

Add testParseJWKSWithEmptyKeysArray #233

Merged
merged 7 commits into from
Oct 8, 2024

Conversation

maxlambrecht
Copy link
Member

@maxlambrecht maxlambrecht commented Apr 6, 2024

Description:

Introduces a unit test for JwtBundle.parse to verify correct handling of JWKS documents with an empty keys array, ensuring our parsing logic handles such edge cases without errors. This addition improves the reliability of our JWKS processing against unusual but valid JWKS configurations.

TrustDomain trustDomain = TrustDomain.parse("example.org");
String jwksEmptyKeysJson = "{\"keys\": []}";
byte[] bundleBytes = jwksEmptyKeysJson.getBytes(StandardCharsets.UTF_8);

Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change

nit: extra whitespace

@maxlambrecht maxlambrecht merged commit 026f3c5 into spiffe:main Oct 8, 2024
10 checks passed
@maxlambrecht maxlambrecht deleted the add-jwks-edge-case-test branch October 8, 2024 14:58
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