Auth: support Entra workload identity federation (client assertion from a file) for the Azure provider #54617
Replies: 1 comment
|
You've described the gap correctly, and it's real. The Your PR supabase/auth#2990 (open, by you) looks like the right shape for this: Until that merges, the realistic workarounds are:
One thing worth flagging to reviewers: the PR is Azure-only for now, but the same file-based assertion pattern would apply to any provider that supports federated credentials, so it may be worth discussing whether the option should be generic per-provider rather than Azure-specific. Either way, this is a genuine gap, not a misconfiguration — the PR is the fix. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Problem
The built-in Azure provider can only authenticate the code exchange with a client secret (
GOTRUE_EXTERNAL_AZURE_SECRET). Teams running GoTrue on Kubernetes (AKS, EKS, GKE) increasingly use Entra workload identity federation instead. The Entra app trusts the cluster's service account issuer, and the pod sends a short-lived projected token asclient_assertion. No secret has to be stored or rotated.Why the recent private_key_jwt support doesn't cover it
Related: #50814 (
private_key_jwtfor custom OIDC providers).supabase/auth#2932–#2936 added
private_key_jwt, which:GOTRUE_EXPERIMENTAL_CLIENT_ASSERTION_KEYS). Federated credentials need a token issued by the platform's OIDC issuer, so there's still a private key to manage.Proposal
Add an optional
GOTRUE_EXTERNAL_AZURE_CLIENT_ASSERTION_FILE. When it is set, the Azure provider reads the file on each exchange, sends it asclient_assertionin the form body (the same request shape as supabase/auth#2936), and doesn't need a secret. Unset, nothing changes.PR: supabase/auth#2990
All reactions