AKS icon indicating copy to clipboard operation
AKS copied to clipboard

Flexible subject declaration in federated identity credentials - Integration with AKS

Open shashankbarsin opened this issue 1 year ago • 12 comments

Currently federated identity credentials created as part of workload identity require static declaration of subject <service-account-name, namespace-name>. Flexible FIC would allow for prefix pattern based declaration, thus allowing for scalable FIC declaration on subject.

Tentative ETA for preview: CY2025H1

shashankbarsin avatar Dec 05 '24 22:12 shashankbarsin

Hi,

GCP's implementation of workload identity supports CEL. Are there any plans to introduce this in Azure as well? Our use-case is an ephemeral environment, where we append a unique identifier for each PR.

We have an implementation today that uses the Graph API whenever a new deployment is detected, but this feels very hacky, rather than just specifying a prefix, similar to assertion.subject.startsWith('system:serviceaccount:my-namespace:my-service').

nilfr avatar Feb 17 '25 09:02 nilfr

Hi @shashankbarsin, We're actively using AKS and have partially migrated to Workload Identity following the deprecation of AAD Pod Identity. However, due to the current limitation of 20 federated identity credentials (FICs) per managed identity, we've been constrained in fully completing the migration.

We're excited about this new capability and would appreciate any guidance on the steps required to enable or adopt it. We're also very interested in participating as early adopters—please let us know how we can get involved.

Thank you !

atiasadir avatar May 31 '25 02:05 atiasadir

Hey @shashankbarsin Can you acknowledge that user assigned managed identity will be supported? We are thrilled to adopt it soon as it will be applicable.

atiasadir avatar Jun 01 '25 09:06 atiasadir

Any news on when we might expect this ? Really would help us out with our use case of many namespaces in a single cluster

skinny avatar Jul 02 '25 19:07 skinny

Hello, any news on this because it's already nearing CY2026, any update on ETA?

Hazmi35 avatar Dec 21 '25 23:12 Hazmi35

Any news ?

jdeus avatar Jan 16 '26 23:01 jdeus

Is it covered by https://learn.microsoft.com/en-us/azure/aks/identity-bindings-concepts? If so, when will AKS with API server virtual network integration be supported?

fmonbillard avatar Jan 29 '26 15:01 fmonbillard

nope

jdeus avatar Aug 05 '26 03:08 jdeus

This issue had gone stale and I realized we hadn't updated this issue with the feature documetation and the issue had gone stale. Sharing an update here -

Identity bindings feature was released in November 2025 to address the 20 FIC scale limitation issue on top of user assigned managed identities - https://learn.microsoft.com/en-us/azure/aks/identity-bindings#authorize-namespaces-and-service-accounts. The authorization within the cluster on which subject(s) can use a managed identity, done via ClusterRole and ClusterRoleBinding, allows for using K8s RBAC's subject referral UX to select either a single service account in a namespace or any service account from a namespace or all service accounts across all namespaces of a cluster. With namespace being the tenancy boundary in K8s above approach caters to the requirement of providing ability to authorize multiple subjects at scale if needed.

If there are scenarios that require pattern matching despite the above availability via K8s RBAC to refer to subjects at scale, please let us know of those scenarios/requirements.

shashankbarsin avatar Sep 02 '26 04:09 shashankbarsin

Hi @shashankbarsin,

Thanks for providing the update. I know myself and many others in the community are eagerly waiting for news about this feature.

From what I've understood watching this feature develop, I don't believe it solves our use case for two reasons:

  1. This only works with managed identities. For historical reasons we are still using App Registrations and having to transition to managed identities is a lot of effort.
  2. Even were it possible to use an App Registration, we need more flexibility than what K8s RBAC subject referral allows. Our use case is an internal development platform (labs) where each lab is in its own namespace (namespace-1, namespace-2, etc.). In each namespace is a copy of our platform. We want a ServiceAccount (call it application-service) to be able to bind to an Azure identity regardless of which namespace it is in. In reality, these ServiceAccounts also are named w/ the namespace (such as application-service-1, application-service-2) but they should all be allowed to use the same identity. The K8s RBAC subject specification doesn't allow this.

From this comment on Azure/azure-workload-identity#373:

https://github.com/Azure/azure-workload-identity/issues/373#issuecomment-1699674948

We had a conversation with Nick Ludwig back in October 2023 where we presented this use case and were told that prefix matching would be supported:

something like "claims['sub'] startswith 'system:serviceaccount:dam-'" would be valid

Happy to forward you this email chain if you are curious about this use case.

chandlerkent avatar Sep 02 '26 13:09 chandlerkent

Will this limitation be lifted in the near future?

Limitations Identity bindings aren't yet supported on clusters configured with API server VNet integration.

EppO avatar Sep 02 '26 15:09 EppO

Enough with this. Increase that limit now

jdeus avatar Sep 02 '26 15:09 jdeus