Curo Blog

A Deep Dive into Azure Application Security

August 7, 2026

Azure application security involves implementing a multi-layered strategy to protect applications and data within the Azure ecosystem. This is achieved through a Zero Trust model that combines secure identity management, granular network controls like Network and Application Security Groups, advanced data encryption, and continuous monitoring with tools like Microsoft Defender for Cloud.

Secure Identities with GitHub OIDC and Microsoft Entra Workload ID Federation

Securing identities is a cornerstone of Azure application security, particularly by minimizing the need for long-lived secrets. A Zero Trust approach begins with identity, treating every access request as if it originates from an untrusted network. GitHub OpenID Connect (OIDC) combined with Microsoft Entra Workload Identity Federation offers a robust solution for this. This approach allows GitHub Actions workflows to access Azure resources without storing long-lived Azure credentials as GitHub secrets.

The recommended Workload Identity Federation workflow involves six key steps:

  1. Set up trust in Microsoft Entra ID and request a token. This establishes the initial trust relationship.
  2. Configure the GitHub workflow to allow actions to get the token. This enables the workflow to initiate the token request.
  3. GitHub workflow sends a request to Azure ID. The workflow communicates with Microsoft Entra ID.
  4. Microsoft Entra ID validates the trust on the application and fetches the keys to validate the token. Microsoft Entra ID verifies the request's legitimacy.
  5. Microsoft Entra ID accesses and issues the token. Upon successful validation, a token is issued.
  6. The deploy action uses the Microsoft Entra access token to deploy to resources in Azure. The issued token facilitates secure deployment.

This method offers several security benefits: fewer secrets to leak, easier scoping of permissions, and improved auditability as requests are tied to specific workflow identities.

Best Practices for DevOps Environment Security

To further fortify DevOps platform environments and enhance Azure application security, several best practices are recommended:

  • Secure storage for secrets and certificates: Always store secrets in key vaults, such as Azure Key Vault, rather than directly in code or on team environments.
  • Configure Azure to trust GitHub's OIDC as a federated identity: This eliminates the need for long-lived Azure credentials in GitHub Actions workflows.
  • Equip every DevOps platform environment with audit trails: Review audit logs to track access, changes, and timestamps, especially for CI/CD pipelines flowing into production.
  • Design for revocation/rotation: Assume potential leaks and design systems for fast recovery.
  • Create narrow roles for each workflow purpose: Assign minimal roles for specific tasks like build/test versus deploy.
  • Implement Zero Trust principles: Utilize Microsoft Entra ID as a centralized identity management system to meet Zero Trust requirements.

Enforcing Network Security with a Zero Trust Model

After securing identities, the next layer of defense is the network. Microsoft's Zero Trust model eliminates implicit trust and requires continuous verification of every network flow, assuming a breach is possible at any time. This is a significant shift from traditional perimeter-based security. In Azure, this is achieved through a combination of services that segment, filter, and secure network traffic.

Network and Application Security Groups (NSGs & ASGs)

Network Security Groups (NSGs) are a fundamental component for enforcing network traffic rules at the subnet and network interface (NIC) level. An NSG contains a list of security rules that allow or deny inbound or outbound network traffic based on a 5-tuple: source IP, source port, destination IP, destination port, and protocol.

To simplify the management of these rules, Azure provides Application Security Groups (ASGs). An Azure application security group allows you to group virtual machines and define network security policies based on those groups. You can configure an NSG with an ASG as the source or destination, which lets you create rules that apply to specific application tiers (e.g., "allow traffic from the 'WebServers' ASG to the 'DatabaseServers' ASG on port 1433"). This makes rule management more intuitive and less prone to error than managing lists of IP addresses.

Azure Firewall and Web Application Firewall (WAF)

For more centralized and intelligent threat protection, Azure Firewall acts as a cloud-native, stateful firewall-as-a-service. It provides threat intelligence-based filtering and can inspect traffic across subscriptions and virtual networks. As part of a Zero Trust network strategy, Azure Firewall offers a central point of policy enforcement and logging for all traffic entering or leaving the network.

For applications exposed to the internet, Azure Web Application Firewall (WAF) provides an additional layer of protection. Integrated with services like Application Gateway and Azure Front Door, WAF protects web applications from common vulnerabilities and exploits such as SQL injection and cross-site scripting (XSS).

Securing Application Data with Advanced Encryption

Protecting application data, both at rest and in transit, is non-negotiable. While Azure encrypts all data at rest by default with platform-managed keys, many organizations require greater control to meet compliance and data sovereignty requirements. This involves retaining complete ownership and authority over encryption keys.

Advanced key management strategies allow organizations to control their data's residency and sovereignty. Through partnerships with providers like Utimaco, Azure enables customers to use an External Key Management System (EKMS) to manage their keys outside of Microsoft's infrastructure. This offers several powerful approaches:

  • Bring Your Own Key (BYOK): With BYOK, a customer-managed Key Encryption Key (KEK) is used to encrypt Microsoft's own keys. The full lifecycle of this KEK is managed externally by the customer, providing the ability to revoke data access at any time.
  • Double Key Encryption (DKE): For highly sensitive data in Microsoft 365, DKE encrypts files with two keys. One is managed within the Microsoft environment, and the second is held exclusively by the customer in an external service. The second key is never exposed to Azure, and decryption only occurs on the end-user's device, offering maximum control.
  • Hold Your Own Key (HYOK): This emerging architecture allows Azure Key Vaults to connect to an external key vault. Key storage and lifecycle management are completely offloaded from Azure to the customer's environment, using dedicated Hardware Security Modules (HSMs) for the highest level of key protection.

Application and Workload Protection

Application and workload protection ensures that applications, containers, and underlying computing resources are accessed only by authorized entities under strict policies. Zero Trust principles push security controls as close to the workload as possible. This is particularly important for modern, dynamic architectures.

Securing Containers and Serverless Functions

For distributed applications running in containers or as serverless functions, security must be embedded directly into the workload.

  • Container Security: In services like Azure Kubernetes Service (AKS), workload protection involves applying runtime protection, code integrity checks, and access gating at the API or service endpoint level. Each container should run with the least privilege necessary, and network policies within the cluster should restrict communication between pods.
  • Serverless Security: For serverless workloads like Azure Functions, security focuses on securing the function's trigger, managing its identity with least-privilege access, and validating all input data. Each function is a potential entry point, so applying access controls and runtime protection is critical.

Automated Security Tools and Governance

Maintaining a strong security posture requires continuous vigilance and automation. Automated tools and centralized governance platforms are essential for detecting threats, enforcing policies, and maintaining situational awareness across the entire Azure environment.

Types of Automated Security Testing

Integrating security testing directly into the CI/CD pipeline is a core tenet of DevSecOps. This "shift-left" approach catches vulnerabilities early in the development lifecycle.

Tool TypeDescriptionGuidelines
SCA (Software Composition Analysis)Analyzes dependencies for vulnerabilitiesScan on every build, use SBOMs, remediate immediately
SAST (Static Application Security Testing)Analyzes source code for vulnerabilities before executionScan on every build, configure for optimal scanning
DAST (Dynamic Application Security Testing)Tests running application from outside, simulating attacksPerform in staging, script into CI/CD, API-specific tests
RASP (Runtime Application Self-Protection)Embedded within applications to detect/block attacks in real-timeProvides last line of defense at application layer

Centralized Monitoring and Policy Enforcement

Real-time monitoring and consistent policy application are critical for a Zero Trust environment.

  • Microsoft Defender for Cloud: This service acts as a centralized platform for cloud security posture management (CSPM) and cloud workload protection (CWP). It provides security recommendations, threat detection, and vulnerability assessments for Azure, on-premises, and multi-cloud resources.
  • Azure Policy: This service allows you to create, assign, and manage policies that enforce rules and effects over your resources. For example, you can enforce that all storage accounts must have encryption enabled or that NSGs cannot have rules allowing RDP access from the internet.
  • Azure Arc: For hybrid and multi-cloud environments, Azure Arc extends the Azure management plane. It treats resources outside of Azure as if they were native, allowing you to apply Azure Policy, monitoring, and security workflows consistently across all your environments. This unified control plane is essential for maintaining a consistent security posture everywhere.

Frequently Asked Questions

What is Azure application security?

Azure application security is a comprehensive approach to protecting applications and data in Azure using a Zero Trust model, secure identity, network controls, data encryption, and continuous automated monitoring.

What is the difference between an NSG and an ASG in Azure?

A Network Security Group (NSG) filters network traffic to and from Azure resources using rules based on IP addresses and ports. An Application Security Group (ASG) lets you group VMs with similar functions, so you can use the group name in NSG rules instead of managing individual IP addresses.

How does Azure help with data encryption and sovereignty?

Azure encrypts data by default, but for greater control, it supports advanced methods like Bring Your Own Key (BYOK), Double Key Encryption (DKE), and Hold Your Own Key (HYOK), allowing you to manage encryption keys externally and retain full data sovereignty.

What is Microsoft Defender for Cloud?

Microsoft Defender for Cloud is a unified security management platform that provides threat protection and security posture management for workloads running in Azure, on-premises, and in other clouds.

How does OpenID Connect (OIDC) enhance Azure application security?

OIDC enhances Azure application security by enabling GitHub Actions workflows to access Azure resources without needing to store long-lived Azure credentials as GitHub secrets. Instead, it uses a federated identity approach where Azure trusts GitHub's OIDC tokens, reducing the risk of secret leakage.

Conclusion

Effective Azure application security is a multifaceted discipline built on the foundation of a Zero Trust architecture. It requires a holistic strategy that moves beyond perimeter defenses to secure each layer of the application stack. By combining secure identity management via Microsoft Entra Workload Identity Federation, granular network controls with NSGs and ASGs, advanced data encryption, and comprehensive workload protection, organizations can build resilient applications. Augmenting this with automated security testing and centralized governance through tools like Microsoft Defender for Cloud and Azure Policy ensures that the security posture remains robust, adaptive, and consistent across all environments.

Sources & References

Want to actually learn azure application security?

Curo turns topics like this into a personalized, guided learning board - built around what you already know. Free to start.

Try Curo
Curo

Copyright ©2026 Pixelpath Studio Pvt. Ltd. All rights reserved