identity: the forge host's own Google identity (Authentik client -> WIF, no key file) #55
No reviewers
Labels
No labels
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
key-store/key.store!55
Loading…
Reference in a new issue
No description provided.
Delete branch "identity/forge-host-wif"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
KSE-0182 A.2 phase 1 host leg: Authentik forge-host client-credentials provider + agenix client id/secret; google-wif-credentials.service/timer writing /run/google-wif/{subject-token,credentials.json} (direct principal, no SA impersonation) with a mode that performs the STS exchange; authentik-forge-host WIF provider in infra/identity. Sequence: merge -> forge switch (creates the Authentik app) -> identity apply (Google fetches the issuer discovery doc) -> on the forge. Verified: dry-activate builds; tofu fmt/validate clean; forge key decrypts the new secrets.
KSE-0182 Amendment A.2, phase 1 host leg. - Authentik: a `forge-host` client-credentials provider/application (key.store Forge Host; subMode user_username; 1 h tokens; no redirect URIs), declared next to the existing namespace/cloud-signing machine providers. Client id + secret minted into agenix (secrets/forge/wif-client-{id,secret}.age; founder + forge recipients). - Scripts/forge-google-wif-credentials.sh: `refresh` mints the Authentik token with the release lanes' stdlib helper and writes /run/google-wif/subject-token (0640 root:google-wif) + credentials.json (Google external_account, credential_source.file, direct principal, no service-account impersonation); `check` additionally performs the STS exchange and fails if federation does not work -- the phase-1 host exit criterion. - Nix: users.groups.google-wif; google-wif-credentials.service + timer (OnBootSec 3m, every 20 min, after authentik-key-store-ready); agenix secrets forgeHostOidcClient{Id,Secret}. Consumers (OpenBao seal, Garage GCS leg) attach in phase 2/4 via GOOGLE_APPLICATION_CREDENTIALS + SupplementaryGroups=google-wif. - infra/identity/wif.tf: provider authentik-forge-host in the pool (issuer https://idp.key.store/application/o/forge-host/, allowed_audiences = client id, condition azp == client id, constant attribute.authority "forge-host"); output google_wif_forge_host_principal for the seal-key / bucket IAM bindings that follow. Google fetches the issuer discovery document at create time, so: forge switch first, then identity apply. Verified: nixos-rebuild dry-activate builds; the OIDC-applications config carries the forge-host provider; forge key decrypts both new secrets; tofu fmt/validate clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>Phase 1 host leg — proven (2026-08-16 11:44Z).
Invalid grant_type for provider; sync gainedgrantTypes, forge-host =client_credentials; timerOnActiveSecso s-t-c can never run it inside the activation window) + #60 (the Nix spec builder had droppedgrantTypes).46c39e1a(deploy runs 17253/17269 green). Provider 29grant_types = {client_credentials}.google-wif-credentials.servicesucceeds: tokeniss=…/application/o/forge-host/ aud=azp=key-store-forge-host sub=ak-key.store Forge Host-client_credentials,/run/google-wif/{subject-token 0640 root:google-wif, credentials.json}.authentik-forge-hostprovider created.forge-google-wif-credentials.sh check→STS exchange ok: token_type=Bearer expires_in=3596s— the host federates into Google with no key file. Phase 1 exit criteria (A.5) both met.Next (phase 2): seal key + host IAM in
infra/identity(Google-only stack;infra/openbaocannot run before OpenBao is up), OpenBao unit fixes (postgres group,GOOGLE_APPLICATION_CREDENTIALS, ordering), init with recovery keys to the founder offline, then bootstrapinfra/openbaofrom the forge.