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
# Set up Key Vault for Managed Credential Rotation in Operator Nexus
13
13
14
-
Azure Operator Nexus utilizes secrets and certificates to manage component security across the platform. The Operator Nexus platform handles the rotation of these secrets and certificates. By default, Operator Nexus stores the credentials in a managed Key Vault. To keep the rotated credentials in their own Key Vault, the user has to set up the Key Vault for the Azure Operator Nexus instance. Once created, the user needs to add a role assignment on the Customer Key Vault to allow the Operator Nexus Platform to write updated credentials, and additionally link the Customer Key Vault to the Nexus Cluster Resource.
14
+
Azure Operator Nexus utilizes secrets and certificates to manage component security across the platform. The Operator Nexus platform handles the rotation of these secrets and certificates. By default, Operator Nexus stores the credentials in a managed Key Vault. To keep the rotated credentials in their own Key Vault, the user has the option to configure their own Key Vault to receive rotated credentials. This requires the user to set up the Key Vault for the Azure Operator Nexus instance. Once created, the user needs to add a role assignment on the Customer Key Vault to allow the Operator Nexus Platform to write updated credentials, and additionally link the Customer Key Vault to the Nexus Cluster Resource.
15
15
16
16
## Prerequisites
17
17
@@ -22,9 +22,9 @@ Azure Operator Nexus utilizes secrets and certificates to manage component secur
22
22
> [!NOTE]
23
23
> A single Key Vault can be used for any number of clusters.
24
24
25
-
## Configure Managed Identity for Cluster Manager
25
+
## Configure Key Vault Using Managed Identity for Cluster Manager
26
26
27
-
Beginning with the 2024-06-01-public-preview API, managed identities are used in the Cluster Manager for write access to rotated credentials to a key vault. The Cluster Manager identity can be system-assigned or [user-assigned](/entra/identity/managed-identities-azure-resources/how-manage-user-assigned-managed-identities), and can be managed directly via APIs or via CLI.
27
+
Starting with the 2024-07-01 API version, managed identities in the Cluster Manager are used for write access to deliver rotated credentials to a key vault. The Cluster Manager identity may be system-assigned or [user-assigned](/entra/identity/managed-identities-azure-resources/how-manage-user-assigned-managed-identities), and can be managed directly via APIs or via CLI.
28
28
29
29
These examples describe how to configure a managed identity for a Cluster Manager.
30
30
@@ -45,18 +45,38 @@ These examples describe how to configure a managed identity for a Cluster Manage
45
45
--resource-group <Resource Group Name> --mi-user-assigned "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myUAI"
46
46
```
47
47
48
-
- Add systemassigned identity to Cluster Manager
48
+
- Add system-assigned identity to Cluster Manager
49
49
```
50
50
az networkcloud clustermanager update --name <Cluster Manager Name> --resource-group <Resource Group Name> --mi-system-assigned
51
51
```
52
52
53
-
- Add userassigned identity to Cluster Manager
53
+
- Add user-assigned identity to Cluster Manager
54
54
```
55
55
az networkcloud clustermanager update --name <Cluster Manager Name> --resource-group <Resource Group Name> \
Register the Customer Key Vault as the secret archive for the Nexus cluster. The key vault resource ID must be configured in the cluster and enabled to store the secrets of the cluster.
62
+
63
+
Example:
64
+
65
+
```console
66
+
# Set and enable Customer Key Vault on Nexus cluster
67
+
az networkcloud cluster update --ids /subscriptions/<subscription ID>/resourceGroups/<Resource Group Name>/providers/Microsoft.NetworkCloud/clusters/<Nexus Cluster Name> --secret-archive "{key-vault-id:<Key Vault Resource ID>,use-key-vault:true}"
68
+
69
+
# Show Customer Key Vault setting (secretArchive) on the Nexus cluster
70
+
az networkcloud cluster show --ids /subscriptions/<subscription ID>/resourceGroups/<Resource Group Name>/providers/Microsoft.NetworkCloud/clusters/<Nexus Cluster Name> --query secretArchive
71
+
```
72
+
73
+
For more help:
74
+
75
+
```console
76
+
az networkcloud cluster update --secret-archive ?? --help
77
+
```
78
+
79
+
### Get the Principal ID for the Cluster Manager Managed Identity
60
80
61
81
Once a managed identity is configured, use the CLI to view the identity and the associated principal ID data within the cluster manager.
## Writing Credential Updates to a Customer Key Vault on Nexus Cluster
111
+
Refer to [_Grant Managed Identity Access to a Key Vault for Credential Rotation_](#grant-managed-identity-access-to-a-key-vault-for-credential-rotation) to assign the appropriate role to the Managed Identity Principal ID.
92
112
93
-
- Assign the *Operator Nexus Key Vault Writer Service Role*. Ensure that *Azure role-based access control* is selected as the permission model for the key vault on the *Access configuration* view. Then from the *Access Control* view, select to add a role assignment.
113
+
## Configure Key Vault Using Managed Identity for Cluster
| Operator Nexus Key Vault Writer Service Role (Preview) | 44f0a1a8-6fea-4b35-980a-8ff50c487c97 |
115
+
> [!IMPORTANT]
116
+
> Please note that this method for configuring a key vault for credential rotation is in preview. **This method can only be used with key vault that do not have firewall enabled.** If your environment requires the key vault firewall be enabled, use the existing [Cluster Manager]() identity method.
98
117
99
-
Example:
118
+
Beginning with the 2024-10-01-preview API, managed identities in the Nexus Cluster resource can be used instead of Cluster Manager. The Cluster identity may be system-assigned or [user-assigned](/entra/identity/managed-identities-azure-resources/how-manage-user-assigned-managed-identities), and can be managed directly via APIs or via CLI.
100
119
101
-
```console
102
-
az role assignment create --assignee <Managed Identity Principal Id> --role 44f0a1a8-6fea-4b35-980a-8ff50c487c97 --scope /subscriptions/<Subscription ID>/resourceGroups/<Resource Group Name>/providers/Microsoft.KeyVault/vaults/<Key Vault Name>
120
+
> [!NOTE]
121
+
> If Nexus Cluster managed identity is configured for the key vault, then these settings will supersede settings configured in [_Configure Key Vault Using Managed Identity for Cluster Manager_](#configure-key-vault-using-managed-identity-for-cluster-manager)
122
+
123
+
These examples describe how to configure a managed identity for a Nexus Cluster.
124
+
125
+
- Create Nexus Cluster with system-assigned identity
126
+
```azurecli-interactive
127
+
az networkcloud cluster create --name "<cluster-name>" \
128
+
--resource-group "<cluster-resource-group>" \
129
+
...
130
+
--mi-system-assigned \
131
+
...
132
+
--subscription "<subscription>"
133
+
```
134
+
135
+
- Create Nexus Cluster with user-assigned identity
136
+
```azurecli-interactive
137
+
az networkcloud cluster create --name "<cluster-name>" \
- Update existing Nexus Cluster with system-assigned identity
146
+
```azurecli-interactive
147
+
az networkcloud cluster update --ids <cluster-resource-id> --mi-system-assigned
103
148
```
104
149
105
-
- User associates the Customer Key Vault with the Operator Nexus cluster. The key vault resource ID must be configured in the cluster and enabled to store the secrets of the cluster.
150
+
- Update existing Nexus Cluster with user-assigned identity
151
+
```azurecli-interactive
152
+
az networkcloud cluster update --ids <cluster-resource-id> --mi-user-assigned "<user-assigned-identity-resource-id>"
Register the Key Vault URI and managed identity to be used in the secret archive settings for the Nexus cluster.
158
+
159
+
> [!NOTE]
160
+
> Secret archive settings specify the Key Vault URI, not the Key Vault resource ID, and the managed identity specfied must be configured for the Nexus Cluster.
161
+
162
+
Example:
163
+
164
+
- Using a system-assigned identity:
165
+
166
+
```azurecli
167
+
az rest --method PATCH --url ${CLUSTER_ID}?api-version=2024-10-01-preview --body @./sami-body.json
### Get the Principal ID for the Cluster Managed Identity
208
+
209
+
Once a managed identity is configured for the Nexus Cluster, use the CLI to view the identity and get the _principalId_ for the managed identity specified in the secret archive settings.
106
210
107
211
Example:
108
212
109
213
```console
110
-
# Set and enable Customer Key Vault on Nexus cluster
111
-
az networkcloud cluster update --ids /subscriptions/<subscription ID>/resourceGroups/<Resource Group Name>/providers/Microsoft.NetworkCloud/clusters/<Nexus Cluster Name> --secret-archive "{key-vault-id:<Key Vault Resource ID>,use-key-vault:true}"
214
+
az networkcloud cluster show --ids <cluster-resource-id>
215
+
```
112
216
113
-
# Show Customer Key Vault setting (secretArchive) on the Nexus cluster
114
-
az networkcloud cluster show --ids /subscriptions/<subscription ID>/resourceGroups/<Resource Group Name>/providers/Microsoft.NetworkCloud/clusters/<Nexus Cluster Name> --query secretArchive
Refer to [_Grant Managed Identity Access to a Key Vault for Credential Rotation_](#grant-managed-identity-access-to-a-key-vault-for-credential-rotation) to assign the appropriate role to the Managed Identity Principal ID.
240
+
241
+
## Grant Managed Identity Access to a Key Vault for Credential Rotation
242
+
243
+
- Assign the *Operator Nexus Key Vault Writer Service Role*. Ensure that *Azure role-based access control* is selected as the permission model for the key vault on the *Access configuration* view. Then from the *Access Control* view, select to add a role assignment.
| Operator Nexus Key Vault Writer Service Role (Preview) | 44f0a1a8-6fea-4b35-980a-8ff50c487c97 |
248
+
249
+
Example:
118
250
119
251
```console
120
-
az networkcloud cluster update --secret-archive ?? --help
252
+
az role assignment create --assignee <Managed Identity Principal Id> --role 44f0a1a8-6fea-4b35-980a-8ff50c487c97 --scope /subscriptions/<Subscription ID>/resourceGroups/<Resource Group Name>/providers/Microsoft.KeyVault/vaults/<Key Vault Name>
121
253
```
122
254
255
+
If using a user-assigned managed identity, proceed to [add permission to user-assigned identity](#add-a-permission-to-user-assigned-identity)
256
+
123
257
## Add a permission to User-assigned identity
124
258
125
-
When using a User-assigned identity, add the following role assignment to the UAI resource:
259
+
When using a user-assigned managed identity, a customer is required to provision access to that identity for the Nexus platform.
260
+
Specifically, `Microsoft.ManagedIdentity/userAssignedIdentities/assign/action` permission needs to be added to the User-assigned identity for `AFOI-NC-MGMT-PME-PROD` Microsoft Entra ID. It is a known limitation of the platform that will be addressed in the future.
126
261
127
262
1. Open the Azure Portal and locate the User-assigned identity in question.
128
263
2. Under **Access control (IAM)**, click **Add role assignment**.
0 commit comments