-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
[Security] Add an option to allow path instead of service for firewalls entry points (#39520) #41339
base: 7.3
Are you sure you want to change the base?
[Security] Add an option to allow path instead of service for firewalls entry points (#39520) #41339
Conversation
50afbac
to
7e8885a
Compare
Hey! I think @edefimov has recently worked with this code. Maybe they can help review this? Cheers! Carsonbot |
7e8885a
to
a19c0bd
Compare
Tests fixed |
Could we make |
Hi, following the previous comment of @chalasr, we can not decide on what to do : do we keep the current option The first one allows to not add a new option, which is nice, but can be a bit complicated to read and debug. The second is clearer, but it add a new option and there is already a lot of option in the security. Do you have an opinion on the topic ? Thank you very much ! |
@chalasr see #39520 (comment) . I think the |
a19c0bd
to
6dfcb28
Compare
6dfcb28
to
2f60a6a
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.
The bundle+component changelogs need to be updated to mention this change
src/Symfony/Component/Security/Http/EntryPoint/RouteAuthenticationEntryPoint.php
Outdated
Show resolved
Hide resolved
@@ -440,6 +440,15 @@ private function createFirewall(ContainerBuilder $container, string $id, array $ | |||
// Determine default entry point | |||
$configuredEntryPoint = $firewall['entry_point'] ?? null; | |||
|
|||
// When a entry point path is configured, it overrides the default entry point |
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.
What if one set both entry_point
and entry_point_path
at the firewall level? Should we forbid such mix for clarity? A test would be nice for that case btw
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.
Currently, if both options are set, the entry point path overrides the entry point.
It could be a good thing to throw an exception if both are set to avoid confusion and ease debug.
I try to add a test if I had the time.
2f60a6a
to
9664ebb
Compare
9664ebb
to
b5ba905
Compare
Hi, this PR aims to fix #39520. It creates a new option in the firewall configuration section "entry_point_path", allowing to have a common entry point using a route instead of a service id.
Thanks !