Skip to content

Refactor JWT signing algorithm creation#733

Merged
vietj merged 1 commit intomasterfrom
refactor-jwt-signing-algorithm-creation
Dec 11, 2025
Merged

Refactor JWT signing algorithm creation#733
vietj merged 1 commit intomasterfrom
refactor-jwt-signing-algorithm-creation

Conversation

@vietj
Copy link
Member

@vietj vietj commented Sep 25, 2025

Motivation:

JWT requires the creation of signing algorithm to use for the creation and validation of tokens.

This could be used to implement Quic token validation process and thus we could reuse the implementation engine to implement a Quic token validator.

This refactor also ease the creation usage of thread local to replace synchronised blocks around java cryptographic objet non thread safe usage.

Changes:

Extract the sign/verify part into a small package independent of JWT that can be reused in this module.

@vietj vietj added this to the 5.1.0 milestone Sep 25, 2025
@vietj vietj force-pushed the refactor-jwt-signing-algorithm-creation branch 2 times, most recently from d6ecc1e to 8729e0b Compare September 25, 2025 15:07
@vietj vietj requested a review from pmlopes September 25, 2025 15:08
Copy link
Contributor

@pmlopes pmlopes left a comment

Choose a reason for hiding this comment

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

I added a few questions and some nitpicking :)

@vietj vietj force-pushed the refactor-jwt-signing-algorithm-creation branch from 1cb49b1 to 01c6280 Compare September 29, 2025 11:40
@vietj
Copy link
Member Author

vietj commented Sep 29, 2025

@pmlopes please take another look

@vietj vietj force-pushed the refactor-jwt-signing-algorithm-creation branch from 0984480 to 29dc5ea Compare September 30, 2025 19:27
@vietj
Copy link
Member Author

vietj commented Sep 30, 2025

@pmlopes I think we are done with the refactor and the code is ready to be moved to vertx-core as an internal utility

@vietj
Copy link
Member Author

vietj commented Sep 30, 2025

@zyclonite I have a default thread local based version, the reason of not using Netty's fast thread local is because those consume a slot in fast thread local registry and cannot be recycled. Netty fast thread local should be static and here we can only use non static thread local due to the per JWK configuration.

@zyclonite
Copy link
Contributor

sounds reasonable and will work, i think i started using the default for my initial tests as well.

@vietj vietj requested a review from pmlopes October 13, 2025 09:51
Motivation:

JWT requires the creation of signing algorithm to use for the creation and validation of tokens.

This could be used to implement Quic token validation process and thus we could reuse the implementation engine to implement a Quic token validator.

This refactor also ease the creation usage of thread local to replace synchronised blocks around java cryptographic objet non thread safe usage.

Changes:

Extract the sign/verify part into a small package independent of JWT that can be reused in this module.
@vietj vietj force-pushed the refactor-jwt-signing-algorithm-creation branch from d2e05a6 to 6d06a89 Compare December 11, 2025 09:45
@vietj vietj self-assigned this Dec 11, 2025
@vietj vietj merged commit a9d1ad4 into master Dec 11, 2025
6 checks passed
@vietj vietj deleted the refactor-jwt-signing-algorithm-creation branch December 11, 2025 10:54
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.

3 participants