test: rewrite JwksCacheSpec JWKS cache fixture - #2190
Open
sdelamo wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Refactors JwksCacheSpec to remove flaky auth flows and instead generate JWTs directly from mutable RSA/JWKS test configuration, while preserving the JWKS caching/rotation assertions via the protected /hello endpoint.
Changes:
- Removed
/login,/refresh, mock auth providers, and@Refreshabletoken-generator replacement path. - Added direct access-token generation using
JwtTokenGenerator+ mutableRSASignatureGeneratorConfiguration. - Updated signature configuration fixtures to eagerly (re)generate RSA keys/JWKS on demand (
refreshKey,rotateKid,clearKid).
sdelamo
force-pushed
the
paperclip/mng-294-jwks-cache
branch
from
May 22, 2026 10:25
cfe9ce2 to
2593e48
Compare
|
sdelamo
commented
May 22, 2026
sdelamo
left a comment
Member
Author
There was a problem hiding this comment.
Submitting the pending follow-up reply so the resolved thread has visible context.
✨ This message was AI-generated using gpt-5
This file contains hidden or 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
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.



Closes #2172
Summary
JwksCacheSpecprovider fixtures to generate JWTs directly from mutable RSA/JWKS configuration./login,/refresh, test authentication provider, and@Refreshabletoken-generator path./helloendpoint.Review Notes
5.1.x5.1.0 Releasetype: bug5.1.0 ReleaseghreturnedINSUFFICIENT_SCOPESforaddProjectV2ItemById(projectscope required; token hasread:project), and the local Paperclip plugin tool route returnedBoard access required.sdelamo, the linked GitHub issue creator; GitHub rejected it because the reviewer is also the pull request author.projectVersionhad previously been observed as5.0.1-SNAPSHOT, but the live default and approved target branch are5.1.x, so this PR targets the5.1.0 Releaseboard.PR Assets
No rendered output or generated artifact changed, so no PR-visible asset upload is required.
Verification
./gradlew :micronaut-security-jwt:cleanTest :micronaut-security-jwt:test --tests 'io.micronaut.security.token.jwt.signature.jwks.JwksCacheSpec.JWK are cached' -Ddevelocity.predictiveTestSelection.enabled=false --no-build-cacheResult:
BUILD SUCCESSFUL; 1 selected feature passed.Result: no whitespace errors.
rg '@Refreshable|/login|/refresh|MockAuthenticationProvider|SuccessAuthenticationScenario|Replaces\(TokenGenerator|BearerAccessRefreshToken|password' security-jwt/src/test/groovy/io/micronaut/security/token/jwt/signature/jwks/JwksCacheSpec.groovyResult: no matches.
✨ This message was AI-generated using gpt-5