Skip to content

Upgrade jjwt 0.11.2 -> 0.12.6 - #194

Open
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1785169772-upgrade-jjwt-0126
Open

Upgrade jjwt 0.11.2 -> 0.12.6#194
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1785169772-upgrade-jjwt-0126

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Jul 27, 2026

Copy link
Copy Markdown

Summary

Bumps jjwt-api/jjwt-impl/jjwt-jackson to 0.12.6 and migrates DefaultJwtService to the 0.12 API (the 0.11 parserBuilder()/parseClaimsJws() path is gone).

-signatureAlgorithm = SignatureAlgorithm.HS512;
-signingKey = new SecretKeySpec(secret.getBytes(), signatureAlgorithm.getJcaName());
+signingKey = Keys.hmacShaKeyFor(secret.getBytes());

-Jwts.builder().setSubject(id).setExpiration(exp).signWith(signingKey)
+Jwts.builder().subject(id).expiration(exp).signWith(signingKey)

-Jwts.parserBuilder().setSigningKey(signingKey).build().parseClaimsJws(token).getBody()
+Jwts.parser().verifyWith(signingKey).build().parseSignedClaims(token).getPayload()

Note on the key: the old code hard-coded the JCA name HmacSHA512 on the SecretKeySpec, but signWith(key) in 0.11 still selected the algorithm purely from key length. In 0.12 a key whose JCA name says HS512 while being shorter than 512 bits no longer resolves to any algorithm, which would break the 480-bit secret used in DefaultJwtServiceTest. Keys.hmacShaKeyFor picks the JCA name from the key length, preserving the previous behavior (HS512 for the 688-bit configured jwt.secret).

Verification: ./gradlew clean test spotlessCheck — 68 tests, 0 failures, Spotless clean. jacocoTestCoverageVerification still fails at 0.33 line coverage, which is pre-existing on main (the repo's test command excludes that task).

Link to Devin session: https://partner-workshops.devinenterprise.com/sessions/21599492e24a4fff86cd548540f5e681
Requested by: @mbatchelor81


Open in Devin Review

@mbatchelor81 mbatchelor81 self-assigned this Jul 27, 2026
@devin-ai-integration

Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

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.

1 participant