Repository navigation
feat(credentials): add an explicit workload identity auth type for Azure Key Vault - #3485
khrisrichardson wants to merge 1 commit into
Conversation
PR validation —
|
| Status | Policy | Material | Messages |
|---|---|---|---|
pr-min-approvals |
pr-info |
|
|
| ✅ Passed | pr-description-required |
pr-info |
- |
| ✅ Passed | pr-user-story-linked |
pr-info |
- |
AI Session Checks — ⚠️ no AI session found
Missing AI Coding Sessions
This organization requires every PR to be backed by a Chainloop Trace AI coding session, and none was found for this one.
Please make sure the AI coding session evidence has been sent by the Chainloop CLI, or add the skip-ai-session label to this PR to bypass this check.
Learn more about Chainloop Trace.
Security Checks — ✅ 7 passing
✅ AI Security Analysis
Nothing this change touches re-opens a recorded security fix.
View in Chainloop ↗ · How this works ↗
✅ secret-scan
| Status | Policy | Messages |
|---|---|---|
| ✅ Passed | secrets-detection |
- |
✅ sast-scan
| Status | Policy | Messages |
|---|---|---|
| ✅ Passed | owasp-top10-2025 |
- |
| ✅ Passed | sast |
- |
| ✅ Passed | cwe-top25 |
- |
| ✅ Passed | cwe-top26-40-cusp |
- |
✅ iac-scan
| Status | Policy | Messages |
|---|---|---|
| ✅ Passed | iac-misconfiguration |
- |
Scans not applied (2)
| Scan | Reason |
|---|---|
vulnerability-scan |
no manifest/lockfile changed |
github-actions-scan |
no workflow files changed |
Powered by Chainloop and Chainloop Trace
There was a problem hiding this comment.
All reported issues were addressed across 7 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
1c0f566 to
aad673c
Compare
|
Thank you for this contribution. Before we can merge it, please fix these items:
|
9dc57b0 to
b25743f
Compare
…ure Key Vault AzureKeyVault gains an auth_type enum. AUTH_TYPE_WORKLOAD_IDENTITY authenticates as client_id through AKS Workload Identity, using the federated token the workload identity webhook projects into the pod, so no client secret is stored. AUTH_TYPE_CREDENTIALS keeps the service principal client secret, and AUTH_TYPE_UNSPECIFIED is treated as AUTH_TYPE_CREDENTIALS, so existing configurations do not change. The operator must select workload identity explicitly. The manager rejects AUTH_TYPE_CREDENTIALS without a client secret, so a forgotten secret fails at startup instead of silently switching the authentication method, and rejects AUTH_TYPE_WORKLOAD_IDENTITY with a client secret. The chart exposes secretsBackend.azureKeyVault.authType and renders client_secret only for AUTH_TYPE_CREDENTIALS. The README documents the pod label and service account annotation that workload identity needs. Assisted-by: Claude Code Signed-off-by: Khris Richardson <khris.richardson@gmail.com>
b25743f to
975c2c0
Compare
|
Thanks. Rebased on main. The commit is signed and carries Checks run locally (container golang:1.27.3; chainloop main d4fc985 vs this branch): CI: the Actions workflows (Test, Lint, CodeQL) have never run on this PR. As a first-time contributor's fork PR they waited for approval and expired after 30 days. Could a maintainer approve the runs after this push? The integration tests (testcontainers: Vault, AWS, the credentials manager) only run there; we ran everything else locally. One question about the AI-session check: #3487 carries the |
Part of #3488.
The Azure Key Vault backend authenticated only with a service principal client secret: a long-lived credential that has
to be stored and rotated. AKS Workload Identity issues the pod a federated token for the same app registration instead.
Following the review of #3486, the operator now selects the mode explicitly.
AzureKeyVaultgains anauth_typeenum:AUTH_TYPE_CREDENTIALS(andAUTH_TYPE_UNSPECIFIED, so existing configurations do not change): the client secretis used, as before. A missing secret is still an error.
AUTH_TYPE_WORKLOAD_IDENTITY: the tenant and client ID are used with azidentity'sWorkloadIdentityCredential,which reads the token that the workload identity webhook projects (
AZURE_FEDERATED_TOKEN_FILE). Setting a clientsecret is an error, and so is a missing token file.
defined_only), and by the manager.Chart:
secretsBackend.azureKeyVault.authType(defaultAUTH_TYPE_CREDENTIALS).client_secretrenders only forAUTH_TYPE_CREDENTIALS. A secret set with workload identity, or an unknownauthType, fails at template time. Chartversion bumped to 1.493.1.
To use workload identity, the pods need the
azure.workload.identity/use: "true"label and the controlplane and casservice accounts need the
azure.workload.identity/client-id: <clientID>annotation. The README shows both. The labelgoes through
commonLabels, becausecontrolplane.podLabelsandcas.podLabelscurrently feed only the affinityrules and never reach the pod template.
AI assistance: this PR was written with the help of Claude Code. Each commit carries an
Assisted-by: Claude Codetrailer.