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: AZURE.md
+76-30Lines changed: 76 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,24 +77,62 @@ helm version
77
77
78
78
There are **two authentication methods** available for the credential provider:
79
79
80
-
-**Option A: Nodepool Managed Identity** (Steps 1 → 2 → 3A → 4) — Uses the AKS nodepool's user-assigned managed identity to authenticate via Azure IMDS.
80
+
-**Option A: Nodepool Managed Identity** (Steps 1 → 2 → 3 → 4A → 5) — Uses the AKS nodepool's user-assigned managed identity to authenticate via Azure IMDS.
81
81
> **Choose this when:** You want a straightforward setup, all nodes in the pool can share the same identity, and you don't need per-workload credential isolation.
82
82
83
-
-**Option B: Workload Identity** (Steps 1 → 2 → 3B → 4) — Uses Kubernetes projected service account tokens. Provides better security isolation as each service account can have its own identity.
83
+
-**Option B: Workload Identity** (Steps 1 → 2 → 3 → 4B → 5) — Uses Kubernetes projected service account tokens. Provides better security isolation as each service account can have its own identity.
84
84
> **Choose this when:** You need fine-grained, per-service-account access control, want to follow the zero-trust principle, or your organization requires workload-level identity isolation.
85
85
86
86
The setup process consists of the following steps:
87
87
88
-
1.**Azure AD App Registration** - Create an enterprise application in Azure AD
89
-
2.**Federated Identity Credentials** - Configure AKS nodepool access to the Azure App
90
-
3.**JFrog Artifactory OIDC Configuration** - Choose one of:
91
-
-**Step 3A:** Configure using Nodepool Managed Identity
92
-
-**Step 3B:** Configure using Workload Identity (Projected Service Account Tokens)
93
-
4.**Deploy Credentials Provider** - Deploy the credential provider using Helm
88
+
1.**Identify Azure Cloud Name** - Determine your Azure cloud environment (optional for `AzureCloud`, required for sovereign clouds)
89
+
2.**Azure AD App Registration** - Create an enterprise application in Azure AD
90
+
3.**Federated Identity Credentials** - Configure AKS nodepool access to the Azure App
91
+
4.**JFrog Artifactory OIDC Configuration** - Choose one of:
92
+
-**Step 4A:** Configure using Nodepool Managed Identity
93
+
-**Step 4B:** Configure using Workload Identity (Projected Service Account Tokens)
94
+
5.**Deploy Credentials Provider** - Deploy the credential provider using Helm
94
95
95
96
---
96
97
97
-
## Step 1: 🔐 Azure AD App Registration
98
+
## Step 1: 🌍 Identify Azure Cloud Name and Endpoints
99
+
100
+
Before configuring the credential provider, you need to identify which Azure cloud environment you're using and set the appropriate endpoints. Different Azure clouds have different endpoints for Microsoft Graph and Active Directory authentication.
101
+
102
+
> **ℹ️ Note:** If you are using the default Azure public cloud (`AzureCloud`), `azure_cloud_name` is optional and defaults to `AzureCloud`. You can skip setting it in your Helm values. For sovereign clouds like `AzureChinaCloud`, you must set it explicitly.
103
+
104
+
### 🔍 Determine Your Azure Cloud and Endpoints
105
+
106
+
Azure operates in multiple sovereign clouds, each with different service endpoints. Identify your cloud environment from the table below and set the corresponding variables:
107
+
108
+
| Cloud Name | Microsoft Graph (`GRAPH_ENDPOINT`) | Active Directory (`AD_ENDPOINT`) |
@@ -217,7 +255,7 @@ After this, the credential provider will continue to work via the federated cred
217
255
218
256
### ⚙️ Configure Access Token Version
219
257
220
-
The credential provider uses `https://login.microsoftonline.com` as the issuer URL (instead of the older `https://sts.windows.net/`). Azure requires you to set `requestedAccessTokenVersion` to `2` for this to work.
258
+
The credential provider uses the Active Directory endpoint (e.g., `$AD_ENDPOINT`) as the issuer URL. Azure requires you to set `requestedAccessTokenVersion` to `2` for this to work.
221
259
222
260
```bash
223
261
# Get the object ID of the app created above
@@ -226,7 +264,7 @@ OBJECT_ID=$(az ad app show --id "$APP_CLIENT_ID" --query "id" -o tsv)
4. Set `"requestedAccessTokenVersion": 2` in the JSON
239
277
5. Click **Save**
240
278
279
+
> **💾 Important:** For AzureChinaCloud, the key will be:
280
+
> `"accessTokenAcceptedVersion": 2`
281
+
241
282
---
242
283
243
-
## Step 2: 🔗 Federated Identity Credentials
284
+
## Step 3: 🔗 Federated Identity Credentials
244
285
245
286
Federated credentials allow the AKS nodepool's managed identity to exchange tokens with the Azure AD App Registration. This establishes trust between your AKS cluster and Azure AD.
- The `claims.aud` must match your `azure_app_client_id`
411
-
- The `claims.iss` must match the Azure AD issuer URL: `https://login.microsoftonline.com/$TENANT_ID/v2.0`
452
+
- The `claims.iss` must match the Azure AD issuer URL: `$AD_ENDPOINT/$TENANT_ID/v2.0` (e.g., `https://login.microsoftonline.com/$TENANT_ID/v2.0` for AzureCloud)
412
453
- The `token_spec.username` must be an existing Artifactory user
413
454
- Ensure the user has permissions to pull images from your repositories
414
455
@@ -430,7 +471,7 @@ curl -X GET "https://$ARTIFACTORY_URL/access/api/v1/oidc/$OIDC_PROVIDER_NAME" \
430
471
431
472
---
432
473
433
-
## Step 3B: Using Projected Service Account Tokens (Workload Identity)
474
+
## Step 4B: Using Projected Service Account Tokens (Workload Identity)
434
475
435
476
Instead of using the Nodepool's Managed Identity, you can use **Kubernetes Workload Identity**. This allows the Credential Provider to use a specific Kubernetes Service Account to authenticate with Artifactory. This method provides better security isolation as each service account can have its own Azure AD app registration.
436
477
@@ -444,7 +485,7 @@ Instead of using the Nodepool's Managed Identity, you can use **Kubernetes Workl
444
485
445
486
4. The kubelet uses the registry token to authenticate and pull the container image
446
487
447
-
### Step 3B.1: ✅ Enable OIDC Issuer on AKS
488
+
### Step 4B.1: ✅ Enable OIDC Issuer on AKS
448
489
449
490
First, ensure your cluster has the OIDC issuer enabled to support Workload Identity:
> **ℹ️ Note:** The `JFrogExchange="true"` annotation tells the credential provider to use the projected service account token instead of the nodepool's managed identity.
You must point Artifactory to your AKS Cluster's OIDC Issuer instead of the global Azure Login URL for this flow:
502
543
@@ -547,7 +588,7 @@ curl -X POST "https://$ARTIFACTORY_URL/access/api/v1/oidc/aks-workload-identity/
547
588
548
589
---
549
590
550
-
## Step 4: 🚀 Deploy Credentials Provider
591
+
## Step 5: 🚀 Deploy Credentials Provider
551
592
552
593
Deploy the credential provider using Helm. For manual deployment with Kubernetes manifests, refer to the [Kubernetes Kubelet Credential Provider documentation](https://kubernetes.io/docs/tasks/administer-cluster/kubelet-credential-provider/).
553
594
@@ -564,6 +605,7 @@ You can use the following commands to print the values you need:
|`azure_cloud_name`| Your Azure Cloud Name (optional, defaults to `AzureCloud`) |`AzureCloud``AzureChinaCloud`|
576
619
|`azure_tenant_id`| Your Azure AD tenant ID |`12345678-1234-1234-1234-123456789012`|
577
620
|`azure_app_client_id`| The Azure AD application client ID |`87654321-4321-4321-4321-210987654321`|
578
621
|`azure_nodepool_client_id`| Client ID of the user-assigned managed identity attached to the AKS nodepool (also added to the app registration's federated credential) |`11111111-2222-3333-4444-555555555555`|
#### Configuration for Traditional Nodepool Identity
584
627
585
-
Use this configuration if you're using the **nodepool's managed identity** (Steps 1-3A):
628
+
Use this configuration if you're using the **nodepool's managed identity** (Steps 2-4A):
586
629
587
630
```yaml
588
631
providerConfig:
@@ -595,6 +638,7 @@ providerConfig:
595
638
enabled: false # Set to false for nodepool identity
596
639
azure:
597
640
enabled: true
641
+
azure_cloud_name: "<cloud-name>"# Optional, defaults to AzureCloud
598
642
azure_tenant_id: "<tenant-id>"
599
643
azure_app_client_id: "<app-client-id>"
600
644
azure_nodepool_client_id: "<nodepool-client-id>"
@@ -607,7 +651,7 @@ rbac:
607
651
608
652
#### Configuration for Workload Identity (Projected Service Account Tokens)
609
653
610
-
Use this configuration if you're using **Kubernetes Workload Identity** (Steps 3B):
654
+
Use this configuration if you're using **Kubernetes Workload Identity** (Steps 4B):
611
655
612
656
```yaml
613
657
providerConfig:
@@ -621,6 +665,7 @@ providerConfig:
621
665
serviceAccountTokenAudience: "<app-audience>"
622
666
azure:
623
667
enabled: true
668
+
azure_cloud_name: "<cloud-name>"# Optional, defaults to AzureCloud
624
669
azure_app_client_id: "<app-client-id>"
625
670
azure_app_audience: "<app-audience>"
626
671
jfrog_oidc_provider_name: "<oidc-provider-name>"
@@ -631,7 +676,7 @@ rbac:
631
676
# Note: You must also create the service account and annotate it as described in Step 3B.2
632
677
```
633
678
634
-
> **ℹ️ Note:** When using Workload Identity, ensure the service account `jfrog-provider-sa` is annotated with `JFrogExchange="true"` and the Azure App Client ID as shown in Step 3B.2.
679
+
> **ℹ️ Note:** When using Workload Identity, ensure the service account `jfrog-provider-sa` is annotated with `JFrogExchange="true"` and the Azure App Client ID as shown in Step 4B.2.
635
680
636
681
637
682
### 📦 Install with Helm
@@ -714,3 +759,4 @@ For troubleshooting help, see the [debug documentation](./debug.md).
0 commit comments