Skip to content

Require that both RS256 and ES256 must be supported if the signature algorithm is not configured#333

Merged
sberyozkin merged 1 commit intomicroprofile:mainfrom
sberyozkin:signature_algorithm_rs_rs256_es256
Feb 27, 2025
Merged

Require that both RS256 and ES256 must be supported if the signature algorithm is not configured#333
sberyozkin merged 1 commit intomicroprofile:mainfrom
sberyozkin:signature_algorithm_rs_rs256_es256

Conversation

@sberyozkin
Copy link
Copy Markdown
Contributor

@sberyozkin sberyozkin commented Jun 20, 2024

This PR is meant to align a situation with a non configured signature algorithm is managed with how it is done for the unconfigured decryption algorithm.

If a decryption algorithm is not configured, both RSA-OAEP and RSA-OAEP-256 encryped tokens must be accepted.

Now, similarly, if a signature algorithm is not configured, both RS256 and ES256 signed tokens must be accepted.

The end goal is to let an MP JWT Bridge JwtAuthenticationMechanismDefinition offer a consistent List representation for both signature and encryption properties

CC @ayoho @jimmy1wu

@sberyozkin sberyozkin requested review from dblevins and starksm64 June 20, 2024 13:30
@sberyozkin sberyozkin added this to the MPJWT-2.2 milestone Jun 20, 2024
@sberyozkin
Copy link
Copy Markdown
Contributor Author

I'll support ii with TCK tests once it is agreed via approvals

@sberyozkin
Copy link
Copy Markdown
Contributor Author

There is a real lot of assertions in TCK tests expecting RS256 by default

@sberyozkin
Copy link
Copy Markdown
Contributor Author

sberyozkin commented Oct 6, 2024

That said, the spec does not require anywhere that the signature algorithm must be injected as a string and not as a set of strings, so I may as well tweak TCK tests to expect a List<String> injection for the signature alg configuration property.

@sberyozkin
Copy link
Copy Markdown
Contributor Author

I've now verified this PR with the smallrye-jwt mpjwt2.2 branch, merging

@sberyozkin sberyozkin merged commit 4b4be22 into microprofile:main Feb 27, 2025
2 checks passed
@sberyozkin sberyozkin deleted the signature_algorithm_rs_rs256_es256 branch February 27, 2025 17:28
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.

2 participants