Skip to content

Commit e6baec7

Browse files
updates from PM review
1 parent c1e006e commit e6baec7

File tree

1 file changed

+46
-2
lines changed

1 file changed

+46
-2
lines changed

articles/container-apps/key-vault-certificates-manage.md

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ services: container-apps
55
author: craigshoemaker
66
ms.service: container-apps
77
ms.topic: how-to
8-
ms.date: 05/08/2024
8+
ms.date: 05/09/2024
99
ms.author: cshoe
1010
---
1111

@@ -58,6 +58,31 @@ An [Azure Key Vault](/azure/key-vault/general/manage-with-cli2) instance is requ
5858
5959
1. Paste the identifier into a text editor for use in an upcoming step.
6060
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+
6186
## Import a certificate
6287
6388
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
6893
az containerapp env certificate upload \
6994
--resource-group <RESOURCE_GROUP> \
7095
--name <CONTAINER_APP_NAME> \
71-
--akv-url <KEY_VAULT_URL>
96+
--akv-url <KEY_VAULT_URL> \
7297
--certificate-identity <CERTIFICATE_IDENTITY>
7398
```
7499

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.
118+
75119
## Related
76120

77121
> [!div class="nextstepaction"]

0 commit comments

Comments
 (0)