I have a website working perfectly with Symfony 4.3 with security active and different roles for different users. Everything works perfectly.
Today I decide to upgrade website to Symfony 4.4 then 5.0 then 5.1.
Since 5.0, security hangs: I'm correctly logged in, but all tests (is_granted from twig for example) do not work anymore, like if default voter return false. Roles are correctly reads from DB (checked with a dump).
I think it can comes from a config file but can't figure which one...
BTW: I follow explanations from SymfonyCasts
How can I fix this issue?
Related
I've managed setting up a development environment running Symfony and sulu cmf. For production I have done the same, but then both Symfony and sulu with production-environment setting.
Everything is running fine except one small issue. When I want to log in, Chrome console shows me 'Invalid CSRF token'
I have cleared the cache of both browser and server, but it does not make any difference.
Any suggestions/experience with this issue?
I have set up Symfony with LDAP authentication and it works just fine.
Since people are logged in on their computers with just the same credentials, I'm wondering if there's a way to pass those credentials through to Symfony so that the user doesnt have to log in manually anymore.
Hopefully, someone can help me out. :)
Thanks in advance
What you want to do is called SingleSignOn or SSO. It usually uses something like Kerberos which in turn can use LDAP as backend to store the passwords and the user-informations.
But it usually requires specifically adapted WebServers and Browsers to work out as expected. If you are working in a plain Windows-Environment with IE as Browser and IIS as Webserver it might be easier to implement than in a mixed environment.
I'd suggest you ask your favourite search-engine for SSO or Kerberos and I'm sure you'll find some solutions. I've done a quick search myself which turned up this:
Kerberos authentication with Symfony2
http://share.ez.no/forums/general/automatic-user-logon-sso-with-active-directory-ldap-ntlm
Authentication into Symfony 2.0 from an external System
I try to use FR3DLdapBundle and FosUserBundle for user authentication and login in my Symfony2 application.
I do not have any experiences with Active directory, LDAP and how to integrate it with Symfony2 application, I found that FR3DLdapBundle tutorial/manual is hard to understand and leak of basic information about how to use it properly.
I have set up everything based on their tutorial at https://github.com/Maks3w/FR3DLdapBundle/blob/master/Resources/doc/index.md
and I also have read their documentation but I still do not understand about how to make user login using it.
for your information :
My Symfony version is 2.7
Active Directory server info is metioned hore http://www.forumsys.com/tutorials/integration-how-to/ldap/online-ldap-test-server/
I am on UBuntu Linux 14.04
My Question is :
How to create user login with FR3DLdapBundle and FosUserBundle for the users that exist in ldap.forumsys.com server (http://www.forumsys.com/tutorials/integration-how-to/ldap/online-ldap-test-server/) ?
Any help will be very appreciated.
Thank's
I have almost complete project. I've created it using XAMPP (Windows XP).
Finally I've set up Ubuntu server and moved my project to it.
Everything works fine except one. When I want to register new user using web form I get no errors, and user is not added to database (mysql).
I added new user with command line (fos:user:create) and it works.
When I log in with this user I can update its profile. It works.
The only thing that isn't working is registering new users with web form.
I've updated DG configuration in parameters.yml.
I use Symfony 2.3.1 on both XAMPP and Ubuntu Server. I use the same FOSUserBundle version.
Any ideas?
I've searched internet and nothing found.
I have been trying to implement a webDAV connection on an existing IIS ASP.NET web site. This issue surrounds permissions and connectivity when "Enable anonymous access" is unchecked and disabled.
I have tried every combination available. The server is w2k3 Web Edition, no AD, IIS6, so "Digest authentication for Windows domain servers" is not an option in the Authenticated Access section of Authentication Methods of the Virtual Directory I am sharing in the web site.
I have read about and tested the Registry Edit of the following key, \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlset\services\WebClient\Parameters\BasicAuthLevel
and change the value to 2
agianst each possible authentication method. It seems to disable connectivity more then helping.
I am trying to map a path to a virtual directory on the web server, a function of the webDAV protocol, works great if anonymous access is enabled, but obviously can not be for this project.
I would like to at least get the Windows Authentication to work and disbale Anonymous Access.
I have been testing this on both a development server and production server and the behavior is consistent. On a Win7 OS I can not get the Windows Authentication dialog box to appear.
A few tests on XP, the box appeared but would not authenticate, but this may have been related to other config issues.
I have also tested with Permissions to the Everyone group just to see if I can connect.
Any further suggestions would be appreciated.
UPDATE: I found this article that explains a portion of the problem and work around though not entirely fitting for the issue explained above.
http://support.microsoft.com/kb/943280/en-us
Try adding permissions for Network_services and the IIS User on that box. that has always gotten me over the permissions issues I have faced. You need to add these from within IIS as at least with IIS 7 it seems to over rule the permissions from windows explorer. Not sure if IIS 6 does the same but I just do it by default now.
UPDATE: I found this article that explains a portion of the problem and work around though not entirely fitting for the issue explained above. http://support.microsoft.com/kb/943280/en-us