Azure / Azure/awesome-azd

Update AppService templates to adhere to Microsoft's Security Recommendations

Open
#708 1 comment 1 reaction 1 assignee Claimed by @haileyvictory View on GitHub
security template-contribution
Dominant language
TypeScript
Stars
269
Forks
176
Avg merge
11h 1m
Merged PRs (30d)
37

Description

Our team at work is required to follow [Microsoft's Security Recommendations](https://learn.microsoft.com/en-us/azure/app-service/security-recommendations). Doing this exploded our bicep scripts (a simple website with a sql server is around 1700 lines of bicep). It would be really helpful if Microsoft would create a template that actually followed their own recommendations because it is a huge pain to actually get working.

The template the most closely matches our setup is the [Todo Application with a C# API and Azure SQL Database](https://github.com/azure-samples/todo-csharp-sql). A few things that are missing in the templates are:
- [Using managed identities](https://learn.microsoft.com/en-us/security/benchmark/azure/baselines/azure-sql-security-baseline#im-3-manage-application-identities-securely-and-automatically) - the current template uses named user/password for SQL Server
- [Disable Public Network Access](https://learn.microsoft.com/en-us/security/benchmark/azure/baselines/azure-sql-security-baseline#disable-public-network-access) - The current template [opens up the firewall to the Azure SQL Server to every IP](https://github.com/Azure-Samples/todo-csharp-sql/blob/1e02b36478206a47d429bd339d63d5a8391b4b60/infra/core/database/sqlserver/sqlserver.bicep#L36)
- [Firewall/WAF](https://learn.microsoft.com/en-us/security/benchmark/azure/baselines/app-service-security-baseline#ns-6-deploy-web-application-firewall)
- Setting up deployment slots for high availability

I am leaving off a LOT of items, these are just the big ones that we have been struggling with. Some links with a lot more info are:
- https://learn.microsoft.com/en-us/security/benchmark/azure/baselines/app-service-security-baseline
- https://learn.microsoft.com/en-us/azure/app-service/security-controls-policy#azure-security-benchmark
- https://learn.microsoft.com/en-us/azure/app-service/overview-security
- https://learn.microsoft.com/en-us/azure/azure-sql/database/security-best-practice?view=azuresql
- https://learn.microsoft.com/en-us/azure/azure-sql/database/security-controls-policy?view=azuresql

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.