Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
[Security] Require entry_point to be configured with multiple authenticators#36575
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
src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AbstractFactory.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/HttpBasicFactory.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
98b949b
tocc876a2
Compare...ny/Bundle/SecurityBundle/DependencyInjection/Security/Factory/GuardAuthenticationFactory.phpShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/FormLoginFactory.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
7169af4
to83c9c3a
CompareBoth test failures appear to be unrelated |
Uh oh!
There was an error while loading.Please reload this page.
Thank you@wouterj. |
@wouterj I haven't had time to investigate further, but this PR breaks auth on my app. I get "Full authentication is required to access this resource." when trying to authenticate. |
Oh, I think#36650 should fix it. Sorry, I finished this patch on my Windows PC to get it ready before the weekend. I'll try to add some tests for the DI stuff in SecurityBundle in some weeks. |
…#36575) (wouterj)This PR was merged into the 5.1-dev branch.Discussion----------[Security] Fix bug introduced in entry_point configuration (#36575)| Q | A| ------------- | ---| Branch? | master| Bug fix? | yes| New feature? | no| Deprecations? | no| Tickets | -| License | MIT| Doc PR | -Commits-------6978471Fixed#36575
@@ -65,7 +67,7 @@ public function create(ContainerBuilder $container, string $id, array $config, s | |||
} | |||
// create entry point if applicable (optional) | |||
$entryPointId = $this->createEntryPoint($container, $id, $config, $defaultEntryPointId); | |||
$entryPointId = $this->createDefaultEntryPoint($container, $id, $config, $defaultEntryPointId); |
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 is the BC break that makes my code fail now.AbstractFactory
is what we use in Connect Bundle:https://github.com/symfonycorp/connect-bundle/blob/master/src/DependencyInjection/Security/Factory/ConnectFactory.php
/cc@wouterj
So, even if I can probably fix it in Connect, I fear that we won't be alone by this problem. Anyone not using Guard is probably extendingAbstractFactory
. That means that we cannot markAbstractFactory
as@internal
.
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.
Thanks for debugging!
That also means we have to find another method name for theEntryPointInterface
interface, to not conflict with the abstract method in this class. I'll do a PR later this evening. See#36661
…d multiple guard entry points (wouterj)This PR was squashed before being merged into the 5.1-dev branch.Discussion----------[SecurityBundle] Fixed entry point service ID resolving and multiple guard entry points| Q | A| ------------- | ---| Branch? | master| Bug fix? | yes| New feature? | no| Deprecations? | no| Tickets | -| License | MIT| Doc PR | n/a@fabpot I am not able to reproduce [the error you reported](#36575 (comment)) in any of my demo applications or in the tests introduced in this PR. The error indicates that no entry point is configured in your application, can you maybe try out this patch (given it now makes a hard error when more than one guard is used)? If it still doesn't work, can you maybe share your firewall configuration?---_build failures are unrelated_Commits-------c756593 Do not make AbstractFactory internal and revert method rename6870a18 Fixed entry point resolving and guard entry point configuration
…d multiple guard entry points (wouterj)This PR was squashed before being merged into the 5.1-dev branch.Discussion----------[SecurityBundle] Fixed entry point service ID resolving and multiple guard entry points| Q | A| ------------- | ---| Branch? | master| Bug fix? | yes| New feature? | no| Deprecations? | no| Tickets | -| License | MIT| Doc PR | n/a@fabpot I am not able to reproduce [the error you reported](symfony/symfony#36575 (comment)) in any of my demo applications or in the tests introduced in this PR. The error indicates that no entry point is configured in your application, can you maybe try out this patch (given it now makes a hard error when more than one guard is used)? If it still doesn't work, can you maybe share your firewall configuration?---_build failures are unrelated_Commits-------c75659350e Do not make AbstractFactory internal and revert method rename6870a18803 Fixed entry point resolving and guard entry point configuration
Uh oh!
There was an error while loading.Please reload this page.
See@weaverryan's comment at#33558 (comment):
Before (one authenticator)
After
Same as before
Before (multiple authenticators)
After
Before (custom entry point service)
After
Same as before