-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Security] Add concept of required passport badges #40486
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
0e2f3bf
to
a25ab79
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.
Don't we need to update the XSD schema for the XML format ?
src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php
Outdated
Show resolved
Hide resolved
Yes, but we need to do it in 5.2: #40490 (or 5.1 actually, but that's no longer supported) |
@wouterj you will still need an update in this PR to add the |
src/Symfony/Component/Security/Http/EventListener/CheckRequiredBadgesListener.php
Outdated
Show resolved
Hide resolved
a25ab79
to
53d6401
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.
Thank you.
Im happy with this.
I have a question though.. What if I register another listener to the CheckPassportEvent
and it will run stopPropagation()
? Now this event subscriber will never be executed and I wont get any exception. Right?
It is just an observation, it might be out of scope for this PR but I would still ask if there is something we can/should do about this scenario.
53d6401
to
44c9856
Compare
44c9856
to
2a8a101
Compare
Thanks for reminding me :) After #40567, we can do this in a much "cleaner" way. PR updated |
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.
LGTM. The new config option should probably be mentioned in the SecurityBundle' CHANGELOG file though
A badge on a passport is a critical security element, it determines which security checks are run during authentication. Using the `required_badges` setting, applications can make sure the expected security checks are run.
2a8a101
to
01c3bf9
Compare
Thank you @wouterj. |
A badge on a passport is a critical security element, it determines which security checks are run during authentication. Using the
required_badges
setting, applications can make sure the expected security checks are run.