-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Rethink Symfony Security docs #7496
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
Comments
Some time ago, I wrote a few blog posts about security. While they are slightly opinionated, they have helped a lot of people understand the concept of the security bundle/component and how authentication works.
@Ricknox has written a blog post based on the decoupling, with examples and all, but it seems his blog is down (hint hint) You're free to grab what ever content/ideas you want from my blog posts. When I have some time, I might be able to help around as well. |
if it can help, here's a summary of Symfony Authentication, based on Kris Wallsmith's talk: AuthenticationAre you who you say you are?
References |
Maybe it's worth adding a few words of caution regarding FOSUserBundle? Here's an article that says it all (although to be fair this is true for any bundles): Do not use FOSUserBundle. |
Here is the first draft of a diagram presenting the security internals. The goal of this diagram is to map the most important components and their connections. I drew it as I digged through Symfony source code. It is incomplete, however, I would like to have some feedback whether it reflects reality and how it is understandable so far. |
Would it be a good idea to provide some guides on how to build customized Authentication and Authorization system ? I have an application which is already built with the ACL part, user and role (and role to resources mapping) and the security component seem not the right choice even though I have not completely understood how dose it work. Within security component, how can I
I can built my own authentication and authorization system on top of symfony. But I believe it's better to utilize existing component. This is why i came across to security component. Soon after a few hours of reading the documentation, i got more confusion, as stated here #6861 than answers. |
Like @iltar told, the blogpost is at https://ricknox.com/blog/2017/01/decoupling-the-security-entity.html What can I do to help continue this issue? cc/ @javiereguiluz @weaverryan |
This is such a big issue, that I'm not sure where to start honestly! But, I would love to help support people - looking at you @ricknox! ;) - in working towards improving this. What's the first step? We ultimately need to rewrite/revamp the main security chapter. To do that, we should list all of the most problems/tasks that you do with security (@xabbuh says that here: #7293 (comment)). Then, we can rewrite the main article and start to organize the sub-articles (and possible remove some, as I think we should emphasize Guard much more than true custom authentication setups). And unrelated to the docs, we should probably improve the Flex recipe for security: https://github.com/symfony/recipes/blob/master/symfony/security-bundle/3.3/config/packages/security.yaml. This file could have a lot more commented-out options and links to documentation. If we're going to do this, we should move quickly. In a couple of months, we will need to massively update the docs on master anyways, for Flex changes. If we've made some significant changes before then, that's great: it will make that job much easier. If not, we will likely just make some quicker changes to security, but on master only. Cheers! |
Honest (and unpopular) opinion: we shouldn't work on this until the Security code/features are updated/simplified/fixed. |
Tried to go by this documentation page: https://symfony.com/doc/current/security/form_login_setup.html And was getting error: "The child node "providers" at path "security" must be configured." Step of how to fix this should be added to documentation. I found part of anwser here: http://symfony.com/doc/current/security.html#loading-users-from-the-database Login page works now. But on submit again error which can be fixed by this:
|
Closing in favor of #10423, which is making great improvements in Security docs. |
There are some PRs:
There are some issues with ideas:
Now, let's make some decisions about what to do with this.
The text was updated successfully, but these errors were encountered: