There is an intranet resource written in PHP. Runs under IIS6 (FastCGI). Automatic windows-authentication using IIS is required.
When enabled in IIS Integrated Windows Authentication (and disabling Anonymous access), authentication works fine, but there is a problem. The fact is that my application uses SQL Server for work, which is configured only for windows-authorization, so the application for each authorized user tries to connect to the database under this user, but does not have rights to it.
Authorization using SQL Server cannot be enabled for some reason. In any case, it is required to connect to the database using a dedicated domain account affiliated with the Application Pool on IIS.
We tried to disable impersonalization (fastcgi.impersonate = 0 in php.ini), but automatic authentication is lost and strange browsers work:
- IE opens the standard domain authorization dialog, but does not accept the password even if it is 100% correct.
- Chrome just falls off with ERR_INVALID_AUTH_CREDENTIALS and that's it.
- FF opens the standard domain authorization dialog and without any problems authorizes me under my account and then I see that everything works as it should (different accounts in _SERVER ["AUTH_USER"] and SQL User).
How can I provide automatic authentication, but always use a dedicated account to work with the database?