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
Copy file name to clipboardExpand all lines: articles/aks/access-control-managed-aad.md
+45-20Lines changed: 45 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,26 +8,38 @@ ms.custom: devx-track-azurecli
8
8
9
9
# Cluster access control with AKS-managed Azure Active Directory integration
10
10
11
-
## Use Conditional Access with Azure AD and AKS
12
-
13
-
When integrating Azure AD with your AKS cluster, you can also use [Conditional Access][aad-conditional-access] to control access to your cluster.
11
+
When you integrate Azure AD with your AKS cluster, you can use [Conditional Access][aad-conditional-access] or Privileged Identity Management (PIM) for just-in-time requests to control access to your cluster. This articles shows you how to enable Conditional Access and PIM on your AKS clusters.
14
12
15
13
> [!NOTE]
16
-
> Azure AD Conditional Access is an Azure AD Premium capability.
14
+
> Azure AD Conditional Access and Privileged Identity Management are Azure AD Premium capabilities requiring a Premium P2 SKU. For more on Azure AD SKUs, see the [pricing guide][aad-pricing].
15
+
16
+
## Before you begin
17
17
18
-
### Create an example Conditional Access policy to use with AKS
18
+
* See [AKS-managed Azure Active Directory integration](./managed-aad.md) for an overview and setup instructions.
19
+
20
+
## Use Conditional Access with Azure AD and AKS
19
21
20
22
1. In the Azure portal, go to the **Azure Active Directory** page and select **Enterprise applications**.
:::image type="content" source="./media/managed-aad/conditional-access-new-policy.png" alt-text="Adding a Conditional Access policy":::
23
-
3. Enter a name for the policy, for example **aks-policy**.
24
-
4. Under **Assignments** select **Users and groups**. Choose the users and groups you want to apply the policy to. In this example, choose the same Azure AD group that has administrator access to your cluster.
26
+
27
+
3. Enter a name for the policy, such as *aks-policy*.
28
+
29
+
4. Under **Assignments**, select **Users and groups**. Choose the users and groups you want to apply the policy to. In this example, choose the same Azure AD group that has administrator access to your cluster.
30
+
25
31
:::image type="content" source="./media/managed-aad/conditional-access-users-groups.png" alt-text="Selecting users or groups to apply the Conditional Access policy":::
26
-
5. Under **Cloud apps or actions > Include**, select **Select apps**. Search for **Azure Kubernetes Service** and select **Azure Kubernetes Service AAD Server**.
32
+
33
+
5. Under **Cloud apps or actions** > **Include**, select **Select apps**. Search for **Azure Kubernetes Service** and select **Azure Kubernetes Service AAD Server**.
34
+
27
35
:::image type="content" source="./media/managed-aad/conditional-access-apps.png" alt-text="Selecting Azure Kubernetes Service AD Server for applying the Conditional Access policy":::
28
-
6. Under **Access controls > Grant**, select **Grant access**, **Require device to be marked as compliant**, and **Require all the selected controls**.
36
+
37
+
6. Under **Access controls** > **Grant**, select **Grant access**, **Require device to be marked as compliant**, and **Require all the selected controls**.
38
+
29
39
:::image type="content" source="./media/managed-aad/conditional-access-grant-compliant.png" alt-text="Selecting to only allow compliant devices for the Conditional Access policy":::
40
+
30
41
7. Confirm your settings, set **Enable policy** to **On**, and then select **Create**.
42
+
31
43
:::image type="content" source="./media/managed-aad/conditional-access-enable-policy.png" alt-text="Enabling the Conditional Access policy":::
32
44
33
45
### Verify your Conditional Access policy has been successfully listed
@@ -48,42 +60,54 @@ When integrating Azure AD with your AKS cluster, you can also use [Conditional A
48
60
49
61
4. In the Azure portal, navigate to **Azure Active Directory** and select **Enterprise applications** > **Activity** > **Sign-ins**.
50
62
51
-
5. Under the **Conditional Access** column you should see a status of **Success**. Select the event and then select **Conditional Access** tab. Your Conditional Access policy will be listed.
63
+
5. Under the **Conditional Access** column you should see a status of *Success*. Select the event and then select the **Conditional Access** tab. Your Conditional Access policy will be listed.
64
+
52
65
:::image type="content" source="./media/managed-aad/conditional-access-sign-in-activity.png" alt-text="Screenshot that shows failed sign-in entry due to Conditional Access policy.":::
53
66
54
67
## Configure just-in-time cluster access with Azure AD and AKS
55
68
56
-
Another option for cluster access control is to use Privileged Identity Management (PIM) for just-in-time requests.
57
-
58
-
>[!NOTE]
59
-
> PIM is an Azure AD Premium capability requiring a Premium P2 SKU. For more on Azure AD SKUs, see the [pricing guide][aad-pricing].
60
-
61
-
### Integrate just-in-time access requests with an AKS cluster using AKS-managed Azure AD integration
62
-
63
69
1. In the Azure portal, go to **Azure Active Directory** and select **Properties**.
70
+
64
71
2. Note the value listed under **Tenant ID**. It will be referenced in a later step as `<tenant-id>`.
72
+
65
73
:::image type="content" source="./media/managed-aad/jit-get-tenant-id.png" alt-text="In a web browser, the Azure portal screen for Azure Active Directory is shown with the tenant's ID highlighted.":::
74
+
66
75
3. Select **Groups** > **New group**.
76
+
67
77
:::image type="content" source="./media/managed-aad/jit-create-new-group.png" alt-text="Shows the Azure portal Active Directory groups screen with the 'New Group' option highlighted.":::
68
-
4. Verify the group type **Security** is selected and specify a group name, such as **myJITGroup**. Under the option **Azure AD roles can be assigned to this group (Preview)**, select **Yes** and then select **Create**.
78
+
79
+
4. Verify the group type **Security** is selected and specify a group name, such as *myJITGroup*. Under the option **Azure AD roles can be assigned to this group (Preview)**, select **Yes** and then select **Create**.
80
+
69
81
:::image type="content" source="./media/managed-aad/jit-new-group-created.png" alt-text="Shows the Azure portal's new group creation screen.":::
82
+
70
83
5. On the **Groups** page, select the group you just created and note the Object ID. It will be referenced in a later step as `<object-id>`.
84
+
71
85
:::image type="content" source="./media/managed-aad/jit-get-object-id.png" alt-text="Shows the Azure portal screen for the just-created group, highlighting the Object Id":::
86
+
72
87
6. Create the AKS cluster with AKS-managed Azure AD integration using the [`az aks create`][az-aks-create] command with the `--aad-admin-group-objects-ids` and `--aad-tenant-id parameters` and include the values noted in the steps earlier.
73
88
74
89
```azurecli-interactive
75
90
az aks create -g myResourceGroup -n myManagedCluster --enable-aad --aad-admin-group-object-ids <object-id> --aad-tenant-id <tenant-id>
76
91
```
77
92
78
93
7. In the Azure portal, select **Activity** > **Privileged Access (Preview)** > **Enable Privileged Access**.
94
+
79
95
:::image type="content" source="./media/managed-aad/jit-enabling-priv-access.png" alt-text="The Azure portal's Privileged access (Preview) page is shown, with 'Enable privileged access' highlighted":::
96
+
80
97
8. To grant access, select **Add assignments**.
98
+
81
99
:::image type="content" source="./media/managed-aad/jit-add-active-assignment.png" alt-text="The Azure portal's Privileged access (Preview) screen after enabling is shown. The option to 'Add assignments' is highlighted.":::
82
-
9. From the **Select role** drop-down list, select the users and groups you want to grant cluster access. These assignments can be modified at any time by a group administrator. Then select **Next**.
100
+
101
+
9. From the **Select role** drop-down list, select the users and groups you want to grant cluster access. These assignments can be modified at any time by a group administrator. Then select **Next**.
102
+
83
103
:::image type="content" source="./media/managed-aad/jit-adding-assignment.png" alt-text="The Azure portal's Add assignments Membership screen is shown, with a sample user selected to be added as a member. The option 'Next' is highlighted.":::
84
-
10. Under **Assignment type**, select **Active** and then specify the desired duration. Provide a justification and then select **Assign**. For more information about assignment types, see [Assign eligibility for a privileged access group (preview) in Privileged Identity Management][aad-assignments].
104
+
105
+
10. Under **Assignment type**, select **Active** and then specify the desired duration. Provide a justification and then select **Assign**.
106
+
85
107
:::image type="content" source="./media/managed-aad/jit-set-active-assignment-details.png" alt-text="The Azure portal's Add assignments Setting screen is shown. An assignment type of 'Active' is selected and a sample justification has been given. The option 'Assign' is highlighted.":::
86
108
109
+
For more information about assignment types, see [Assign eligibility for a privileged access group (preview) in Privileged Identity Management][aad-assignments].
110
+
87
111
### Verify just-in-time access is working by accessing the cluster
88
112
89
113
1. Get the user credentials to access the cluster using the [`az aks get-credentials`][az-aks-get-credentials] command.
@@ -113,6 +137,7 @@ Another option for cluster access control is to use Privileged Identity Manageme
113
137
### Apply just-in-time access at the namespace level
114
138
115
139
1. Integrate your AKS cluster with [Azure RBAC](manage-azure-rbac.md).
140
+
116
141
2. Associate the group you want to integrate with just-in-time access with a namespace in the cluster using the [`az role assignment create`][az-role-assignment-create] command.
Copy file name to clipboardExpand all lines: articles/aks/manage-local-accounts-managed-aad.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,9 +8,15 @@ ms.custom: devx-track-azurecli
8
8
9
9
# Manage local accounts with AKS-managed Azure Active Directory integration
10
10
11
+
When you deploy an AKS cluster, local accounts are enabled by default. Even when you enable RBAC or Azure AD integration, `--admin` access still exists as a non-auditable backdoor option. This article shows you how to disable local accounts on an existing cluster, create a new cluster with local accounts disabled, and re-enable local accounts on existing clusters.
12
+
13
+
## Before you begin
14
+
15
+
* See [AKS-managed Azure Active Directory integration](./managed-aad.md) for an overview and setup instructions.
16
+
11
17
## Disable local accounts
12
18
13
-
When you deploy an AKS cluster, local accounts are enabled by default. Even when you enable RBAC or Azure AD integration, `--admin` access still exists as a non-auditable backdoor option. You can disable local accounts using the parameter `disable-local-accounts`. The `properties.disableLocalAccounts` field has been added to the managed cluster API to indicate whether the feature is enabled or not on the cluster.
19
+
You can disable local accounts using the parameter `disable-local-accounts`. The `properties.disableLocalAccounts` field has been added to the managed cluster API to indicate whether the feature is enabled or not on the cluster.
0 commit comments