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
Copy file name to clipboardExpand all lines: articles/container-apps/key-vault-certificates-manage.md
+46-2Lines changed: 46 additions & 2 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: container-apps
7
7
ms.topic: how-to
8
-
ms.date: 05/08/2024
8
+
ms.date: 05/09/2024
9
9
ms.author: cshoe
10
10
---
11
11
@@ -58,6 +58,31 @@ An [Azure Key Vault](/azure/key-vault/general/manage-with-cli2) instance is requ
58
58
59
59
1. Paste the identifier into a text editor for use in an upcoming step.
60
60
61
+
## Assign roles for environment-level managed identity
62
+
63
+
1. Open the [Azure portal](https://portal.azure.com) and find your instance of your Azure Container Apps environment where you want to import a certificate.
64
+
65
+
1. From *Settings*, select **Identity**.
66
+
67
+
1. On the *System assigned* tab, find the *Status* switch and select **On**.
68
+
69
+
1. Select **Save**, and when the *Enable system assigned managed identity* window appears, select **Yes**.
70
+
71
+
1. Under the *Permissions* label, select **Azure role assignments** to open the role assignments window.
72
+
73
+
1. Select **Add role assignment** and enter the following values:
74
+
75
+
| Property | Value |
76
+
|--|--|
77
+
| Scope | Select **Key Vault**. |
78
+
| Subscription | Select your Azure subscription. |
79
+
| Resource | Select your vault. |
80
+
| Role | Select *Key Vault Secrets User**. |
81
+
82
+
1. Select **Save**.
83
+
84
+
For more detail on RBAC vs. legacy access policies, see [Azure role-based access control (Azure RBAC) vs. access policies](/azure/key-vault/general/rbac-access-policy).
85
+
61
86
## Import a certificate
62
87
63
88
Once you authorize your container app to read the vault, you can use the `az containerapp env certificate upload` command to import your vault to your Container Apps environment.
@@ -68,10 +93,29 @@ Before you run the following command, replace the placeholder tokens surrounded
68
93
az containerapp env certificate upload \
69
94
--resource-group <RESOURCE_GROUP> \
70
95
--name <CONTAINER_APP_NAME> \
71
-
--akv-url <KEY_VAULT_URL>
96
+
--akv-url <KEY_VAULT_URL> \
72
97
--certificate-identity <CERTIFICATE_IDENTITY>
73
98
```
74
99
100
+
For more information regarding the command parameters, see the following table.
101
+
102
+
| Parameter | Description |
103
+
|---|---|
104
+
|`--resource-group`| Your resource group name. |
105
+
|`--name`| Your container app name. |
106
+
|`--akv-url`| The URL for your secret identifier. This URL is the value you set aside in a previous step. |
107
+
|`--certificate-identity`| The ID for your managed identity. This value can either be `system`, or the ID for your user-assigned managed identity. |
108
+
109
+
## Troubleshooting
110
+
111
+
If you encounter an error message as you import your certificate, verify your actions using the following steps:
112
+
113
+
- Ensure that permissions are correctly configured for both your certificate and environment-level managed identity.
114
+
115
+
- You should assign both *Key Vault Secrets Officer* and *Key Vault Certificates Officer* roles.
116
+
117
+
- Make sure that you're using the correct URL for accessing your certificate. You should be using the *Secret Identifier* URL.
0 commit comments