Identity binding (previously called trust domain) - workload identity federation
Identity binding feature allows users to map an Entra user-assigned managed identity to any number of cluster or subject (namespace, service account) combinations to address the current 20 FIC limitation per identity. For each binding, user provides the cluster ARM Id to specify which managed identities are usable via workload identity on any cluster. Post that, they’d then create a ClusterRole and ClusterRoleBinding within the cluster specifying the service accounts that are allowed to use the managed identity.
Tentative UX:
- Cluster operator creates identity binding resource
az aks identity-binding create \
--name <binding-name> \
--resource-group <group-name> \
--managed-identity-resource-id <identity-resource-id> \
--cluster-name <cluster name>
This step sets up an issuer per each identity binding and the output of the above step surfaces the identity-binding-issuer needed for step 3. AKS maintains a unique identity binding issuer per each managed identity. So even if identity binding is created for same managed identity mapped to a different cluster, the same identity binding issuer is used for the same allowing for the same issuer value under FIC (from step 3) to be used across multiple clusters
- User creates a cluster role and role binding identifying the namespace and service account that can use the managed identity
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: allow-clientid-1
rules:
- verbs: ["use-managed-identity"]
apiGroups: ["cid.wi.aks.azure.com"]
resources: ["<client-id-1>"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: allow-clientid-1-binding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: allow-clientid-1
subjects:
- kind: ServiceAccount
name: mysa
namespace: ns
- User creates FIC mapping the managed identity and identity binding.
az identity federated-credential create \
--name ${FEDERATED_IDENTITY_CREDENTIAL_NAME} \
--identity-name "${USER_ASSIGNED_IDENTITY_NAME}" \
--resource-group "${RESOURCE_GROUP}" \
--issuer "<identity_binding_issuer>" \
--subject "<ARM-ID-managed-identity>"\
--audience api://AzureADTokenExchange
Tentative ETA for preview June 2025
@shashankbarsin Will this resolve these issues? https://github.com/Azure/AKS/issues/3982 https://github.com/Azure/AKS/issues/2861
For the ETA for a preview which type of preview is that expected to be?
@colincmac - It'll address #3982. #2861 will be addressed by structured authentication integration, that's currently being planned and will share an update on that soon too..
@OmnipotentOwl - Most likely a private preview to begin with. Closer to release, we will share a form where you can share your subscriptionId and we will enable the feature flag.
All the Subjects in a trust domain will have the same prefix, will it also share the Issuer?
reopening this issue as it was wrongly closed as stale by the bot. this feature is still on the roadmap and still on track for a preview in CY2025H1.
@Richard87 - this feature (trust domain) would result in the same issuer URL for the trust domain and wouldn't impact the subject part, which remains a tuple of <namespace, service-account>. For flexibility on declaration of subjects, we have a different feature on the roadmap to provide the ability to declare the subject using prefix patterns - https://github.com/Azure/AKS/issues/4688
@shashankbarsin will this feature be dependent on Fleet Manager - ie will the clusters have to be a part of a Fleet Manager fleet to be a part of the trust domain?
@ChrisF987-coles - no it won't be dependent on Fleet Manager
Hi @shashankbarsin!
can you confirm the CY2025H1 ETA is still a valid date for the preview?
I'm very interested to try this feature to deploy, and authenticate, at scale an app on multiple AKS clusters
Thanks!
Updated the issue description to capture the tentative UX planned for the feature and to provide a more granular timeline. Still tracking for CY2025H1 and looking at June 2025 for preview.
Hi @shashankbarsin, is it still on track to be delivered in June, have a use case dependent on this feature.
Hi! I updated my az cli, but the command az aks identity-binding create is not recognized by it.
Are further steps required to try out this in preview?
Hi! Any updated timeline for when we can start to test this?
🥳 It's about to drop: https://github.com/Azure/AKS/pull/5430
It seems I have missudnerstood the feature, especially reading the documentation and the description above again. Can you confirm/deny this UX?
- 1 Managed Identity created by Platform Operators (
Platform MI) - Assign the
Platform MIwith Identity binding to 2-3 AKS clusters - Our users have their own Managed Identity with Workload Identity Enabled (
AppX MI) - Our users can select to use their MI with our Platform MI (A jwt with the
Platform MIas issuer, butAZURE_CLIENT_ID=AppX MIClient id
And Offocurse, AppY MI and AppZ MI etc will continue to work, but can select the Platform MI as issuer when they are ready (will require a RBAC role to allow selecting the Platform MI as issuer).
In other words, I expected a new annotation like this:
apiVersion: v1
kind: ServiceAccount
metadata:
annotations:
azure.workload.identity/client-id: "${AppX_MI}"
azure.workload.identity/identity-binding-client-id: "${Platform_MI}" # This guy is MIA
name: appx-server
namespace: appx
---
apiVersion: v1
kind: Pod
metadata:
name: appx-server
namespace: appx
labels:
azure.workload.identity/use: "true"
spec:
serviceAccountName: appx-server
containers:
- image: ghcr.io/azure/azure-workload-identity/msal-go
name: oidc
env:
- name: AZURE_CLIENT_ID
value: ${AppX_MI}
- name: AZURE_TENANT_ID
value: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
- name: AZURE_FEDERATED_TOKEN_FILE
value: /var/run/secrets/azure/tokens/azure-identity-token
- name: AZURE_AUTHORITY_HOST
value: https://login.microsoftonline.com/
+1 @Richard87
If the MI needs to be owned by the cluster operator then this is basically unusable in multi-tenancy setups. Reasonably, cluster users need to be able to "bring their own" MI's so that they can control their own role assignments, etc.?
I'm a bit confused now. Does this feature resolve https://github.com/Azure/AKS/issues/3982 or not?
wic, err := NewWorkloadIdentityCredential(&WorkloadIdentityCredentialOptions{
AdditionallyAllowedTenants: additionalTenants,
ClientOptions: options.ClientOptions,
DisableInstanceDiscovery: options.DisableInstanceDiscovery,
TenantID: options.TenantID,
EnableAzureTokenProxy: true,
})
Default Credential Chain Link: https://github.com/Azure/azure-sdk-for-go/blob/dea9249d894d9a2908a605f3b7460b95ec93db14/sdk/azidentity/default_azure_credential.go#L154
Currently we have tested and are able to authenticate for our use case by setting the WorkloadIdentityCredentialOptions.EnableAzureProxy: true in the default credential chain.
Now query from our side:
Will the identity binding feature be added in the DefaultAzureCredential chain?
@benjaminapetersen @shashankbarsin
For python MSFT Support told me no. I have already raised the same request with python identity sdk and they refused apparently because of some security issue. ==> As a result, we are now forced to migrate a number of apps on our side, from Default to WorkloadId.
the GA of this is targeted for H2 this year - stay tuned for more.