I’m running an application built with PHP Laravel on Azure App Service.
The application connects to Azure SQL Server via ActiveDirectoryMsi authentication.
So, I had to enable the queue worker to send emails.
At first, I triggered the queue worker manually, without using the supervisor. Thus, the connection to Azure SQL Server by the queue worker using ActiveDirectoryMsi authentication worked normally and emails were sent.
So I decided to use the supervisor to run the queue workers, as recommended in the Laravel documentation.
That’s when I noticed that workers running through supervisor were unable to connect to Azure SQL Server through ActiveDirectoryMsi authentication. But, as said, when I ran the worker manually, the connection occurred normally.
So I decided to test the database connection configuration with user and password credentials (both for the application and for the workers that were run by the supervisor), that is, without using ActiveDirectoryMsi authentication.
In this case, the connection for both (application and supervisor-run workers) worked and emails were sent as expected.
So I ask: is it possible to configure the supervisor so that it is viable to connect to Azure SQL Server with ActiveDirectoryMsi authentication? This is a good security practice that I would like to maintain.
Thanks in advance.