Connecting PHP to SQL Server with integrated security by transferring to a domain account / password?

The company I work for has databases on one server and PHP on another. The database server uses Windows Integrated Security, that is, they check the domain name and password of the computer on which you are logged in, and only allow connection to the server if the credentials match. However, our PHP server account does not have access to the database server.

Today I finally got a service account for our database server, so I can set up a database to store marketing orders. But since the PHP server account does not have access to the databases, I cannot insert data. I am wondering if there is a way to provide my personal credentials in the request and resolve it myself.

Thanks!

EDIT: Thanks to Mike in the comments, I realized what I need to do to use the impersonation function so that all requests to the server impersonate me. But how would I do that?

+6
source share
1 answer

Start the Apache server with the service account. The database administrator must provide access to the service account database.

If Apache is running in a system account, it asks for ntework credentials to access the database. It would be unsafe to allow the network service account access to the database.

0
source

Source: https://habr.com/ru/post/951428/


All Articles