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
+204-8Lines changed: 204 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,11 +75,21 @@ helm version
75
75
76
76
## 🚀 Setup Process
77
77
78
-
The setup process consists of four main steps:
78
+
There are **two authentication methods** available for the credential provider:
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.
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
+
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.
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
+
86
+
The setup process consists of the following steps:
79
87
80
88
1.**Azure AD App Registration** - Create an enterprise application in Azure AD
81
-
2.**Federated Identity Credentials** - Configure AKS nodepool access to the Azure App
Configure JFrog Artifactory to accept OIDC tokens from Azure. This involves creating an OIDC provider and an identity mapping in Artifactory.
335
345
@@ -420,13 +430,135 @@ curl -X GET "https://$ARTIFACTORY_URL/access/api/v1/oidc/$OIDC_PROVIDER_NAME" \
420
430
421
431
---
422
432
433
+
## Step 3B: Using Projected Service Account Tokens (Workload Identity)
434
+
435
+
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
+
437
+
**Flow Overview:**
438
+
439
+
1. The credential provider requests a service account token from Kubernetes with the AKS OIDC issuer audience
440
+
441
+
2. The provider exchanges the service account token for an OIDC access token from Azure AD using federated credentials
442
+
443
+
3. The provider exchanges the Azure OIDC token with Artifactory, which validates it and returns a short-lived registry access token
444
+
445
+
4. The kubelet uses the registry token to authenticate and pull the container image
446
+
447
+
### Step 3B.1: ✅ Enable OIDC Issuer on AKS
448
+
449
+
First, ensure your cluster has the OIDC issuer enabled to support Workload Identity:
450
+
451
+
```bash
452
+
# Set variables
453
+
RESOURCE_GROUP="your-resource-group"
454
+
CLUSTER_NAME="your-aks-cluster"
455
+
456
+
# Enable OIDC Issuer
457
+
az aks update \
458
+
--resource-group "$RESOURCE_GROUP" \
459
+
--name "$CLUSTER_NAME" \
460
+
--enable-oidc-issuer
461
+
462
+
# Retrieve the OIDC Issuer URL (Save this for Artifactory config)
> **ℹ️ Note:** The `JFrogExchange="true"` annotation tells the credential provider to use the projected service account token instead of the nodepool's managed identity.
> **⚠️ Important:** The `sub` claim must exactly match the Kubernetes service account format: `system:serviceaccount:<namespace>:<service-account-name>`
547
+
548
+
---
549
+
423
550
## Step 4: 🚀 Deploy Credentials Provider
424
551
425
552
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/).
426
553
427
554
### 📝 Prepare Values File
428
555
429
-
Create or update the values file at `./examples/azure-values.yaml` with your configuration values.
556
+
Example values files are provided for each authentication method:
557
+
558
+
-[`./examples/azure-values.yaml`](./examples/azure-values.yaml) — Values file for the Nodepool Managed Identity approach (Option A).
559
+
-[`./examples/azure-projected-sa-values.yaml`](./examples/azure-projected-sa-values.yaml) — Values file for the Workload Identity approach using projected service account tokens (Option B).
560
+
561
+
Update the relevant file with your configuration values.
430
562
431
563
You can use the following commands to print the values you need:
|`azure_app_audience`| The OIDC audience |`api://AzureADTokenExchange`|
448
580
|`jfrog_oidc_provider_name`| The name of the OIDC provider in Artifactory |`azure-aks-oidc-provider`|
449
581
|`artifactory_url`| Your JFrog Artifactory URL |`your-instance.jfrog.io`|
582
+
583
+
#### Configuration for Traditional Nodepool Identity
584
+
585
+
Use this configuration if you're using the **nodepool's managed identity** (Steps 1-3A):
586
+
587
+
```yaml
588
+
providerConfig:
589
+
- name: jfrog-credentials-provider
590
+
artifactoryUrl: "<your-instance-dns>"
591
+
matchImages:
592
+
- "<registry-pattern>"
593
+
defaultCacheDuration: 5m
594
+
tokenAttributes:
595
+
enabled: false # Set to false for nodepool identity
596
+
azure:
597
+
enabled: true
598
+
azure_tenant_id: "<tenant-id>"
599
+
azure_app_client_id: "<app-client-id>"
600
+
azure_nodepool_client_id: "<nodepool-client-id>"
601
+
azure_app_audience: "<app-audience>"
602
+
jfrog_oidc_provider_name: "<oidc-provider-name>"
603
+
604
+
rbac:
605
+
create: true
606
+
```
607
+
608
+
#### Configuration for Workload Identity (Projected Service Account Tokens)
609
+
610
+
Use this configuration if you're using **Kubernetes Workload Identity** (Steps 3B):
611
+
612
+
```yaml
613
+
providerConfig:
614
+
- name: jfrog-credentials-provider
615
+
artifactoryUrl: "<your-instance-dns>"
616
+
matchImages:
617
+
- "<registry-pattern>"
618
+
defaultCacheDuration: 5m
619
+
tokenAttributes:
620
+
enabled: true # Enable projected token support
621
+
serviceAccountTokenAudience: "<app-audience>"
622
+
azure:
623
+
enabled: true
624
+
azure_app_client_id: "<app-client-id>"
625
+
azure_app_audience: "<app-audience>"
626
+
jfrog_oidc_provider_name: "<oidc-provider-name>"
627
+
628
+
rbac:
629
+
create: true
630
+
631
+
# Note: You must also create the service account and annotate it as described in Step 3B.2
632
+
```
633
+
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.
0 commit comments