Upgrade io.jsonwebtoken JJWT family 0.11.2 -> 0.12.6 - #201
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
Upgrade io.jsonwebtoken JJWT family 0.11.2 -> 0.12.6#201devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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.
Summary
Upgrades the JJWT artifact family
0.11.2 -> 0.12.6(latest stable on Maven Central, published 2024-06-21) and migratesDefaultJwtServiceto the 0.12 fluent API, which dropped theset*builder setters andJwts.parserBuilder(). No Spring Boot / plugin / other dependency versions were touched.Coordinate diff (
build.gradle)BOM /
extoverrideNone needed. The Spring Boot 2.6.3 dependency-management BOM does not manage
io.jsonwebtoken, so the literal versions win outright — confirmed below. JJWT 0.12.6 targets Java 8+ and has no Spring dependency, so it is compatible with the Boot 2.6.3 / Java 11 ceiling.dependencyInsightevidence (target version actually resolved)All three artifacts resolve at 0.12.6 — no conflict-resolution downgrade, no split family.
API migration (
DefaultJwtService)Only one file in
src/referencesio.jsonwebtoken(verified bygrep -rn "io.jsonwebtoken" src/).Key construction now uses the library's own
Keys.hmacShaKeyFor(...)instead of a hand-builtSecretKeySpecwith a hard-codedHmacSHA512JCA name. This is behaviour-preserving, not a weakening: both 0.11'ssignWith(Key)andKeys.hmacShaKeyForderive the HMAC-SHA variant from the key's bit length, so the signing algorithm for a given secret is unchanged.Keys.hmacShaKeyForadditionally fails fast on secrets under 256 bits (JWA minimum).Key-size note (no change made, no security behaviour weakened):
jwt.secretinsrc/main/resources/application.propertiesis 86 bytes / 688 bits — above the 512-bit HS512 minimum, so it keeps signing with HS512.DefaultJwtServiceTestis 60 bytes / 480 bits, which selected HS384 before this change and still selects HS384 after it. No test assertion, secret, or threshold was modified.Also updated the one stale
0.11.2reference in the repo's dependency table (.agents/skills/java-engineering-excellence/SKILL.md).Verification gate
Baseline recorded first-hand on untouched
main(3037fa5) with the identical command: 68 tests, 0 failures, 0 errors, 0 skipped, BUILD SUCCESSFUL. Post-change counts are identical — same test count, zero new failures.spotlessApplywas run before committing.Pre-existing on base, not addressed here
jacocoTestCoverageVerificationfails onmainat ~0.33 instruction coverage against the 0.80 rule inbuild.gradle. CI runs the suite with-x jacocoTestCoverageVerification, and this gate is excluded here too. The threshold was not lowered and no tests were added to raise coverage.src/test/java/io/spring/selenium, separateseleniumTestTestNG task) are excluded from thetesttask and are not part of this gate — unchanged by this PR.Link to Devin session: https://partner-workshops.devinenterprise.com/sessions/6ee60a8e7e1040849adec21288dc9ff0
Requested by: @mbatchelor81