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
+74-30Lines changed: 74 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,24 +77,60 @@ 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
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
+
### 🔍 Determine Your Azure Cloud and Endpoints
103
+
104
+
Azure operates in multiple sovereign clouds, each with different service endpoints. Identify your cloud environment from the table below and set the corresponding variables:
105
+
106
+
| Cloud Name | Microsoft Graph (`GRAPH_ENDPOINT`) | Active Directory (`AD_ENDPOINT`) |
@@ -217,7 +253,7 @@ After this, the credential provider will continue to work via the federated cred
217
253
218
254
### ⚙️ Configure Access Token Version
219
255
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.
256
+
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
257
222
258
```bash
223
259
# Get the object ID of the app created above
@@ -226,7 +262,7 @@ OBJECT_ID=$(az ad app show --id "$APP_CLIENT_ID" --query "id" -o tsv)
4. Set `"requestedAccessTokenVersion": 2` in the JSON
239
275
5. Click **Save**
240
276
277
+
> **💾 Important:** For AzureChinaCloud, the key will be:
278
+
> `"accessTokenAcceptedVersion": 2`
279
+
241
280
---
242
281
243
-
## Step 2: 🔗 Federated Identity Credentials
282
+
## Step 3: 🔗 Federated Identity Credentials
244
283
245
284
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`
450
+
- 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
451
- The `token_spec.username` must be an existing Artifactory user
413
452
- Ensure the user has permissions to pull images from your repositories
414
453
@@ -430,7 +469,7 @@ curl -X GET "https://$ARTIFACTORY_URL/access/api/v1/oidc/$OIDC_PROVIDER_NAME" \
430
469
431
470
---
432
471
433
-
## Step 3B: Using Projected Service Account Tokens (Workload Identity)
472
+
## Step 4B: Using Projected Service Account Tokens (Workload Identity)
434
473
435
474
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
475
@@ -444,7 +483,7 @@ Instead of using the Nodepool's Managed Identity, you can use **Kubernetes Workl
444
483
445
484
4. The kubelet uses the registry token to authenticate and pull the container image
446
485
447
-
### Step 3B.1: ✅ Enable OIDC Issuer on AKS
486
+
### Step 4B.1: ✅ Enable OIDC Issuer on AKS
448
487
449
488
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
541
@@ -547,7 +586,7 @@ curl -X POST "https://$ARTIFACTORY_URL/access/api/v1/oidc/aks-workload-identity/
547
586
548
587
---
549
588
550
-
## Step 4: 🚀 Deploy Credentials Provider
589
+
## Step 5: 🚀 Deploy Credentials Provider
551
590
552
591
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
592
@@ -564,6 +603,7 @@ You can use the following commands to print the values you need:
|`azure_cloud_name`| Your Azure Cloud Name |`AzureCloud``AzureChinaCloud`|
576
617
|`azure_tenant_id`| Your Azure AD tenant ID |`12345678-1234-1234-1234-123456789012`|
577
618
|`azure_app_client_id`| The Azure AD application client ID |`87654321-4321-4321-4321-210987654321`|
578
619
|`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
625
585
-
Use this configuration if you're using the **nodepool's managed identity** (Steps 1-3A):
626
+
Use this configuration if you're using the **nodepool's managed identity** (Steps 2-4A):
586
627
587
628
```yaml
588
629
providerConfig:
@@ -595,6 +636,7 @@ providerConfig:
595
636
enabled: false # Set to false for nodepool identity
596
637
azure:
597
638
enabled: true
639
+
azure_cloud_name: "<cloud-name>"
598
640
azure_tenant_id: "<tenant-id>"
599
641
azure_app_client_id: "<app-client-id>"
600
642
azure_nodepool_client_id: "<nodepool-client-id>"
@@ -607,7 +649,7 @@ rbac:
607
649
608
650
#### Configuration for Workload Identity (Projected Service Account Tokens)
609
651
610
-
Use this configuration if you're using **Kubernetes Workload Identity** (Steps 3B):
652
+
Use this configuration if you're using **Kubernetes Workload Identity** (Steps 4B):
611
653
612
654
```yaml
613
655
providerConfig:
@@ -621,6 +663,7 @@ providerConfig:
621
663
serviceAccountTokenAudience: "<app-audience>"
622
664
azure:
623
665
enabled: true
666
+
azure_cloud_name: "<cloud-name>"
624
667
azure_app_client_id: "<app-client-id>"
625
668
azure_app_audience: "<app-audience>"
626
669
jfrog_oidc_provider_name: "<oidc-provider-name>"
@@ -631,7 +674,7 @@ rbac:
631
674
# Note: You must also create the service account and annotate it as described in Step 3B.2
632
675
```
633
676
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.
677
+
> **ℹ️ 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
678
636
679
637
680
### 📦 Install with Helm
@@ -714,3 +757,4 @@ For troubleshooting help, see the [debug documentation](./debug.md).
0 commit comments