-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Add support for Microsoft Entra Pod Identity as an authentication mechanism #908
Comments
Actually there is, we are using it in production quite a while. You need a workload identity enabled cluster, a K8S ServiceAccount mapped to a UserIdentity and then you can use a providerconfig like this: apiVersion: azure.upbound.io/v1beta1
kind: ProviderConfig
metadata:
name: azure-provisioning-tenantABC
namespace: crossplane-system
labels:
azure.workload.identity/use: "true"
spec:
clientID: {{ .Values.clientId }}
credentials:
source: OIDCTokenFile
oidcTokenFilePath: /var/run/secrets/azure/tokens/azure-identity-token
subscriptionID: {{ .Values.subscriptionId }}
tenantID: {{ .Values.tenantId }} We use this as apiVersion: pkg.crossplane.io/v1beta1
kind: DeploymentRuntimeConfig
metadata:
name: provider-azure-family-config
spec:
deploymentTemplate:
spec:
selector: {}
template:
metadata:
labels:
azure.workload.identity/use: "true"
gap.hdi.global/scrape-metrics: "true"
spec:
# { optional stuff to configure proxy and security settings}
serviceAccountName: crossplane-azure-provisioning # we created this serviceaccount and tied it to an azure identity for workload identity federation usage Provider Config: apiVersion: pkg.crossplane.io/v1
kind: Provider
metadata:
name: azure-provider-network
spec:
runtimeConfigRef:
name: provider-azure-family-config
package: "<custom image location>"
# otherwise providers tries to resolve azure family from xpkg.upbound.io
skipDependencyResolution: true We have a lot of tenants in the cluster and each tenant has a dedicated Hope that helps. This uses WorkloadIdentity which is the successor of PodIdentity, which is preview and deprecated (or already removed?). |
Just to clarify - so this way, access is scoped to workloads that use the |
Yes, even one step further down the road. It is scoped to the Example: The UserManagedIdentity has The ServiceAccount of the crossplane provider will get the access tokens depending on the credentials you configured in the Maybe a good read is the basic flow for WorkloadIdentityFederation in general: https://learn.microsoft.com/en-us/azure/aks/workload-identity-overview?tabs=dotnet#how-it-works In the end the crossplane providers are just pods using the mechanism to fetch the access token. |
Many thanks, I will try it out. Would be nice to have this documented in https://github.com/crossplane-contrib/provider-upjet-azure/blob/main/AUTHENTICATION.md (I can potentially add a PR for it it as soon as I get this working) |
So I did the following:
And I'm stuck on the following issue despite trying different configurations / provider versions:
Considering that you've mentioned that you created the Many thanks in advance |
Ah sorry, yes the Maybe try to remove the Afaik there is no additional cluster role binding required. |
What problem are you facing?
Currently, there's no option to scope rich Crossplane permissions to a certain
ServiceAccount
, like EKS Pod Identity or IRSA in AWS do.What could help solve your problem?
Would be nice to have Microsoft Entra Pod Identity as a more secure authentication mechanism option.
The text was updated successfully, but these errors were encountered: