feat(crypto): accept RS256 in SupportedAlgorithms#4252
Merged
Conversation
The JWS allowlist used by ParseJWT (wallet ingest, VP verification,
OAuth bearer-token parsing) excluded RS256 in favour of PS256. The AET
ZORG-ID issuer always signs soft-cert RSA keys with RS256 and offers no
algorithm knob, so HealthCareProfessionalDelegationCredential and
PatientEnrollmentCredential VCs were rejected at POST /internal/vcr/v2/
holder/{subject}/vc with "token signing algorithm is not supported:
RS256". Accept RS256 on input; outbound signing continues to use PS256.
The network DAG keeps its own narrower allowlist and still rejects
RS256 for transactions. Two tests that asserted RS256 rejection via the
shared allowlist now use HS256 instead.
Closes #4234
Assisted-by: AI
reinkrul
approved these changes
May 12, 2026
Contributor
|
Coverage Impact ⬆️ Merging this pull request will increase total coverage on 🛟 Help
|
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
jwa.RS256tocrypto/jwx.SupportedAlgorithmssoParseJWTaccepts RS256-signed JWS on input (wallet VC ingest, VP verification, OAuth bearer-token parsing).Motivation
The AET ZORG-ID issuer used for
HealthCareProfessionalDelegationCredential/PatientEnrollmentCredentialin the LSPxNuts flows (#4188, #4233) signs all RSA-keyed soft certs with RS256 and exposes no algorithm knob. With the previous allowlist, every credential AET issued was rejected atPOST /internal/vcr/v2/holder/{subject}/vcwith:Verified end-to-end: with this change the AET -> Nuts wallet round-trip (issuance, chain validation, persistence) succeeds.
Closes #4234
Test plan
go test ./...(full suite passes locally)Test_isAlgorithmSupportednow asserts RS256 is acceptedTestParseJWT/unsupported_algorithmrewritten to use HS256 as the rejected algorithmTestService_parseAndValidateJwtBearerToken/wrong_signing_algorithmrewritten to use HS256parser_test.gostill asserts RS256 is rejected for transactions (separate allowlist, unchanged)Assisted-by: AI