core
core copied to clipboard
[General] Implement - migrate to Symfony security system.
Q | A |
---|---|
Zikula Version | 2.x.x |
PHP Version | 5.x |
Symfony security system is very powerful and flexible component. We could base our security on Symfony's security to achieve the same functionality and more. Those systems are not compatible by default so a good amount of work and thinking would need to be done to do it. Affected modules are UsersModule, ZAuthModule, GroupsModule and PermissionsModule.
Some resources: http://symfony.com/doc/current/cookbook/security/index.html https://www.youtube.com/watch?v=SVQwBwSk__E
More information's regarding security http://loige.co/symfony-security-authentication-made-simple/ http://www.slideshare.net/kriswallsmith/love-and-loss-a-symfony-security-play
I'm working on it now but as most of the documents states security component is one of most complicated. I have played with plain Symfony + FosUsersBundle and additionally I have checked SonataAdminBundle + SonataUsersBundle - all of those are very inspiring as well as EasyAdminBundle.
So security bundle provides some basic interfaces to use for each aspect of security like UserInterface GroupInterface and much more. FOSUsersBundle makes use of those interfaces but expects you to create your own UserBundle and extend their classes which implement mentioned interfaces. While SonataUserBundle extends FOSUsersBundle and creates another UsersBundle inside Sonata Aplication folder... we may not need to do all those things we may want to make our users module to work directly with Symfony's core security - this is of course only "Users " point of view there is a lot more actually users bit is not even a tip of an iceberg...
maybe relevant, too: https://medium.com/@minompi/how-to-use-two-different-authentications-systems-for-your-symfony-application-fae3d5262e19
want to look at this for 3.0 maybe.
related https://github.com/symfony/symfony/issues/23081
Symfony 5.1 introduced an updated security system. Re-scheduled this ticket for 4.0.
closing as this has been done recently