Add RSA to JWT API and Generic Enforced Claims#269
Open
erikburt wants to merge 18 commits intoobelisk:mainfrom
Open
Add RSA to JWT API and Generic Enforced Claims#269erikburt wants to merge 18 commits intoobelisk:mainfrom
erikburt wants to merge 18 commits intoobelisk:mainfrom
Conversation
obelisk
requested changes
Feb 17, 2026
Owner
obelisk
left a comment
There was a problem hiding this comment.
Looks right. Needs a test added to test_jwt though
Author
|
I can split this into 2 PRs if preferred. |
obelisk
requested changes
Feb 19, 2026
I added JWT validation to the tests, however jsonwebtoken dependency expects a JS runtime when compiled to WASM. This causes errors when trying to call it from an LLVM/cranelift env.
19164bb to
1e5b37c
Compare
obelisk
approved these changes
Feb 26, 2026
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.
This PR accomplishes 2 things.
ECDSA256.key_typefield to a key's configenforced_claimstoJwtConfig, and removesenforced_audaud.Changes
JwtConfigRawfor initial deserialization.jsonwebtoken::EncodingKeyparameter, which is not easily deserialized to directly when there's multiple possible key types.EncodingKey::from_ec_pemJwtConfigRawstruct, and then map that to the slightl modifiedJwtConfigstruct.enforced_claims, replacing more specificenforced_audfunctionalityenforced_claimsfunctionalityTesting
Ran the tests locally, and are passing.
Breaking Changes
JwtConfignow requires mandatorykey_type- possible values arees256, andrs256.enforced_audhas been removed from theJwtConfig. You must now useenforced_claims.audinsteadJwtParamsincludesaud, and it doesn't match the key'senforced_claims.aud(if present), then it will throw an errorenforced_audif it was set, and ignoringJwtParams.aud(ie. no error)