Upgrade JJWT to 0.12.6 and update JwtService for compatibility#384
Merged
R-Sandor merged 3 commits intoFindFirst-Development:mainfrom Jun 11, 2025
Merged
Upgrade JJWT to 0.12.6 and update JwtService for compatibility#384R-Sandor merged 3 commits intoFindFirst-Development:mainfrom
R-Sandor merged 3 commits intoFindFirst-Development:mainfrom
Conversation
Collaborator
|
@reetikg Thanks for the PR, I am going to review this shortly. Just wanted you to see I did see :) |
R-Sandor
approved these changes
Jun 11, 2025
Collaborator
R-Sandor
left a comment
There was a problem hiding this comment.
Thank you 🚀
I pulled everything locally to confirm. Everything is working.
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.
Issue number: resolves #372
Checklist
What is the current behavior?
The project uses JJWT 0.11.5, which allows JWT signing with an RSA key using older, now-deprecated methods. It does not enforce explicit use of cryptographic key types, leading to weaker security and incompatibility with newer JJWT versions.
What is the new behavior?
->Updated JJWT dependencies to version 0.12.6 in server/build.gradle.
->Refactored JwtService:
->Introduced use of the public RSA key explicitly with verifyWith(pubKey) to validate JWTs in compliance with JJWT 0.12.6.
->Ensures cryptographically sound JWT creation and validation, enforcing best practices and improving library compatibility.
->All tests pass successfully and the application builds and runs locally and in Docker.
Does this introduce a breaking change?
1.JWT consumers (any service or client verifying tokens) must update their logic to use the RSA public key to validate tokens.
2.The signing and verification process now uses the updated JJWT 0.12.6 API, which requires explicit key handling (RsaSigner for signing, verifyWith(pubKey) for verification).
3.Any system that relies on decoding or verifying JWTs (e.g., mobile apps, other backend services) must ensure:
4.The token structure/signature may differ slightly under the new signing method — if consumers parse JWTs manually, validation may fail unless updated.
Other information