foundation/bootstrap
Andreas Niemann fbd1ad4d1d feat(credentials): mirror Forgejo crypto secrets into Vault (CONTRACT_002)
Close the known gap: foundation/forgejo/service-credentials held only the
admin user/pw; the crypto secrets Forgejo auto-generates into app.ini were
never captured. Make that path single-owned at GATE B and write admin +
crypto together.

- credentials.ts: drop the forgejo block from the GATE-A writer (its crypto
  secrets don't exist until Forgejo first-starts) and add
  writeForgejoCredentialsToVault — runs after forgejo.ready, reads SECRET_KEY,
  INTERNAL_TOKEN, LFS_JWT_SECRET ([server]) and oauth2 JWT_SECRET straight off
  the live app.ini via docker-exec (ADR-007), and puts the full path. One
  writer per Vault path avoids a put/patch race on re-runs.
- index.ts: wire it at GATE B (dependsOn vault.init + forgejo.ready).

Keys: forgejoAdminUser, forgejoAdminPassword, forgejoSecretKey,
forgejoInternalToken, forgejoJwtSecret, forgejoOauth2JwtSecret.

Validated live: forgejo path now has all six; postgres/rustfs paths intact
through the GATE-A writer replacement; idempotent at 43 unchanged.

FINDING: forgejoSecretKey mirrors EMPTY — skipping the web installer
(INSTALL_LOCK) left Forgejo's [security] SECRET_KEY unset. Fixed next commit.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-30 23:28:17 +02:00
..
components feat(credentials): mirror Forgejo crypto secrets into Vault (CONTRACT_002) 2026-06-30 23:28:17 +02:00
lib feat(bootstrap): postgres data-plane + remote helper (T03) 2026-06-30 21:10:34 +02:00
config.ts feat(credentials): mirror backup creds + age key into Vault (CONTRACT_002) 2026-06-30 23:23:38 +02:00
index.ts feat(credentials): mirror Forgejo crypto secrets into Vault (CONTRACT_002) 2026-06-30 23:28:17 +02:00
package.json feat(bootstrap): postgres data-plane + remote helper (T03) 2026-06-30 21:10:34 +02:00
Pulumi.foundation.yaml feat(backup): age at-rest encryption of bundles (CONTRACT_004 §4.3) 2026-06-30 23:23:38 +02:00
Pulumi.yaml feat(bootstrap): Bun-workspace skeleton + typed config + vendored modules — T02 2026-06-30 18:06:21 +02:00
run.sh feat(bootstrap): vault init/unseal + capture to encrypted config (T05) 2026-06-30 21:32:52 +02:00
tsconfig.json feat(bootstrap): postgres data-plane + remote helper (T03) 2026-06-30 21:10:34 +02:00
vault-unseal.sh feat(bootstrap): vault init/unseal + capture to encrypted config (T05) 2026-06-30 21:32:52 +02:00