-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Security] Support RSA algorithm signature for OIDC tokens #53682
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
bc94265
to
9c46285
Compare
...ony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/SignatureAlgorithmFactory.php
Outdated
Show resolved
Hide resolved
84e1317
to
6b4e728
Compare
Hi, Is it possible to put this PR on hold? |
Can you test with Also, because the new Note: |
45ddac6
to
2a7b316
Compare
Hi @Spomky This seems ok. I removed also I will look so that developers picked the algorithms they need. I will update the PR title when we validate the work. |
2a7b316
to
d9c3714
Compare
@Spomky I did a try. WDYT ? |
Indeed, most of @vincentchalamon do you have any recommendation to have a better algorithm support architecture. # config/packages/security.yaml
security:
firewalls:
main:
access_token:
token_handler:
oidc:
# Algorithms used to sign the JWS
algorithms:
- 'ES256'
- 'RS256'
- 'PS256'
# A JSON-encoded JWK
key: '{"kty":"...","k":"..."}' From my understanding, it will require:
Any ideas on this? |
@Spomky I started this work in another PR (#51665). |
@Spomky on an OIDC server (e.g.: Keycloak), is it possible to allow multiple algorithms on a single realm? If true, multiple algorithms configuration could be interesting, indeed. I'm just wondering if the If false, I don't think we should allow multiple algorithms configuration as multiple realms are not supported. |
...ony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/SignatureAlgorithmFactory.php
Outdated
Show resolved
Hide resolved
...y/Bundle/SecurityBundle/DependencyInjection/Security/AccessToken/OidcTokenHandlerFactory.php
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with minor CS fixes
0faa51a
to
b179b40
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you look at failing tests?
949281a
to
d930172
Compare
Hi @chalasr, It seems to be fine now. |
15b26b2
to
0a87377
Compare
0a87377
to
3109350
Compare
Thank you @louismariegaborit and @Spomky. |
Add support for RSA signature algorithm for OidcTokenHandler.
Amazon Cognito uses RS256 algorithm for its tokens.