Repository navigation
feat(secrets): all provider credentials via orun secrets — CI keeps only GITHUB_TOKEN - #34
Conversation
…nly GITHUB_TOKEN (phase 2) Completes the migration #31 started. Every provider credential now resolves from orun secrets at the project rung, brokered from the workspace's integrations: - cloudflare-hyperdrive: CLOUDFLARE_API_TOKEN maps to the new CLOUDFLARE_HYPERDRIVE_TOKEN (hyperdrive-edit template — Workers Hyperdrive Write, which the workers-deploy token deliberately lacks). - CLOUDFLARE_ACCOUNT_ID + TF_VAR_cloudflare_account_id: the account-id connection-fact template (non-secret custody anchor) — bound by the worker deploy profiles (stack-tectonic 0.15.0) and the kv/hyperdrive components. - supabase: SUPABASE_ACCESS_TOKEN minted fresh per run (management-access); TF_VAR_supabaseOrgId from the org-id connection fact. SUPABASE_API_KEY aliasing is retired (the provider reads SUPABASE_ACCESS_TOKEN natively). - db-migrate: SUPABASE_ACCESS_TOKEN via component secretEnv. - ci.yml: the provider env block is gone — GITHUB_TOKEN (GitHub-issued, ephemeral) is the only credential CI holds. Verified: a synthetic push-main plan against stack-tectonic 0.15.0 shows 36 jobs carrying refs — 14 worker deploys × 2 envs (token + account id), kv/hyperdrive (token + account id + TF_VAR), supabase (token + org id), db-migrate (token). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…w retired (phase 3) Every worker that had managed runtime secrets in the AWS Secrets Manager escrow now declares them as optionalSecretEnv references (best-effort: unseeded keys skip at resolve) plus a runtimeSecrets parameter naming what the stack's secrets-live v2 step pushes via wrangler secret bulk after deploy. Seeding a value in orun secrets makes the next deploy push it — zero repo changes per secret: - identity-worker: GITHUB_OAUTH_CLIENT_SECRET, GOOGLE_OAUTH_CLIENT_SECRET, OAUTH_STATE_SECRET - billing-worker: POLAR_ACCESS_TOKEN, POLAR_WEBHOOK_SECRET - config-worker + webhooks-worker: SECRET_ENCRYPTION_KEY (config-worker's generate-if-missing pre-deploy stays as the safety net; seed the CURRENT deployed value — a fresh key bricks stored data) - integrations-worker: the deferred GitHub App set + INTEGRATIONS_STATE_SECRET + SECRET_ENCRYPTION_KEY — inert until seeded, exactly the point tooling/secrets-sync/ and tests/secrets-sync/ are deleted (assemble/check/ sync, manifests, fixtures, escrow runbook), the lockfile regenerated, and the blueprint module list updated. stack-tectonic 0.15.0 -> 0.16.0 (secrets-live v2), orun v2.39.0 -> v2.41.0 (optionalSecretEnv). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Every fork now carries flows/ (bootstrap-flow.yaml, create-secrets.sh, batch.sh, park.mjs, README.md) via a new blueprint module in the workspace phase. The files carry LUMEN's instance identity (lumen-api-edge URLs, lumen.app zone note, org default "lumen") so the rebrand hook rewrites them for a fork like every other file; the org default fails loudly at preflight for any operator without access to the baseline workspace. create-secrets.sh self-heals: a key whose integration connection was revoked (health orphaned) is revoked and recreated against the current ACTIVE connection. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ublished job output secrets Mirrors the nimbus flip (stack 0.18.0, orun v2.45.0, orun-cloud SB1 + SEC-JOB), adapted to lumen's identity: - terraform roots: backend http (runner TF_HTTP_*), aws provider and all aws_secretsmanager_* resources gone; supabase creds + wiring documents leave as OUTPUTS lease-published by the runner (secretOutputs param). - consumers: hyperdrive TF_VARs, db-migrate runner env (no @aws-sdk), workers' WIRING_<COMP>_<ENV> secretEnv. - bootstrap component DELETED (it existed to prove the S3 state bucket); blueprint module + phases regenerated; batch plan reordered (kv → supabase → db-migrate+hyperdrive → workers…). - intent: stack 0.18.0, aws params dropped; ci.yml pins orun v2.45.0. ⚠ DO NOT MERGE before running tooling/migrations/tfstate-to-orun.sh (S3 state pull → drop SM resources from state → push to the platform backend; needs AWS read creds + an orun token). Without it, applies against the empty http backend would plan to re-create live resources. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
This branch now carries the full de-AWS flip (platform tooling/migrations/tfstate-to-orun.sh <org_…> <prj_…> <orun-access-token>(needs AWS creds able to read the After migration + merge, the old |
… globally The global pattern also stripped the two legacy workers' COMMITTED configs (policy-worker, web-console-next) from forks — their verify lanes then failed test -f silently (hit live on nimbus workers-a).
…art (mirrors nimbus)
….0 resume+retry CI - supabase provider ~> 1.5.1: 1.6.0+ reads /billing/addons which rejects OAuth tokens — the exact credential the platform brokers - ci.yml: orun v2.48.0, --retry (true resume with exec-id on gh run rerun --failed), max-parallel: 8 (resolve-herd stagger) All three were found and proven live during the nimbus baseline deploy. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Completes the migration #31 started: every provider credential now resolves from orun secrets (project rung), brokered from the workspace's Cloudflare and Supabase integrations. After this merges + converges, the four provider GitHub secrets get deleted —
GITHUB_TOKENis the only credential CI holds.CLOUDFLARE_API_TOKEN+CLOUDFLARE_ACCOUNT_IDTF_VAR_cloudflare_account_idCLOUDFLARE_API_TOKEN← CLOUDFLARE_HYPERDRIVE_TOKEN (hyperdrive-edit template) + account idSUPABASE_ACCESS_TOKEN(management-access, fresh per run) +TF_VAR_supabaseOrgId(org-id fact)SUPABASE_ACCESS_TOKENServer-side pieces: sourceplane/orun-cloud#664 (fact templates + hyperdrive-edit), sourceplane/stack-tectonic#9 (account-id binding, 0.15.0).
This PR's own plan lanes are the live test: kv/hyperdrive/supabase plan lanes + db-migrate mint all four new secrets. A
parent_grant_insufficienton the hyperdrive lane means the connection's parent token needs the Workers Hyperdrive Write permission group added (deny-by-default; the connect recipe includes it going forward).🤖 Generated with Claude Code