-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[SecurityBundle] Allow to specify a RequestMatcher directly in an ACL definition #44670
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
[SecurityBundle] Allow to specify a RequestMatcher directly in an ACL definition #44670
Conversation
I am going on holidays, as said in the Symfony Slack, I was unable to do a If someone wants to finish the work, go for it, otherwise I'll finish in January :-) |
Note that 6.1 is our current feature branch. 5.4 is closed for features. |
So no way of having this new small feature before SF6.1? That would be a shame imo |
Yes. We only merge features in the unstable branch. For already released versions, stability is top priority so there should be as little changes in each patch release as possible (and definitely no new features). |
No way, sorry. |
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.
Thank you for adding this feature! Adding support for a custom request matcher makes sense to me.
src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/SecurityExtensionTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php
Show resolved
Hide resolved
src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/SecurityExtensionTest.php
Show resolved
Hide resolved
The final failing checks fail on issues that I don't think are related to my code. What can I do about it? |
@derrabus Do you have time to review the final changes? Should I implement the configuration exception you were talking about? |
@chalasr I see that your review is required too here :-) |
Looks good to me once Alexander's comment is addressed (please ping if the given material is not enough) |
I still have a failing check with Psalm, but the error seems to be on loading Psalm, so I don't know what I can do about it! |
Can you update the SecurityBundle's changelog? The psalm issue is unrelated. |
Thank you @TristanPouliquen. |
…stanPouliquen) This PR was squashed before being merged into the 6.1 branch. Discussion ---------- [Security] Reference the new request_matcher option Linked to symfony/symfony#44670 <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/releases for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `5.x` for features of unreleased versions). --> Commits ------- f0432c4 [Security] Reference the new request_matcher option
This PR allows users to directly specify a service reference in the definition of an access control rule. The given service MUST implement the
RequestMatcherInterface
.The goal is to be able to pass custom request matchers, with more complex rules than the standard path, host, ips, ... options to have the same flexibility as the user has in defining his/her firewalls.