IaC

Help Santa Secure His Naughty List

Help Santa Secure His Naughty List

This year I am a part of the Festive Tech Calendar and this blogpost is about securing secrets in Bicep deployments, with a festive twist.

Erlend Rushfeldt
Even on the North Pole they must adopt new technologies, and Santa has started using Bicep to deploy his list of this year’s presents. Last year, Santa got a huge fine from the North pole Data Protection Authority after he committed the full naughty list into source control in a public repository. This year, Santa needs help with securing his secrets in Bicep templates during deployments! Before I start the blogpost, I want to give a shoutout to the organizers of the Festive Tech Calendar for the amazing work they do!
Run scripts on VMs after deployment with Bicep

Run scripts on VMs after deployment with Bicep

Do configuration management on your VMs in Azure with post-deployment scripts using Run Commands and Bicep.

Erlend Rushfeldt
Bicep is an IaC-language which is created by Microsoft for Azure. Therefore, it does not have capabilities to do configuration management of Virtual machines directly. There are however ways to do some level of desired state configuration (DSC) on OS-level of Virtual machines using another Azure service. This service is Run Commands! Note that there is other services like Azure Automation and Azure Automanage that do DSC, but this blogpost is about Run Commands.
The SQL Server AllowAllAzureIps setting

The SQL Server AllowAllAzureIps setting

The story about a deep dive into Azure SQL firewall rules and the setting AllowAllAzureIps

Erlend Rushfeldt
This is going to be a longer one. You have been warned! This adventure started last week when I attended the Azure User Group Norway with a session on Azure SQL networking secrets by Dennes Torres. Dennes showed a setting in the firewall rules on Azure SQL server that said, “Allow Azure services and resources to access this server”. Now you might think “Yeah, I need that for my App Service to access the database”, but in reality, this setting will allow ALL Azure IPs to access the SQL server!
Deploy Azure Firewall ruleset for Azure AD with Bicep

Deploy Azure Firewall ruleset for Azure AD with Bicep

Get the required firewallrules in Azure firewall for Azure AD connect using a Bicep template.

Erlend Rushfeldt
Anyone who have used the portal to add rules to Azure Firewall will know how tedious and annoying it can get. With small fields to write both destination and source, it does get old very quick. And something that I found myself doing for several customers was setting the rules required for Azure AD Connect. I quickly got tired of doing it manually, so I created a Bicep template to deploy it much easier and faster.