Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Security] OidcTokenHandler support JWKSet#51665
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
5d262c7 to8a422abCompare
stof left a comment
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.
This misses updating the changelog to mention the addition of support for the RS256 algorithm and thejwks_url option
...y/Bundle/SecurityBundle/DependencyInjection/Security/AccessToken/OidcTokenHandlerFactory.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
...ony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/SignatureAlgorithmFactory.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Security/Http/AccessToken/Oidc/OidcTokenHandler.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Security/Http/Tests/AccessToken/Oidc/OidcTokenHandlerTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
89572fe toa13393cComparelouismariegaborit commentedSep 15, 2023
Changelog added. |
81d8d0d to2cc0fc5CompareUh oh!
There was an error while loading.Please reload this page.
2a29ae9 to7fee273Compareea1da07 to736f7b3Compare6b8ccf9 toaa228fcCompareSpomky commentedJan 30, 2024
Indeed, the JWKSet may change from time to time. It completely depends on the distant service policy and keys may rotate on a periodic manner or be revoked.
In the past, such featurewas implemented, but removed because of caching/performance issues. |
louismariegaborit commentedJan 31, 2024
Thanks@nicolas-grekas and@Spomky for review. You're right. Let's start by supporting JWKSet from a file. The OidcTokenHandler class is final. Can I change the construct signature to replace the type of the first argument with AlgorithmManager or I must keep the type Algorithm and add a deprecate notice to accept only AlgorithManager in 8.0 ? WDYT ? |
stof commentedJan 31, 2024
@louismariegaborit you must change the type to a union type of the old and new one, and trigger a deprecation when the old one is passed. |
8ed8001 toe124d0aCompareb69e465 to5d9a3acComparelouismariegaborit commentedJan 31, 2024
@stof Can I rename the argument ? |
5d9a3ac to4066312Comparelouismariegaborit commentedFeb 2, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
As we discuss with@Spomky and@vincentchalamon in the#53682 (comment) PR/comment, we propose an update of the oidc_token_handler in the SecurityBundle to authorize JWKSet and multiple algorithms. One proposal would be to replace the algorithm and key properties with algorithms and keys to process arrays. WDYT ? (cc@nicolas-grekas) |
louismariegaborit commentedApr 3, 2024
Spomky commentedApr 4, 2024
Agreed! |
louismariegaborit commentedApr 4, 2024
Duplicate#53682 |
Uh oh!
There was an error while loading.Please reload this page.
This PR can supports now :
RSA256 algorithm if(dedicated PR[Security] Support RSA algorithm signature for OIDC tokens #53682)web-token/jwt-signature-algorithm-rsapackage is installed.The need comes from the validation of an AWS Cognito Token.
Amazon gived a url to get JWKSet and signature is RS256.
P.S.: It's my first feature PR on Symfony. The description may be missing information or the changes may be clumsy. 😊