Skip to content

Commit 1a9c3a6

Browse files
Merge pull request #258588 from gedrivera/eduardori/aad-keyset-update
AAD integration update for keysets
2 parents d7980ad + 583d6f6 commit 1a9c3a6

File tree

2 files changed

+39
-16
lines changed

2 files changed

+39
-16
lines changed

articles/operator-nexus/howto-baremetal-bmc-ssh.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ ms.custom: template-how-to, devx-track-azurecli
1414
> [!CAUTION]
1515
> Please note this process is used in emergency situations when all other troubleshooting options via Azure have been exhausted. SSH access to these bare metal machines is restricted to users managed via this method from the specified jump host list.
1616
17-
There are rare situations where a user needs to investigate & resolve issues with a bare metal machine and all other ways using Azure have been exhausted. Operator Nexus provides the `az networkcloud cluster bmckeyset` command so users can manage SSH access to the baseboard management controller (BMC) on these bare metal machines.
17+
There are rare situations where a user needs to investigate & resolve issues with a bare metal machine and all other ways using Azure have been exhausted. Operator Nexus provides the `az networkcloud cluster bmckeyset` command so users can manage SSH access to the baseboard management controller (BMC) on these bare metal machines. On keyset creation, users are validated against Microsoft Entra ID for proper authorization by cross referencing the User Principal Name provided for a user against the supplied Azure Group ID `--azure-group-id <Entra Group ID>`.
18+
19+
If the User Principal Name for a user isn't a member of the supplied group, the user's status is set to 'Invalid', and their status message will say "Invalid because userPrincipal isn't a member of AAD group." If the Azure Group ID is invalid, each user in the keyset has their status set to 'Invalid' and their status message will say "AAD group doesn't exist." Invalid users remain in the keyset but their key won't be enabled for SSH access.
20+
21+
> [!NOTE]
22+
> There is currently a transitional period where specifying User Principal Names is optional. In a future release, it will become mandatory and Microsoft Entra ID validation will be enforced for all users. Users are encouraged to add User Principal Names to their keysets before the transitional period ends (planned for July 2024) to avoid keysets being invalidated. Note that if any User Principal Names are added to a keyset, even if they are not added for all users, Microsoft Entra ID validation will be enabled, and this will result in the entire keyset being invalidated if the Group ID specified is not valid.
1823
1924
When the command runs, it executes on each bare metal machine in the Cluster with an active Kubernetes node. There's a reconciliation process that runs periodically that retries the command on any bare metal machine that wasn't available at the time of the original command. Also, any bare metal machine that returns to the cluster via an `az networkcloud baremetalmachine actionreimage` or `az networkcloud baremetalmachine actionreplace` command (see [BareMetal functions](./howto-baremetal-functions.md)) sends a signal causing any active keysets to be sent to the machine as soon as it returns to the cluster. Multiple commands execute in the order received.
2025

@@ -51,8 +56,9 @@ az networkcloud cluster bmckeyset create \
5156
--expiration <Expiration Timestamp> \
5257
--jump-hosts-allowed <List of jump server IP addresses> \
5358
--privilege-level <"Administrator" or "ReadOnly"> \
54-
--user-list '[{"description":"<User description>","azureUserName":"<User Name>", \
55-
"sshPublicKey":{"keyData":"<SSH Public Key>"}}]' \
59+
--user-list '[{"description":"<User List Description>","azureUserName":"<User Name>",\
60+
"sshPublicKey":{"keyData":"<SSH Public Key>"}, \
61+
"userPrincipalName":""}]', \
5662
--tags key1=<Key Value> key2=<Key Value> \
5763
--cluster-name <Cluster Name> \
5864
--resource-group <Resource Group Name>
@@ -88,6 +94,7 @@ az networkcloud cluster bmckeyset create \
8894
azure-user-name: Required. User name used to login to the server.
8995
description: The free-form description for this user.
9096
key-data: Required. The public ssh key of the user.
97+
userPrincipalName: Optional. The User Principal Name of the User.
9198
9299
Multiple users can be specified by using more than one --user-list argument.
93100
--tags : Space-separated tags: key[=value]
@@ -188,9 +195,9 @@ az networkcloud cluster bmckeyset update \
188195
--name <BMC Keyset Name> \
189196
--jump-hosts-allowed <List of jump server IP addresses> \
190197
--privilege-level <"Standard" or "Superuser"> \
191-
--user-list '[{"description":"<User description>",\
192-
"azureUserName":"<UserName>", \
193-
"sshPublicKey":{"keyData":"<SSH Public Key>"}}]' \
198+
--user-list '[{"description":"<User List Description>","azureUserName":"<User Name>",\
199+
"sshPublicKey":{"keyData":"<SSH Public Key>"}, \
200+
"userPrincipalName":""}]', \
194201
--tags key1=<Key Value> key2=<Key Value> \
195202
--cluster-name <Cluster Name> \
196203
--resource-group <Resource Group Name>
@@ -217,6 +224,7 @@ az networkcloud cluster bmckeyset update \
217224
azure-user-name: Required. User name used to login to the server.
218225
description: The free-form description for this user.
219226
key-data: Required. The public SSH key of the user.
227+
userPrincipalName: Optional. The User Principal Name of the User.
220228
221229
Multiple users can be specified by using more than one --user-list argument.
222230
--resource-group -g [Required] : Name of resource group. Optional if
@@ -236,7 +244,9 @@ az networkcloud cluster bmckeyset update \
236244
--name "bmcKeySetName" \
237245
--expiration "2023-12-31T23:59:59.008Z" \
238246
--user-list '[{"description":"Needs access for troubleshooting as a part of the support team",\
239-
"azureUserName":"userDEF","sshPublicKey":{"keyData":"ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1XoyYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"}}]\
247+
"azureUserName":"userDEF", \
248+
"sshPublicKey":{"keyData":"ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1XoyYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"}, \
249+
"userPrincipalName":"[email protected]"}] \
240250
--cluster-name "clusterName" \
241251
--resource-group "resourceGroupName"
242252
```

articles/operator-nexus/howto-baremetal-bmm-ssh.md

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ ms.custom: template-how-to, devx-track-azurecli
1414
> [!CAUTION]
1515
> Please note this process is used in emergency situations when all other troubleshooting options using Azure have been exhausted. SSH access to these bare metal machines is restricted to users managed via this method from the specified jump host list.
1616
17-
There are rare situations where a user needs to investigate & resolve issues with a bare metal machine and all other ways have been exhausted via Azure. Azure Operator Nexus provides the `az networkcloud cluster baremetalmachinekeyset` command so users can manage SSH access to these bare metal machines.
17+
There are rare situations where a user needs to investigate & resolve issues with a bare metal machine and all other ways have been exhausted via Azure. Azure Operator Nexus provides the `az networkcloud cluster baremetalmachinekeyset` command so users can manage SSH access to these bare metal machines. On keyset creation, users are validated against Microsoft Entra ID for proper authorization by cross referencing the User Principal Name provided for a user against the supplied Microsoft Entra ID `--azure-group-id <Entra Group ID>`.
18+
19+
If the User Principal Name for a user isn't a member of the supplied group, the user's status is set to 'Invalid', and their status message will say "Invalid because userPrincipal isn't a member of AAD group." If the Azure Group ID is invalid, each user in the keyset will have their status set to 'Invalid' and their status message will say "AAD group doesn't exist." Invalid users remain in the keyset but their key won't be enabled for SSH access.
20+
21+
> [!NOTE]
22+
> There is currently a transitional period where specifying User Principal Names is optional. In a future release, it will become mandatory and Microsoft Entra ID validation will be enforced for all users. Users are encouraged to add User Principal Names to their keysets before the transitional period ends (planned for July 2024) to avoid keysets being invalidated. Note that if any User Principal Names are added to a keyset, even if they are not added for all users, Microsoft Entra ID validation will be enabled, and this will result in the entire keyset being invalidated if the Group ID specified is not valid.
1823
1924
When the command runs, it executes on each bare metal machine in the Cluster with an active Kubernetes node. There's a reconciliation process that runs periodically that retries the command on any bare metal machine that wasn't available at the time of the original command. Also, any bare metal machine that returns to the cluster via an `az networkcloud baremetalmachine actionreimage` or `az networkcloud baremetalmachine actionreplace` command (see [BareMetal functions](./howto-baremetal-functions.md)) sends a signal causing any active keysets to be sent to the machine as soon as it returns to the cluster. Multiple commands execute in the order received.
2025

@@ -24,7 +29,7 @@ There's no limit to the number of users in a group.
2429
> Notes for jump host IP addresses
2530
2631
- The keyset create/update process adds the jump host IP addresses to the IP tables for each machine in the Cluster. This restricts SSH access to be allowed only from those jump hosts.
27-
- It's important to specify the Cluster facing IP addresses for the jump hosts. These IP addresses may be different than the public facing IP address used to access the jump host.
32+
- It's important to specify the Cluster facing IP addresses for the jump hosts. These IP addresses might be different than the public facing IP address used to access the jump host.
2833
- Once added, users are able to access bare metal machines from any specified jump host IP including a jump host IP defined in another bare metal machine keyset group.
2934
- Existing SSH access remains when adding the first bare metal machine keyset. However, the keyset command limits an existing user's SSH access to the specified jump host IPs in the keyset commands.
3035

@@ -55,13 +60,14 @@ az networkcloud cluster baremetalmachinekeyset create \
5560
--extended-location name=<Extended Location ARM ID> \
5661
type="CustomLocation" \
5762
--location <Azure Region> \
58-
--azure-group-id <Azure AAD Group ID> \
63+
--azure-group-id <Azure Group ID> \
5964
--expiration <Expiration Timestamp> \
6065
--jump-hosts-allowed <List of jump server IP addresses> \
6166
--os-group-name <Name of the Operating System Group> \
6267
--privilege-level <"Standard" or "Superuser"> \
6368
--user-list '[{"description":"<User List Description>","azureUserName":"<User Name>",\
64-
"sshPublicKey":{"keyData":"<SSH Public Key>"}}]' \
69+
"sshPublicKey":{"keyData":"<SSH Public Key>"}, \
70+
"userPrincipalName":""}]', \
6571
--tags key1=<Key Value> key2=<Key Value> \
6672
--cluster-name <Cluster Name> \
6773
--resource-group <Resource Group>
@@ -102,6 +108,7 @@ az networkcloud cluster baremetalmachinekeyset create \
102108
azure-user-name: Required. User name used to login to the server.
103109
description: The free-form description for this user.
104110
key-data: Required. The public ssh key of the user.
111+
userPrincipalName: Optional. The User Principal Name of the User.
105112
106113
Multiple users can be specified by using more than one --user-list argument.
107114
--os-group-name : The name of the group that users are assigned
@@ -150,8 +157,8 @@ az networkcloud cluster baremetalmachinekeyset create \
150157
--jump-hosts-allowed "192.0.2.1" "192.0.2.5" \
151158
--os-group-name "standardAccessGroup" \
152159
--privilege-level "Standard" \
153-
--user-list '[{"description":"Needs access for troubleshooting as a part of the support team","azureUserName":"userABC", "sshPublicKey":{"keyData":"ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1XoyYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"}},\
154-
{"description":"Needs access for troubleshooting as a part of the support team","azureUserName":"userXYZ","sshPublicKey":{"keyData":"ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXTSTRnIDpcf5qytjs1XoyYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"}}]' \
160+
--user-list '[{"description":"Needs access for troubleshooting as a part of the support team","azureUserName":"userABC", "sshPublicKey":{"keyData":"ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1XoyYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"},"userPrincipalName":"[email protected]"},\
161+
{"description":"Needs access for troubleshooting as a part of the support team","azureUserName":"userXYZ","sshPublicKey":{"keyData":"ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXTSTRnIDpcf5qytjs1XoyYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"}, "userPrincipalName":"[email protected]"}]' \
155162
--tags key1="myvalue1" key2="myvalue2" \
156163
--cluster-name "clusterName"
157164
--resource-group "resourceGroupName"
@@ -207,7 +214,8 @@ az networkcloud cluster baremetalmachinekeyset update \
207214
--jump-hosts-allowed <List of jump server IP addresses> \
208215
--privilege-level <"Standard" or "Superuser"> \
209216
--user-list '[{"description":"<User List Description>","azureUserName":"<User Name>",\
210-
"sshPublicKey":{"keyData":"<SSH Public Key>"}}]' \
217+
"sshPublicKey":{"keyData":"<SSH Public Key>"}, \
218+
"userPrincipalName":""}]', \
211219
--tags key1=<Key Value> key2=<Key Value> \
212220
--cluster-name <Cluster Name> \
213221
--resource-group <Resource Group>
@@ -234,6 +242,7 @@ az networkcloud cluster baremetalmachinekeyset update \
234242
azure-user-name: Required. User name used to login to the server.
235243
description: The free-form description for this user.
236244
key-data: Required. The public SSH key of the user.
245+
userPrincipalName: Optional. The User Principal Name of the User.
237246
238247
Multiple users can be specified by using more than one --user-list argument.
239248
--resource-group -g [Required] : Name of resource group. Optional if
@@ -253,9 +262,13 @@ az networkcloud cluster baremetalmachinekeyset update \
253262
--name "bareMetalMachineKeySetName" \
254263
--expiration "2023-12-31T23:59:59.008Z" \
255264
--user-list '[{"description":"Needs access for troubleshooting as a part of the support team",\
256-
"azureUserName":"userABC","sshPublicKey":{"keyData":"ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1XoyYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"}},\
265+
"azureUserName":"userABC", \
266+
"sshPublicKey":{"keyData":"ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1XoyYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"}, \
267+
"userPrincipalName":"[email protected]"},\
257268
{"description":"Needs access for troubleshooting as a part of the support team",\
258-
"azureUserName":"userXYZ","sshPublicKey":{"keyData":"ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXTSTRnIDpcf5qytjs1XoyYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"}}]' \
269+
"azureUserName":"userXYZ", \
270+
"sshPublicKey":{"keyData":"ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXTSTRnIDpcf5qytjs1XoyYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"}, \
271+
"userPrincipalName":"[email protected]"}]' \
259272
--cluster-name "clusterName" \
260273
--resource-group "resourceGroupName"
261274
```

0 commit comments

Comments
 (0)