Skip to content

Commit 0b5970c

Browse files
authored
Merge pull request #301440 from craigshoemaker/aca/security-overview
[Container Apps] New: Security overview
2 parents 9529c79 + e24594d commit 0b5970c

File tree

2 files changed

+108
-0
lines changed

2 files changed

+108
-0
lines changed

articles/container-apps/TOC.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,9 @@
270270
href: authentication-openid.md
271271
- name: Security
272272
items:
273+
- name: Overview
274+
href: security.md
275+
displayName: Security overview
273276
- name: Manage secrets
274277
href: manage-secrets.md
275278
- name: Token store

articles/container-apps/security.md

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
---
2+
title: Security overview in Azure Container Apps
3+
description: Learn about the security features and best practices for Azure Container Apps, including managed identities, secrets management, and token store.
4+
services: container-apps
5+
author: craigshoemaker
6+
ms.service: azure-container-apps
7+
ms.topic: conceptual
8+
ms.date: 07/17/2025
9+
ms.author: cshoe
10+
---
11+
12+
# Security overview in Azure Container Apps
13+
14+
Azure Container Apps provides several built-in security features that help you build secure containerized applications. This guide explores key security principles, including managed identities, secrets management, and token store, while providing best practices to help you design secure and scalable applications.
15+
16+
## Managed identities
17+
18+
[Managed identities](managed-identity.md) eliminate the need to store credentials in your code or configuration by providing an automatically managed identity in Microsoft Entra ID. Container apps can use these identities to authenticate to any service that supports Microsoft Entra authentication, such as Azure Key Vault, Azure Storage, or Azure SQL Database.
19+
20+
### Types of managed identities
21+
22+
Azure Container Apps supports two types of managed identities:
23+
24+
- **System-assigned identity**: Created and managed automatically with your container app's lifecycle. The identity is deleted when your app is deleted.
25+
26+
- **User-assigned identity**: Created independently and can be assigned to multiple container apps, allowing identity sharing across resources.
27+
28+
### Security benefits of managed identities
29+
30+
- Eliminates the need to manage and rotate credentials in your application code
31+
- Reduces risk of credential exposure in configuration files
32+
- Provides fine-grained access control through Azure RBAC
33+
- Supports the principle of least privilege by granting only necessary permissions
34+
35+
### When to use each identity type
36+
37+
- Use **system-assigned identities** for workloads that:
38+
- Are contained within a single resource
39+
- Need independent identities
40+
41+
- Use **user-assigned identities** for workloads that:
42+
- Run across multiple resources that share a single identity
43+
- Need preauthorization to secure resources
44+
45+
### Managed identity for image pulls
46+
47+
A common security pattern is using [managed identities to pull images](managed-identity-image-pull.md) from private repositories in Azure Container Registry. This approach:
48+
49+
- Avoids using administrative credentials for the registry
50+
- Provides fine-grained access control through the ACRPull role
51+
- Supports both system-assigned and user-assigned identities
52+
- Can be controlled to limit access to specific containers
53+
54+
For more information, see [Managed identities](managed-identity.md) and [Image pull from Azure Container Registry with managed identity](managed-identity-image-pull.md) for more details on how to set up a managed identities for your application.
55+
56+
## Secrets management
57+
58+
Azure Container Apps provides built-in mechanisms to securely store and access sensitive configuration values like connection strings, API keys, and certificates.
59+
60+
### Key security features for secrets
61+
62+
- **Secret isolation**: Secrets are scoped to an application level, isolated from specific revisions
63+
- **Environment variable references**: Expose secrets to containers as environment variables
64+
- **Volume mounts**: Mount secrets as files within containers
65+
- **Key Vault integration**: Reference secrets stored in Azure Key Vault
66+
67+
### Security best practices for secrets
68+
69+
- Avoid storing secrets directly in Container Apps for production environments
70+
- Use Azure Key Vault integration for centralized secret management
71+
- Implement least privilege when granting access to secrets
72+
- Use secret references in environment variables instead of hard-coding values
73+
- Use volume mounts to access secrets as files when appropriate
74+
- Implement proper secret rotation practices
75+
76+
For more information, see [Import certificates from Azure Key Vault](key-vault-certificates-manage.md) for more details on how to set up secrets management for your application.
77+
78+
## Token store for secure authentication
79+
80+
The token store feature provides a secure way to manage authentication tokens independent of your application code.
81+
82+
### How token store works
83+
84+
- Tokens are stored in Azure Blob Storage, separate from your application code
85+
- Cached tokens are only accessible to the associated user
86+
- Container Apps handles token refresh automatically
87+
- The feature reduces the attack surface by eliminating custom token management code
88+
89+
For more information, see [Enable an authentication token store](token-store.md) for more details on how to set up a token store for your application.
90+
91+
## Network security
92+
93+
Implementing proper network security measures helps safeguard your workloads from unauthorized access and potential threats while enabling secure communication between your apps and other services.
94+
95+
For more information on network security in Azure Container Apps, see the following articles:
96+
97+
- [Configure WAF Application Gateway](./waf-app-gateway.md)
98+
- [Enable User Defined Routes (UDR)](user-defined-routes.md)
99+
- Rule based routing
100+
- [Use rule-based routing](./rule-based-routing.md)
101+
- [Configure a custom domain](./rule-based-routing-custom-domain.md)
102+
- [Securing a custom VNET with an NSG](firewall-integration.md)
103+
- [Use a private endpoint](./how-to-use-private-endpoint.md)
104+
- [Use mTLS](./mtls.md)
105+
- [Integrate with Azure Front Door](./how-to-integrate-with-azure-front-door.md)

0 commit comments

Comments
 (0)