Azure / sql-action

🚀 Deploy changes to your SQL database easily with SQL projects or SQL scripts and sql-action for GitHub workflows
MIT License
103 stars 58 forks source link

Changes on SQL Server firewall don't show up in Activity Logs #200

Closed FlorentATo closed 11 months ago

FlorentATo commented 11 months ago

We use sql-action in combination with azure/login to authenticate to our SQL Servers from GH Action and update the firewall at runtime. The Azure Login uses a Service Principal to authenticate to Azure, and the whole process works just fine.

However during our tests we realized there was no trace of the firewall change in the Activity Logs. Though I do see a traces when performing the same action on the portal, using my AAD account.

Do you know why ? Or am I missing something ?

FlorentATo commented 11 months ago

I just realized the checkbox "Allow Azure services and resources to access this server" was checked, thus bypassing the firewall entirely. That also explains why I couldn't find the message "Client does not have access to server. Adding firewall exception for client's IP address." in the action logs.

I confirm Activity Logs also reflect that change properly. My bad! -)