docs(secrets): RFC — keyless secret backend (KMS recipients + OIDC)#344
Closed
Cre-eD wants to merge 3 commits into
Closed
docs(secrets): RFC — keyless secret backend (KMS recipients + OIDC)#344Cre-eD wants to merge 3 commits into
Cre-eD wants to merge 3 commits into
Conversation
Proposes pluggable recipient types whose private key never leaves a remote authority (cloud KMS / Vault) plus a keyless CI mode via OIDC federation, so the store private key (SIMPLE_CONTAINER_CONFIG) no longer has to be materialized on CI runners. Cloud-agnostic and backward-compatible: the local recipient stays the default; migration is additive, per-repo, and reversible. Covers the v2 envelope prerequisite (single AEAD DEK + per-recipient wrapping + AAD binding), the OIDC trust/authorization model, format versioning with a fail-closed guard, revocation reality (value rotation), operational concerns, and a phased migration plan. Signed-off-by: Dmitrii Creed <creeed22@gmail.com>
Semgrep Scan ResultsRepository:
Scanned at 2026-06-27 20:03 UTC |
Security Scan ResultsRepository:
Scanned at 2026-06-27 20:03 UTC |
📊 Statement coverageMeasured on the documented included set (see
Baseline: |
…OPS, file-per-scope Folds the multi-model design review outcome into the RFC: adopt SOPS for the inline-value crypto/format, one readable file per scope (not a multiplexed single file — avoids the partial-MAC paradox), per-scope isolated keys, the non-negotiables (hard-fail on missing required secret, MAC+AAD, CODEOWNERS-gated recipients, plaintext lint, rotate-not-just-remove, OIDC->KMS provider keys), the strict-backcompat constraint (separate files + fail-closed version reader first), and a minimal v1. Resolves the format/native-vs-SOPS open questions. Signed-off-by: Dmitrii Creed <creeed22@gmail.com>
smecsia
approved these changes
Jun 27, 2026
universe-ops
approved these changes
Jun 27, 2026
Contributor
Author
|
Folded into #346 — the RFC doc now ships in the same PR as its Phase-1 implementation (the version guard), so it's one review/merge instead of two. |
Cre-eD
added a commit
that referenced
this pull request
Jun 28, 2026
Consolidates the keyless-secrets **design** and its **Phase-1 implementation** into one PR (supersedes #344, which was doc-only). ## 1. RFC — keyless secret backend (`docs/design/keyless-secrets/README.md`) Design for getting the master key out of GitHub: KMS-held recipients + OIDC, no behaviour change. Records the decision: **inline values + per-scope keys, via SOPS, file-per-scope** (`.sc/secrets.<scope>.yaml`) — avoids the multiplexed "partial-MAC paradox", gives per-scope key isolation. ## 2. Phase-1 — fail-closed store version guard (code + tests) Prerequisite for any future on-disk format change (incl. the SOPS migration above): - Adds `version` to the `secrets.yaml` schema (`EncryptedSecretFiles.Version`); absent/`0` = the original format (full back-compat). - `CurrentSecretsFileVersion = 0` — the highest schema version this build understands. - The reader **refuses** any store whose `version` exceeds what the build supports, instead of silently dropping the fields it can't model (which would corrupt the store on the next write). - Tests: rejects a newer version, accepts current/absent. **Why it ships first:** this reader must roll out fleet-wide *before* any higher-versioned store is ever written, or older binaries clobber it. It is a no-op for every existing (version-0) store today. Branch is synced with `main`, so history includes the already-merged #345 (X25519) — net new here = the guard + RFC + tests. Validated via a preview build (see comments). --------- Signed-off-by: Dmitrii Creed <creeed22@gmail.com> Co-authored-by: Ilya <smecsia@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a design RFC: keyless secret backend — pluggable recipient types whose private
key never leaves a remote authority (cloud KMS / Vault), plus a keyless CI mode via
OIDC federation, so the store private key (
SIMPLE_CONTAINER_CONFIG) no longer has to bematerialized on CI runners.
Docs-only (
docs/design/keyless-secrets/README.md). No code changes.Why
The envelope is already multi-recipient, but the only recipient type is a raw private
key — which therefore must be placed on every machine that decrypts, including CI. That
single value is long-lived, all-powerful, un-rotated in practice, un-audited, and
non-revocable after a leak. This RFC makes the key custody pluggable and federated while
keeping the local-key path as the default.
Highlights
localrecipient stays default; AWS/GCP/Azure/Vault optional; migration is additive, per-repo, reversible.
binding (so KMS calls are O(1) per deploy, and ciphertext/DEK can't be transplanted).
job_workflow_ref;refvsenvironmentsubjects are mutually exclusive; production behind protectedEnvironments; never
pull_request_targetwith PR-head checkout.underlying secret values, not just dropping a wrapper.
This is an RFC for discussion; it folds in an adversarial multi-reviewer pass against the
current
pkg/api/secretsimplementation.