-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
[DX] Suggest a hint to any auth-check #4304
Conversation
Suggest a hint that you need a minimum of auth-check to let the voters vote.
I don't understand what you mean |
Voters are used when using ->isGranted. When that's called depends on your code if I'm correct. The security system in general only works when the page is under a firewall, it doesn't depend on the access rules. |
If you have only following security configuration without
|
Of course they won't execute. Defining a firewall allows you to authenticate the user. Voters are not involved in this process at all. They are the authorization system. they are what |
If you implement the IP Blacklist example in a freshly created Symfony app, it doesn't work, since you don't ask for any permissions (as stof pointed out). This is exactly the reason, I suggested this minimal authorization check for IS_AUTHENTICATED_ANONYMOUSLY. If you think, that it bloats this recipe, I could also suggest a small hint instead. Either way I think, that at least a hint is necessary. |
push |
I believe the complete article is wrong. The voter is part of the authorization process, while the article suggests it's part of the authentication process. I think a backlist needs to be implemented by an |
does renaming even help, if I want to get noticed by dx.symfony.com? :) |
Currently, dx.symfony.com only checks labelled issues. It does not yet check issue titles. |
then Ryan might have talked about a future version of dx.symfony.com on the SymfonyCon Madrid. |
Well, it is planned. There is a TODO in the code saying it is not implemented yet |
but am I right, when I say, that I cannot add labels? :) |
@larsborn Yes, only repository collaborators can add or remove labels. |
@@ -197,6 +197,36 @@ application configuration file with the following code. | |||
That's it! Now, when deciding whether or not a user should have access, | |||
the new voter will deny access to any user in the list of blacklisted IPs. | |||
|
|||
Note that the voters are only called, if any access is actually checked. So |
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 comma is not needed here.
However, we should first finish the discussion if the change does make sense at all. |
@weaverryan @stof @iltar can you please share your opinions on my comment:
|
@wouterj cookbook/security/access_control.html IP Blacklisting is mentioned here, seems to me like this is part of the authorization and not authentication.
Right now I can't check if this is still a valid case; I remember that if you login (authenticate) without setting up proper As far as I know, the |
Hey @larsborn! So sorry, I got a little busy :). Some points:
So, I'm going to merge this, but open an issue about this whole article. Thanks! |
Suggest a hint that you need a minimum of auth-check to let the voters vote.