Skip to content

Commit 6f4d51e

Browse files
authored
Merge pull request #283488 from ghugo/gagehugo/managed-identity
Update how-to-credential-manager-key-vault.md
2 parents 3e6ec68 + 3c43fa8 commit 6f4d51e

File tree

1 file changed

+82
-9
lines changed

1 file changed

+82
-9
lines changed

articles/operator-nexus/how-to-credential-manager-key-vault.md

Lines changed: 82 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,31 +22,104 @@ Azure Operator Nexus utilizes secrets and certificates to manage component secur
2222
> [!NOTE]
2323
> A single Key Vault can be used for any number of clusters.
2424
25-
## Writing Credential Updates to a Customer Key Vault on Nexus Cluster
25+
## Configure Managed Identity for Cluster Manager
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.
28+
29+
These examples describe how to configure a managed identity for a Cluster Manager.
30+
31+
- Create or update Cluster Manager with system-assigned identity
32+
```
33+
az networkcloud clustermanager create --name "clusterManagerName" --location "location" \
34+
--analytics-workspace-id "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName" \
35+
--fabric-controller-id "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/fabricControllerName" \
36+
--managed-resource-group-configuration name="my-managed-rg" --tags key1="myvalue1" key2="myvalue2" --resource-group "resourceGroupName" --mi-system-assigned
37+
```
38+
39+
- Create or update Cluster Manager with user-assigned identity
40+
```
41+
az networkcloud clustermanager create --name <Cluster Manager Name> --location <Location> \
42+
--analytics-workspace-id "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/microsoft.operationalInsights/workspaces/logAnalyticsWorkspaceName" \
43+
--fabric-controller-id "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/fabricControllerName" \
44+
--managed-resource-group-configuration name="my-managed-rg" --tags key1="myvalue1" key2="myvalue2" \
45+
--resource-group <Resource Group Name> --mi-user-assigned "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myUAI"
46+
```
47+
48+
- Add system assigned identity to Cluster Manager
49+
```
50+
az networkcloud clustermanager update --name <Cluster Manager Name> --resource-group <Resource Group Name> --mi-system-assigned
51+
```
52+
53+
- Add user assigned identity to Cluster Manager
54+
```
55+
az networkcloud clustermanager update --name <Cluster Manager Name> --resource-group <Resource Group Name> \
56+
--mi-user-assigned "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myUAI"
57+
```
58+
59+
## Get the Principal ID for the Managed Identity
60+
61+
Once a managed identity is configured, use the CLI to view the identity and the associated principal ID data within the cluster manager.
62+
63+
Example:
64+
65+
```console
66+
az networkcloud clustermanager show --ids /subscriptions/<Subscription ID>/resourceGroups/<Cluster Manager Resource Group Name>/providers/Microsoft.NetworkCloud/clusterManagers/<Cluster Manager Name>
67+
```
68+
69+
System-assigned identity example:
70+
```
71+
"identity": {
72+
"principalId": "2cb564c1-b4e5-4c71-bbc1-6ae259aa5f87",
73+
"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",
74+
"type": "SystemAssigned"
75+
},
76+
```
77+
78+
User-assigned identity example:
79+
```
80+
"identity": {
81+
"type": "UserAssigned",
82+
"userAssignedIdentities": {
83+
"/subscriptions/<subscriptionID>/resourcegroups/<resourceGroupName>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/<userAssignedIdentityName>": {
84+
"clientId": "e67dd610-99cf-4853-9fa0-d236b214e984",
85+
"principalId": "8e6d23d6-bb6b-4cf3-a00f-4cd640ab1a24"
86+
}
87+
}
88+
},
89+
```
90+
91+
## Using App IDs for Key Vault Access
92+
93+
> [!IMPORTANT]
94+
> Use of App IDs for Customer Key Vault access is deprecated and support will be removed in a future version. It is recommended to use managed identity principals.
95+
96+
Instead of managed identities, the following application IDs grant access to the Key Vault.
2697

2798
- Ensure that the *Microsoft.NetworkCloud* resource provider is registered with the customer subscription.
2899

29100
```console
30101
az provider register --namespace 'Microsoft.NetworkCloud' --subscription <Subscription ID>
31102
```
32103

33-
- 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 (IAM)* view, select to add a role assignment.
34-
35-
| Role Name | Role Definition ID |
36-
|:-------------------------------------------------------|:-------------------------------------|
37-
| Operator Nexus Key Vault Writer Service Role (Preview) | 44f0a1a8-6fea-4b35-980a-8ff50c487c97 |
104+
- When assigned role access to the key vault, use the following App IDs as principal IDs.
38105

39106
| Environment | App Name | App ID |
40107
|:------------|:----------------------|:-------------------------------------|
41108
| Production | AFOI-NC-RP-PME-PROD | 05cf5e27-931d-47ad-826d-cb9028d8bd7a |
42109
| Production | AFOI-NC-MGMT-PME-PROD | 3365d4ea-bb16-4bc9-86dd-f2c8cf6f1f56 |
43110

111+
## Writing Credential Updates to a Customer Key Vault on Nexus Cluster
112+
113+
- 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.
114+
115+
| Role Name | Role Definition ID |
116+
|:-------------------------------------------------------|:-------------------------------------|
117+
| Operator Nexus Key Vault Writer Service Role (Preview) | 44f0a1a8-6fea-4b35-980a-8ff50c487c97 |
118+
44119
Example:
45120

46121
```console
47-
az role assignment create --assignee 05cf5e27-931d-47ad-826d-cb9028d8bd7a --role 44f0a1a8-6fea-4b35-980a-8ff50c487c97 --scope /subscriptions/<Subscription ID>/resourceGroups/<Resource Group Name>/providers/Microsoft.KeyVault/vaults/<Key Vault Name>
48-
49-
az role assignment create --assignee 3365d4ea-bb16-4bc9-86dd-f2c8cf6f1f56 --role 44f0a1a8-6fea-4b35-980a-8ff50c487c97 --scope /subscriptions/<Subscription ID>/resourceGroups/<Resource Group Name>/providers/Microsoft.KeyVault/vaults/<Key Vault Name>
122+
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>
50123
```
51124

52125
- 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.

0 commit comments

Comments
 (0)