Skip to content

Commit 95d40ff

Browse files
authored
Update troubleshoot-aks-control-plane-authentication-external-identity-providers.md
Edit review per CI 8206
1 parent bf08eea commit 95d40ff

1 file changed

Lines changed: 46 additions & 46 deletions

File tree

support/azure/azure-kubernetes/security/troubleshoot-aks-control-plane-authentication-external-identity-providers.md

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Troubleshoot AKS control plane authentication using external identity providers
3-
description: Helps you troubleshoot authentication issues when accessing the Azure Kubernetes Service control plane using external identity providers
3+
description: Helps you troubleshoot authentication issues when accessing the Azure Kubernetes Service control plane by using external identity providers
44
ms.reviewer: shasb
55
ms.service: azure-kubernetes-service
66
ms.topic: troubleshooting-general
@@ -16,40 +16,40 @@ zone_pivot_groups: aks-external-identity-provider
1616
:::
1717
-->
1818

19-
This article helps you troubleshoot authentication issues when accessing the Azure Kubernetes Service (AKS) control plane using external identity providers.
19+
This article helps you troubleshoot authentication issues when you access the Azure Kubernetes Service (AKS) control plane by using external identity providers.
2020

2121
## Prerequisites
2222

23-
- Azure CLI version 2.61.0 or later. To determine the version, run `az --version`. If you need to install or upgrade, see [Install Azure CLI](/cli/azure/install-azure-cli).
24-
- A tool to connect to the Kubernetes cluster, like the `kubectl` tool. To install `kubectl` using Azure CLI, run the [az aks install-cli](/cli/azure/aks#az-aks-install-cli) command.
25-
- The JSON Web Token (JWT) authenticator configuration file used for your AKS cluster.
23+
- Azure CLI version 2.61.0 or later. To determine the version, run `az --version`. If you have to install or upgrade, see [Install Azure CLI](/cli/azure/install-azure-cli).
24+
- A tool to connect to the Kubernetes cluster, such as the `kubectl` tool. To install `kubectl` by using Azure CLI, run the [az aks install-cli](/cli/azure/aks#az-aks-install-cli) command.
25+
- The JSON Web Token (JWT) authenticator configuration file that's used for your AKS cluster.
2626
- Access to [jwt.ms][jwt-ms] or a similar JWT token decoder tool for debugging tokens.
2727

2828
## Troubleshooting checklist
2929

3030
### Step 1: Verify identity provider configuration
3131

32-
Ensure your identity provider is correctly configured and accessible. Use the following steps.
32+
Make sure that your identity provider is correctly configured and accessible. Follow these steps:
3333

3434
::: zone pivot="github"
3535

36-
1. Verify your GitHub repository has **Actions** enabled.
37-
2. Confirm the OpenID Connect (OIDC) provider settings are correctly configured in your workflow.
38-
3. Ensure the audience claim in your workflow matches the authenticator configuration.
36+
1. Verify that your GitHub repository has **Actions** enabled.
37+
2. Verify that the OpenID Connect (OIDC) provider settings are correctly configured in your workflow.
38+
3. Make sure that the audience claim in your workflow matches the authenticator configuration.
3939

4040
::: zone-end
4141

4242
::: zone pivot="google-identity"
4343

44-
Verify the OAuth 2.0 client ID and client secret are correct.
44+
Verify that the OAuth 2.0 client ID and client secret are correct.
4545

4646
::: zone-end
4747

4848
### Step 2: Validate the issuer URL
4949

50-
The issuer URL must be accessible from the AKS cluster nodes. Use the following steps.
50+
The issuer URL must be accessible from the AKS cluster nodes. Follow these steps.
5151

52-
1. Verify DNS resolution for the issuer URL.
52+
1. Verify DNS resolution for the issuer URL:
5353

5454
::: zone pivot="github"
5555

@@ -67,7 +67,7 @@ The issuer URL must be accessible from the AKS cluster nodes. Use the following
6767

6868
::: zone-end
6969

70-
2. Test network connectivity from a cluster node.
70+
2. Test network connectivity from a cluster node:
7171

7272
::: zone pivot="github"
7373

@@ -85,16 +85,16 @@ The issuer URL must be accessible from the AKS cluster nodes. Use the following
8585

8686
::: zone-end
8787

88-
3. Verify firewall rules and network security groups allow outbound HTTPS traffic to the identity provider.
88+
3. Verify that firewall rules and network security groups allow outbound HTTPS traffic to the identity provider.
8989

9090
### Step 3: Inspect the JWT authenticator configuration
9191

92-
Review your JWT authenticator configuration for common issues. Use the following steps.
92+
Review your JWT authenticator configuration for common issues. Follow these steps:
9393

94-
1. Verify the issuer URL exactly matches the `iss` claim in your tokens.
95-
2. Check that the audience claim in the configuration matches the `aud` claim in your tokens.
96-
3. Ensure Common Expression Language (CEL) expressions in claim mappings are syntactically correct.
97-
4. Confirm that all username and group mappings include the `aks:jwt:` prefix.
94+
1. Verify that the issuer URL exactly matches the `iss` claim in your tokens.
95+
2. Verify that the audience claim in the configuration matches the `aud` claim in your tokens.
96+
3. Make sure that Common Expression Language (CEL) expressions in claim mappings are syntactically correct.
97+
4. Verify that all username and group mappings include the `aks:jwt:` prefix.
9898

9999
Example configuration:
100100

@@ -175,11 +175,11 @@ Example configuration:
175175

176176
### Step 4: Decode and verify JWT tokens
177177

178-
Verify claims and obtain and inspect the JWT token. Use the following steps.
178+
Verify claims, and obtain and inspect the JWT token. Follow these steps:
179179

180180
::: zone pivot="github"
181181

182-
1. For GitHub Actions OIDC, tokens are typically obtained within a workflow. Obtain a token.
182+
1. For GitHub Actions OIDC, tokens are typically obtained within a workflow. Obtain a token:
183183

184184
```bash
185185
# This is typically done within a GitHub Actions workflow
@@ -192,7 +192,7 @@ Verify claims and obtain and inspect the JWT token. Use the following steps.
192192

193193
::: zone pivot="google-identity"
194194

195-
1. Get a token from Google Identity.
195+
1. Get a token from Google Identity:
196196

197197
```bash
198198
kubectl oidc-login get-token \
@@ -203,17 +203,17 @@ Verify claims and obtain and inspect the JWT token. Use the following steps.
203203

204204
::: zone-end
205205

206-
2. Decode the token at [jwt.ms][jwt-ms] and verify the following:
206+
2. Decode the token at [jwt.ms][jwt-ms], and verify the following items:
207207

208208
- The `iss` claim matches your issuer URL exactly.
209209
- The `aud` claim matches your configured audience.
210210
- The token isn't expired (`exp` claim).
211211
- Required claims for username and groups are present.
212-
- Claims match the format expected by your CEL expressions.
212+
- Claims match the format that's expected by your CEL expressions.
213213

214214
### Step 5: Check AKS API server logs
215215

216-
Review the AKS API server logs for authentication errors. Use the following steps.
216+
Review the AKS API server logs for authentication errors. Follow these steps:
217217

218218
1. Use diagnostic settings to [enable resource logs][aks-resource-logs] for your AKS cluster. Choose **Kubernetes API Server** when creating the diagnostic setting.
219219
2. Check logs in Azure Monitor or Azure Log Analytics for authentication failures.
@@ -229,7 +229,7 @@ The audience claim in the token doesn't match the configured audience in the JWT
229229

230230
### Solution: Update the authenticator configuration
231231

232-
Verify the audience claim in your token and update the JWT authenticator configuration.
232+
Verify the audience claim in your token, and update the JWT authenticator configuration.
233233

234234
```azurecli-interactive
235235
az aks jwtauthenticator update \
@@ -255,8 +255,8 @@ The OAuth client or OIDC provider settings are incorrect.
255255

256256
::: zone pivot="github"
257257

258-
1. Verify the workflow file includes the correct `permissions` for `id-token: write`.
259-
2. Ensure the `audience` parameter matches your authenticator configuration.
258+
1. Verify that the workflow file includes the correct `permissions` for `id-token: write`.
259+
2. Make sure that the `audience` parameter matches your authenticator configuration.
260260

261261
::: zone-end
262262

@@ -274,13 +274,13 @@ The OAuth client or OIDC provider settings are incorrect.
274274

275275
CEL expressions might have syntax errors or return unexpected data types.
276276

277-
### Solution: Validate CEL expressions
277+
### Solution: Verify CEL expressions
278278

279279
1. Review the CEL expressions in your configuration.
280-
2. Test expressions using a CEL evaluator to ensure they return strings for username and arrays of strings for groups.
281-
3. Update the configuration with corrected expressions:
280+
2. Test expressions by using a CEL evaluator to make sure that they return strings for username and arrays of strings for groups.
281+
3. Update the configuration to correct the expressions:
282282

283-
The following is an example of a valid CEL expression for extracting groups:
283+
The following code is an example of a valid CEL expression for extracting groups:
284284

285285
```json
286286
{
@@ -295,17 +295,17 @@ The following is an example of a valid CEL expression for extracting groups:
295295

296296
**Cause: Cluster nodes cannot reach the identity provider**
297297

298-
Network security groups, firewalls, or Domain Name System (DNS) issues prevent the cluster from accessing the identity provider.
298+
Issues that affect network security groups, firewalls, or Domain Name System prevent the cluster from accessing the identity provider.
299299

300300
### Solution 1: Verify DNS resolution
301301

302-
1. Connect to a cluster node using `kubectl debug`.
302+
1. Connect to a cluster node by using `kubectl debug`:
303303

304304
```bash
305305
kubectl debug node/<node-name> -it --image=mcr.microsoft.com/azurelinux/base/core:3.0
306306
```
307307

308-
2. Test DNS resolution.
308+
2. Test DNS resolution:
309309

310310
::: zone pivot="github"
311311

@@ -325,23 +325,23 @@ Network security groups, firewalls, or Domain Name System (DNS) issues prevent t
325325

326326
### Solution 2: Update network security rules
327327

328-
1. Review network security group rules associated with your AKS cluster.
329-
2. Ensure outbound HTTPS (port 443) traffic is allowed to your identity provider's domain.
330-
3. If using Azure Firewall, add application rules for the identity provider URLs.
328+
1. Review network security group rules that are associated with your AKS cluster.
329+
2. Make sure that outbound HTTPS (port 443) traffic is allowed to your identity provider's domain.
330+
3. If you use Azure Firewall, add application rules for the identity provider URLs.
331331

332332
### Issue 4: Missing `aks:jwt:` prefix in username or groups
333333

334334
**Cause: Claim mappings don't include the required prefix**
335335

336-
All usernames and groups must be prefixed with `aks:jwt:` to prevent conflicts with other authentication methods.
336+
To prevent conflicts with other authentication methods, all usernames and groups must be prefixed by using `aks:jwt:`.
337337

338338
### Solution: Add the required prefix
339339

340340
Update your JWT authenticator configuration to include the `aks:jwt:` prefix. For example:
341341

342342
::: zone pivot="github"
343343

344-
For GitHub Actions OIDC, create a file named `jwt-config.json` with the following configuration:
344+
For GitHub Actions OIDC, create a file that's named `jwt-config.json` that has the following configuration:
345345

346346
```json
347347
{
@@ -381,7 +381,7 @@ For GitHub Actions OIDC, create a file named `jwt-config.json` with the followin
381381

382382
### Google OAuth 2.0 Configuration
383383

384-
Create a file named `jwt-config.json` with the following configuration:
384+
1. Create a file that's named `jwt-config.json` that has the following configuration:
385385

386386
```json
387387
{
@@ -420,7 +420,7 @@ Create a file named `jwt-config.json` with the following configuration:
420420

421421
::: zone-end
422422

423-
Then update the authenticator.
423+
1. Update the authenticator:
424424

425425
```azurecli-interactive
426426
az aks jwtauthenticator update \
@@ -438,13 +438,13 @@ To get more detailed information about authentication failures:
438438

439439
1. Enable diagnostic settings on your AKS cluster.
440440
2. Configure the Log Analytics workspace to capture `Kubernetes API Server` logs.
441-
3. Check API server logs for any JWT authenticator-related issue like incorrect claim mappings leading to validation errors.
441+
3. Check API server logs for any JWT authenticator-related issue such as incorrect claim mappings that cause validation errors.
442442

443443
### Resources
444444

445-
- [jwt.ms site](https://jwt.ms)
446-
- [Supported resource logs for Microsoft.ContainerService/managedClusters](/azure/aks/monitor-aks-reference#supported-resource-logs-for-microsoftcontainerservicemanagedclusters)
445+
[jwt.ms site](https://jwt.ms)
446+
[Supported resource logs for Microsoft.ContainerService/managedClusters](/azure/aks/monitor-aks-reference#supported-resource-logs-for-microsoftcontainerservicemanagedclusters)
447447

448448
[!INCLUDE [Azure Help Support](~/includes/azure-help-support.md)]
449449

450-
[!INCLUDE [Third-party contact disclaimer](~/includes/third-party-contact-disclaimer.md)]
450+
[!INCLUDE [Third-party contact disclaimer](~/includes/third-party-contact-disclaimer.md)]

0 commit comments

Comments
 (0)