You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge pull request #297414 from Akhilesh-microsoft/ACA/client_certificate_authorization_gh286840
[GH_286840]: Updated the article to address the issue, extended the documentation to "format the certificate gets forwarded to the app running in ACA container".
Copy file name to clipboardExpand all lines: articles/container-apps/client-certificate-authorization.md
+60-3Lines changed: 60 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ services: container-apps
5
5
author: craigshoemaker
6
6
ms.service: azure-container-apps
7
7
ms.topic: how-to
8
-
ms.date: 06/13/2024
8
+
ms.date: 06/30/2025
9
9
ms.author: cshoe
10
10
---
11
11
@@ -17,7 +17,7 @@ When client certificates are used, the TLS certificates are exchanged between th
17
17
18
18
For example, you might want to require a client certificate for a container app that manages sensitive data.
19
19
20
-
Container Apps accepts client certificates in the PKCS12 format are that issued by a trusted certificate authority (CA), or are self-signed.
20
+
Container Apps accepts client certificates in the PKCS12 format when a trusted certificate authority (CA) issues them or when they're self-signed.
21
21
22
22
## Configure client certificate authorization
23
23
@@ -34,7 +34,7 @@ Ingress passes the client certificate to the container app if `require` or `acce
34
34
The following ARM template example configures ingress to require a client certificate for all requests to the container app.
35
35
36
36
```json
37
-
{
37
+
{
38
38
"properties": {
39
39
"configuration": {
40
40
"ingress": {
@@ -44,6 +44,63 @@ The following ARM template example configures ingress to require a client certif
44
44
}
45
45
}
46
46
```
47
+
> [!NOTE]
48
+
> You can set the `clientCertificateMode` directly on the ingress property. It isn't available as an explicit option in the CLI, but you can patch your app using the Azure CLI.
49
+
50
+
Before you run the following commands, make sure to replace the placeholders surrounded by `<>` with your own values.
51
+
52
+
Get the Azure Resource Manager (ARM) ID of your container app:
53
+
54
+
```bash
55
+
APP_ID=$(az containerapp show \
56
+
--name <APP_NAME> \
57
+
--resource-group <RESOURCE_GROUP> \
58
+
--query id \
59
+
--output tsv)
60
+
```
61
+
62
+
Patch the `clientCertificateMode` property on the app:
> Be sure to use a valid and stable API version that supports this feature. For example, replace <API_VERSION> in the command with 2025-01-01 or another supported version.
81
+
82
+
## Client certificate mode and header format
83
+
84
+
The value for `clientCertificateMode` varies what you need to provide for Container Apps to manage your certificate:
85
+
- When `require` is set, the client must provide a certificate.
86
+
- When `accept` is set, the certificate is optional. If the client provides a certificate, it passes to the app in the `X-Forwarded-Client-Cert` header, as a semicolon-separated list.
87
+
88
+
### Example `X-Forwarded-Client-Cert` header value
89
+
90
+
The following example is a sample value of the `X-Forwarded-Client-Cert` header that your app might receive:
|`Hash`| The SHA-256 thumbprint of the client certificate. | Use the thumbprint to identify or validate the client certificate. |
101
+
|`Cert`| The base64-encoded client certificate in PEM format (single certificate). | Parse the certificate to inspect metadata such as subject and issuer. |
102
+
|`Chain`| One or more PEM-encoded intermediate certificates. | Provide the intermediate certificates when building a full trust chain for validation. |
0 commit comments