-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Security] Deprecated AuthenticationTrustResolver #35860
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
We've gradually marked classes and methods as being internal and/or final. I think we've never really done that for the Security component. But it's never too late. |
@fabpot if we make things internal in 5.1, can we make BC breaking changes in 5.3/5.4? The BC promise says "Classes that received the |
Currently there's a limited way of implemented a custom Authentication level. Before this implementation is deprecated, can we provide a way to add your own? For reference, this package is using a custom trust resolver to get into a "need 2 factor code" authentication level: https://github.com/scheb/two-factor-bundle/blob/728b743c03560f7f0aff53599f33e7e2a99f6868/Security/Authentication/AuthenticationTrustResolver.php When removing this class in the future, there's no (easy) way to not be fully authenticated with a "custom level". |
Oh, that's interesting. What I would love to do is introducing the concept of "level of assurance" as described in #28868 (comment) . This would fully replace the Yet, I don't know about anyone working on that and I for sure don't have time to work on it atm. So I think the best option would be to postpone this PR and deprecated the |
@wouterj What's your thoughts about this one? Shall we close? |
Yes, let's close. At least at this moment, we can't remove the class (due to MFA usages). Sorry for not checking my stale PRs every so often! |
After #26981 , the trust resolver only contains 3 methods doing an
instanceof
check. I think it's better to deprecate this class and its usages. A user can use the attributes of #31189 or check instance of the token instead. Customizing the token FQCN used for RememberMe/Anonymous is very discouraged and if you do, I would highly recommend extending from them.This does however result in quite some changes in the constructor arguments of some listeners. This poses the question whether or not it's worth it and if we really need to keep BC here (tbh, I think all firewall listeners can be considered internals, but we never marked them as such 😢 ).