Repository navigation
fix(self-update): use WorkloadIdentityCredential on AKS (not ManagedIdentityCredential) - #116
Merged
Merged
Conversation
…dentityCredential
AcrTagLister authenticated to ACR with ManagedIdentityCredential (IMDS) whenever AZURE_CLIENT_ID
was set. But the portal's UAMI is FEDERATED (workload identity), not assigned to the node VMSS, so
IMDS returns no token → every self-update poll failed ("[SelfUpdate] check failed") and no install
could ever discover an update. Detect AKS workload identity by AZURE_FEDERATED_TOKEN_FILE (injected
by the WI webhook alongside AZURE_CLIENT_ID/TENANT_ID) and use WorkloadIdentityCredential, which
exchanges the projected service-account token for an AAD token. Verified on atioz: with the portal
UAMI + AcrPull + the SA federated credential + the memex-portal-sa ServiceAccount, the poller now
authenticates and lists ACR tags with zero errors.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Contributor
Test Results (shard 1)969 tests +130 968 ✅ +132 4m 17s ⏱️ +17s Results for commit e2c75cf. ± Comparison against base commit acac76c. This pull request removes 13 and adds 143 tests. Note that renamed tests count towards both. |
Contributor
Contributor
Contributor
Test Results 47 files ± 0 47 suites ±0 22m 15s ⏱️ -8s Results for commit e2c75cf. ± Comparison against base commit acac76c. This pull request removes 13 and adds 143 tests. Note that renamed tests count towards both. |
This was referenced Sep 17, 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.
Completes the operational self-update install (follows #110).
AcrTagListerusedManagedIdentityCredential(IMDS) whenAZURE_CLIENT_IDwas set — but the portal's UAMI is federated (workload identity), not VMSS-assigned, so IMDS returns no token and every self-update poll failed ([SelfUpdate] check failed).Fix: detect AKS workload identity by
AZURE_FEDERATED_TOKEN_FILE(injected by the WI webhook) and useWorkloadIdentityCredential, which exchanges the projected SA token for an AAD token. Falls back to user-assigned MI (VMSS/IMDS) when onlyAZURE_CLIENT_IDis set, else the dev chain.Verified live on client-i with the now-provisioned: portal UAMI
memexaks-portal-mi+ AcrPull onmeshweaver, theclient-i:memex-portal-safederated credential, and thememex-portal-saServiceAccount + get/patch RBAC. The poller authenticates and lists ACR tags with 0 errors (canPatch=True).Must merge so future images the self-updater rolls to keep the fix.
🤖 Generated with Claude Code