diff --git a/.secrets.baseline b/.secrets.baseline index 0761e0a7b..3c7efd185 100644 --- a/.secrets.baseline +++ b/.secrets.baseline @@ -145,6 +145,15 @@ "line_number": 46 } ], + "docs/superpowers/plans/2026-08-24-gcp-openbao.md": [ + { + "type": "Secret Keyword", + "filename": "docs/superpowers/plans/2026-08-24-gcp-openbao.md", + "hashed_secret": "13d26a89a916713f8f40cf05869c7b25c3e6ea54", + "is_verified": false, + "line_number": 857 + } + ], "infrastructure/base/gapi/platform-private-gateway-certificate.yaml": [ { "type": "Secret Keyword", @@ -441,5 +450,5 @@ } ] }, - "generated_at": "2026-08-24T08:08:41Z" + "generated_at": "2026-08-24T17:05:57Z" } diff --git a/docs/superpowers/plans/2026-08-24-gcp-openbao.md b/docs/superpowers/plans/2026-08-24-gcp-openbao.md new file mode 100644 index 000000000..0d9b3445a --- /dev/null +++ b/docs/superpowers/plans/2026-08-24-gcp-openbao.md @@ -0,0 +1,913 @@ +# OpenBao on GCP Implementation Plan + +> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. + +**Goal:** Give the GKE cluster a private certificate authority — OpenBao at `bao.priv.gcp.ogenki.io:8200`, issuing for `*.priv.gcp.ogenki.io` from an intermediate signed by an offline root. + +**Architecture:** Two OpenTofu stacks under `opentofu/gcp/openbao/`, mirroring the AWS split. `cluster/` builds a single-node zonal MIG behind an internal passthrough Network LB, auto-unsealed by Cloud KMS. `management/` runs the `vault` provider against the live endpoint and configures the PKI only. The root CA never touches a networked system; only the intermediate reaches GCP Secret Manager, imported directly as the issuer. + +**Tech Stack:** OpenTofu, Terramate, `google` provider, `vault` provider, GCP Secret Manager, Cloud KMS, Cloud DNS, External Secrets, cert-manager. + +**Spec:** [`docs/superpowers/specs/2026-08-24-gcp-openbao-design.md`](../specs/2026-08-24-gcp-openbao-design.md) + +## Global Constraints + +- **Domain:** `priv.gcp.ogenki.io`. Endpoint `bao.priv.gcp.ogenki.io:8200`. +- **Region/zone:** `europe-west4` / `europe-west4-a` — zonal, matching the GKE cluster. +- **CA key types:** root and intermediate `EC secp384r1`; OpenBao's server leaf `EC prime256v1` (P-256). +- **Server leaf SAN:** DNS name only. **No IP SAN.** +- **Key file permissions:** `chmod 600` — `openssl` writes world-readable by default. +- **Secret Manager IDs** permit only letters, digits, `-`, `_`. No slashes, no dots. +- **State backend:** S3 bucket `demo-smana-remote-backend`, region `eu-west-3` (the *bucket's* region, unrelated to the GCP region). +- **Terramate gate:** every script guards on `TM_GCP_ENABLED=true` and no-ops with `[skip]` otherwise. +- **No secret may be templated into instance metadata.** TLS material is fetched at boot from Secret Manager. +- **Never commit CA private keys.** The root key never leaves offline storage; the intermediate key exists only in Secret Manager. + +### Verification model for this plan + +This is infrastructure, so "write a failing test first" means **run the verification command and watch it fail for the right reason**, then implement, then watch it pass. The gates are: + +| Layer | Command | +|---|---| +| OpenTofu | `tofu validate`, `trivy config --exit-code=1 --ignorefile=./.trivyignore.yaml .`, `tofu plan -var-file=variables.tfvars` | +| Shell | `shellcheck