-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Security] Fix loading user from UserBadge #51104
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
Hey! I see that this is your first PR. That is great! Welcome! Symfony has a contribution guide which I suggest you to read. In short:
Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change. When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor! I am going to sit back now and wait for the reviews. Cheers! Carsonbot |
6f6bc12
to
99a217f
Compare
The fix is less clean than expected because the new OIDC feature relies on this bug. The Badge user loader used to have priority over the firewall user provider. This was changed so that the OIDC Badge user loader only kicks in when no user provider is set (not sure how, however). So the priorities are now as follows:
Alternative solutions:
|
Can you add a test case please? @vincentchalamon can you have a look please? |
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.
Nice catch! (and sorry for the bug introduced in my PR)
In addition to my review, can you also add a non-regression functional test on AccessTokenTest please?
src/Symfony/Component/Security/Http/AccessToken/Oidc/OidcTokenHandler.php
Show resolved
Hide resolved
src/Symfony/Component/Security/Http/Authenticator/FallbackUserLoader.php
Show resolved
Hide resolved
src/Symfony/Component/Security/Http/Authenticator/FallbackUserLoader.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Security/Http/Authenticator/FallbackUserLoader.php
Outdated
Show resolved
Hide resolved
AccessTokenAuthenticator
Hi all, what can I do to move this PR forward? |
"BC break" is not a proper description when fixing a regression. It doesn't tell which case is solved. |
AccessTokenAuthenticator
Sure, done |
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.
Looks good to me.
Thank you @guillaumesmo. |
This PR was merged into the 6.3 branch. Discussion ---------- [Security] Fix security tests | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Follows #51622 | License | MIT | Doc PR | - Related to issue #51104, after it security bundle at least requires `symfony/security-http:6.3.4` to keep the tests is green Commits ------- 26cff6c Fix security tests
Fixed a breaking change from https://github.com/symfony/symfony/pull/48272/files#diff-de9707bb338188f62878f2ebd42e7a7bf9547f6d0bf07a4fcd9c386c263c601b