Azure Security Fundamentals Part - 4: Storage Accounts, Firewalls, Logging, and Defender for Cloud

February 13, 2025
Azure SecurityAzureSecurity

๐Ÿ›ก๏ธ Securing Azure Storage, Firewalls, Logging, and Defender for Cloud

With identities, VMs, databases, and apps hardened, this final post in our Azure Security series focuses on:

  • Storage account protection
  • Firewall configurations
  • Cloud native logging
  • Microsoft Defender for Cloud

๐Ÿ“ฆ Storage Account Security

Azure Storage is one of the most widely used services and a common source of accidental data exposure. Securing it is non negotiable.

๐Ÿ”‘ Choose Secure Authentication

You can access Azure Storage using

MethodDescriptionSecurity Level
Public AccessOpen to the world used for public static sitesโŒ Least secure
Storage KeysMaster key with full controlโš ๏ธ Risky
SAS TokensTime-bound, limited access URLs๐ŸŸก Moderate
Azure AD IdentityRole based, secure, auditable accessโœ… Recommended

Use Azure AD and RBAC, combined with Managed Identity, wherever possible.

๐Ÿ” Encrypt Data

By default, Azure encrypts all data at rest using Microsoft managed keys. For more control, bring your own key (BYOK) via Key Vault.

๐ŸŒ Restrict Access

To protect against data exfiltration:

  • Use Private Endpoints to limit traffic to internal networks
  • If not possible, configure firewall rules for known IPs
  • Avoid embedding SAS tokens in code store in Key Vault

โ˜๏ธ Connecting from App Services and VMs

Same rules apply as with Azure SQL:

[App Service] โ”€โ”€ VNet Integration โ”€โ”€โ–บ Private Endpoint โ”€โ”€โ–บ [Storage]
[VM] โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ VNet โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ Private Endpoint โ”€โ”€โ–บ [Storage]

โœ… Use policies to block access using keys or public endpoints.


๐Ÿ”ฅ Azure Firewalls & Web Application Firewalls

๐Ÿงฑ Azure Firewall

  • Protects non-web traffic
  • Supports L3 L7 filtering
  • Premium version includes IDPS (Intrusion Detection & Prevention)
FeatureBasicPremium
Layer 3-7โœ…โœ…
TLS InspectionโŒโœ…
Threat Intelligenceโœ…โœ…

Recommended for protecting internal service to service traffic.

๐ŸŒ Application Gateway + WAF

  • Handles web traffic only
  • Protects against OWASP Top 10 threats
  • Offers SSL termination, routing, custom headers, and more

WAF runs in either

  • Detection Mode (logs only)
  • Prevention Mode (blocks malicious traffic)

๐Ÿง  Tip: WAF rules are based on the OWASP Core Rule Set and update automatically.


๐Ÿงพ Logging with Log Analytics

Azure provides diagnostic logging for nearly all services, but logs must be explicitly enabled.

๐Ÿงฉ Logging Pipeline

  1. Enable logging per resource
  2. Stream logs to a Log Analytics Workspace
  3. Use Kusto Query Language (KQL) to query log

Logs may take ~2 minutes to stream after configuration.


๐Ÿ›ก๏ธ Microsoft Defender for Cloud

Microsoft Defender for Cloud is a centralized security console that

  • Monitors all Azure resources
  • Highlights misconfigurations and threats
  • Offers one click remediation
  • Integrates with Microsoft Sentinel, Microsoft Defender XDR, etc.

๐Ÿ’ฐ Pricing

  • Basic plan: Free
  • Enhanced detection, analytics, and recommendations: Paid (per resource)

It's best practice to enable it for all subscriptions and check it weekly.


โœ… Final Recap

AreaBest Practice
Storage AccountsUse Private Endpoints and Azure AD
FirewallsDeploy both Azure Firewall and WAF
LoggingSend logs to Log Analytics and use KQL
Defender for CloudEnable across subscriptions and review alerts