Repository navigation
Federated identity credentials for managed identities - #154
Merged
Merged
Conversation
managedIdentities[].serviceAccounts creates, per ServiceAccount, a federated identity credential on the identity trusting the AKS cluster's OIDC issuer (AZURE_AKS_OIDC_ISSUER_URL), so workloads can authenticate as the identity through AKS Workload Identity. Credentials are created sequentially, are never retained on delete nor imported. Applies to AzureDatabase and AzureManagedDatabase. CRDs regenerated with controller-gen v0.22.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Per-tenant migration jobs now copy the template pod's azure.workload.identity/* labels and annotations, so the AKS Workload Identity webhook injects tokens into their pods. Nothing else is copied: templates without such keys produce the same clones as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The provisioner reads the AKS OIDC issuer from the optional azure-config key aksOidcIssuerUrl; clusters without it are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fraliv13
previously approved these changes
Oct 14, 2026
Federated credential names join namespace and ServiceAccount with '_' (illegal in Kubernetes names) so distinct ServiceAccounts can't collide, and AZURE_AKS_OIDC_ISSUER_URL must be an https URL. README documents the naming, the manual recovery step after a lost Pulumi state (no import) and that an invalid spec fails the whole stack. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fraliv13
self-requested a review
October 14, 2026 14:47
fraliv13
approved these changes
Oct 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Lets Kubernetes workloads authenticate to Azure SQL as the managed identities that
AzureDatabase/AzureManagedDatabasealready provision, through AKS Workload Identity.managedIdentities[].serviceAccounts({name, namespace?}): for each ServiceAccount a federated identity credential is created on the (tenant-scoped) identity, with subjectsystem:serviceaccount:<namespace>:<name>(namespace defaults to the CR's), audienceapi://AzureADTokenExchangeand issuerAZURE_AKS_OIDC_ISSUER_URL.<namespace>_<name>(dots in the name become-):_is illegal in Kubernetes names, so distinct ServiceAccounts can't collide.identity.Name.PULUMI_IMPORT_ALLcan't adopt existing credentials: delete them (az identity federated-credential delete) and the next reconcile recreates them (documented in the README).https://URL, name/namespace present, valid and unique credential names, at most 20 per identity. Like other spec validation errors, a failure stops the reconcile of the whole tenant/domain stack.client-idannotation; workloads select the identity by the exportedidentityClientId.azure.workload.identity/*labels and annotations (and nothing else), so the webhook injects tokens into migration pods. Templates without such keys produce the same clones as before.AZURE_AKS_OIDC_ISSUER_URLfrom the optionalazure-configkeyaksOidcIssuerUrl; clusters without the key are unchanged.@latest), hence the version annotation change on every CRD.Test plan
go teston all packageshelm template: only the new env lines differ; absent when Azure is disabled🤖 Generated with Claude Code