Skip to content

azure: support any OIDC issuer for workload identity setup#35

Open
Avi-Robusta wants to merge 1 commit into
masterfrom
avi/azure-single-any-oidc
Open

azure: support any OIDC issuer for workload identity setup#35
Avi-Robusta wants to merge 1 commit into
masterfrom
avi/azure-single-any-oidc

Conversation

@Avi-Robusta

Copy link
Copy Markdown
Contributor

What

Generalizes the single-cluster Azure workload-identity setup (servers/azure/setup-azure-identity.sh) so it federates to any OIDC issuer — AWS EKS, GKE, self-managed, or AKS — instead of assuming AKS.

Why

The workload-identity path previously derived the OIDC issuer from an AKS cluster (az aks update / az aks show), so it only worked on AKS. Users running Holmes on non-AKS clusters (e.g. AWS EKS) couldn't use secretless workload identity for the Azure MCP.

Changes

  • Add --oidc-issuer <url>. When provided, the script skips the AKS-specific calls and federates the managed identity directly to that issuer.
  • Preserve the original behavior when --oidc-issuer is omitted: derive the issuer from --aks-cluster (and enable AKS workload identity).
  • --resource-group remains required (it holds the managed identity in Azure); --aks-cluster is now only needed for the derive-from-AKS path.
  • Add an EKS --help example and a comment noting that non-AKS clusters must project a service account token with audience api://AzureADTokenExchange (no AKS webhook to inject it).

The federated-credential creation was already issuer-agnostic (--issuer "$OIDC_ISSUER"), so only the issuer-resolution logic needed generalizing.

Example (EKS)

./setup-azure-identity.sh --auth-method workload-identity --resource-group myRG \
  --oidc-issuer https://oidc.eks.us-east-1.amazonaws.com/id/EXAMPLE

Testing

  • bash -n passes.
  • Logic verified: --oidc-issuer provided → skips AKS calls; neither --oidc-issuer nor --aks-cluster → clear error.

Note

This scopes to the setup script only. The single-account Helm deployment template still relies on the AKS webhook to inject the token; end-to-end EKS support in the deployment (manual token projection) is tracked separately.

🤖 Generated with Claude Code

Generalize the single-cluster Azure workload-identity setup so it works
with any OIDC issuer (AWS EKS, GKE, self-managed), not only AKS.

- Add --oidc-issuer <url>; when provided, skip the AKS-specific
  `az aks update`/`az aks show` calls and federate the managed identity
  directly to that issuer.
- Keep the existing derive-from-AKS path when --oidc-issuer is omitted
  (requires --aks-cluster).
- --resource-group is still required (holds the managed identity).
- Add an EKS example and note that non-AKS clusters must project a
  service account token with audience api://AzureADTokenExchange.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant