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
@@ -136,21 +135,20 @@ To learn more about Key Vault access with Azure RBAC, see [Use an Azure RBAC for
136
135
137
136
1. Set the subscription that contains the AKV resource
138
137
139
-
```bash
140
-
az account set --subscription $AKV_SUB_ID
141
-
```
138
+
```bash
139
+
az account set --subscription $AKV_SUB_ID
140
+
```
142
141
143
142
2. Assign the roles
144
143
145
-
```bash
146
-
USER_ID=$(az ad signed-in-user show --query id -o tsv)
147
-
az role assignment create --role "Key Vault Certificates Officer" --role "Key Vault Crypto User" --assignee $USER_ID --scope "/subscriptions/$AKV_SUB_ID/resourceGroups/$AKV_RG/providers/Microsoft.KeyVault/vaults/$AKV_NAME"
148
-
```
144
+
```bash
145
+
USER_ID=$(az ad signed-in-user show --query id -o tsv)
146
+
az role assignment create --role "Key Vault Certificates Officer" --role "Key Vault Crypto User" --assignee $USER_ID --scope "/subscriptions/$AKV_SUB_ID/resourceGroups/$AKV_RG/providers/Microsoft.KeyVault/vaults/$AKV_NAME"
147
+
```
149
148
150
149
#### Assign access policy in AKV (legacy)
151
150
152
151
The following permissions are required for an identity:
153
-
154
152
- `Create` permissions for creating a certificate
155
153
- `Get` permissions for reading existing certificates
156
154
- `Sign` permissions for signing operations
@@ -159,16 +157,16 @@ To learn more about assigning policy to a principal, see [Assign Access Policy](
159
157
160
158
1. Set the subscription that contains the AKV resource:
161
159
162
-
```bash
163
-
az account set --subscription $AKV_SUB_ID
164
-
```
160
+
```bash
161
+
az account set --subscription $AKV_SUB_ID
162
+
```
165
163
166
164
2. Set the access policy in AKV:
167
165
168
-
```bash
169
-
USER_ID=$(az ad signed-in-user show --query id -o tsv)
170
-
az keyvault set-policy -n $AKV_NAME --certificate-permissions create get --key-permissions sign --object-id $USER_ID
171
-
```
166
+
```bash
167
+
USER_ID=$(az ad signed-in-user show --query id -o tsv)
168
+
az keyvault set-policy -n $AKV_NAME --certificate-permissions create get --key-permissions sign --object-id $USER_ID
169
+
```
172
170
173
171
> [!IMPORTANT]
174
172
> This example shows the minimum permissions needed for creating a certificate and signing a container image. Depending on your requirements, you may need to grant additional permissions.
0 commit comments