chore(framework): canonize Vault-as-SSOT + ESO-default secrets policy #519
Reference in New Issue
Block a user
Delete Branch "chore/canonize-vault-secrets-policy"
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?
Summary
This PR encodes the Vault-as-source-of-truth + ESO-default secrets policy as binding framework rules, effective for all future agent work across all Mosaic projects.
Operator decision: Jason approved this wording via Discord on 2026-05-22.
Files updated
guides/VAULT-SECRETS.mdpackages/mosaic/framework/guides/VAULT-SECRETS.mdguides/BOOTSTRAP.mdpackages/mosaic/framework/guides/BOOTSTRAP.mdpackages/mosaic/framework/defaults/STANDARDS.md### Secrets handling (HARD RULE)under Non-NegotiablesDuplicate-path sync note
The framework files exist at two paths in this repo and must stay in sync:
guides/<->packages/mosaic/framework/guides/packages/mosaic/framework/defaults/STANDARDS.mdis the single canonical copy (no root-leveldefaults/dir exists in this repo)All pairs are md5-equal after this commit. Future maintainers: always edit both paths when modifying these files.
Policy summary (verbatim from STANDARDS.md)
${VAR:-default}fallback syntax is forbidden for required values in deploy configs. Use${VAR:?VAR is required}..envfiles in production deployment paths are forbidden.Recommended follow-up (subsequent PRs)
.woodpecker/) that catch the forbidden patterns listed inVAULT-SECRETS.md - Forbidden Patterns-- specifically: untagged${VAR:-default}in deploy configs,vault kvcalls in app source, hardcoded credential patterns, and.envfiles in production paths. Initially in warning mode, then error mode per Jason's staged-rollout plan.Review requirement
DO NOT MERGE without operator approval. This policy binds every future agent session and every Mosaic project. Jason should review the verbatim wording before this lands on main.
Encodes operator-approved (Jason, 2026-05-22) secrets policy as binding framework rules across all Mosaic agent sessions and projects. Changes: - STANDARDS.md: add "Secrets handling (HARD RULE)" subsection under Non-Negotiables — Vault as SSOT, ESO bridge as default, Direct-Vault opt-in only, forbidden ${VAR:-default} for required values, forbidden .env in prod, required startup schema validation - VAULT-SECRETS.md: add four new sections — architecture decision matrix (ESO vs Direct-Vault), full ESO bridge worked example (Vault path + ExternalSecret + Deployment YAML + zod/pydantic/Go validators), Direct-Vault opt-in pattern (AppRole provisioning + ESO bootstrap for chicken-and-egg), and forbidden patterns CI lint targets - BOOTSTRAP.md: add "Secrets Bootstrap" required subsection with checklist for new apps (Vault path, README docs, ExternalSecret, secretKeyRef, schema validator, Direct-Vault justification) All duplicate file paths kept in sync (md5-equal pairs): guides/ <-> packages/mosaic/framework/guides/ packages/mosaic/framework/defaults/STANDARDS.md (single copy in repo) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.