Skip to content

feat: fetch the KEK public key from the API instead of pinning it - #251

Merged
finalerock44 merged 1 commit into
devfrom
feat/kek-public-key-from-api
Oct 22, 2026
Merged

finalerock44 merged 1 commit into
devfrom
feat/kek-public-key-from-api

Conversation

@finalerock44

Copy link
Copy Markdown
Contributor

The CLI pinned one KEK public key per environment, so every KEK rotation needed a CLI release that customers then had to pick up. GET /cli-config now publishes the newest KEK the API holds the private half of (binary_kek_public_key), and the CLI wraps uploads with whatever the API it talks to serves, fetched once per process alongside the Supabase key.

DCD_BINARY_KEK_PUBLIC still overrides for an API that publishes nothing. An API that publishes no key keeps the old behaviour (explicit --encrypt fails, env/org-default encryption skips with a notice); an API that cannot be asked at all fails the run rather than silently uploading plaintext.

What & why

Type of change

  • fix — bug fix
  • feat — new feature
  • perf — performance improvement
  • refactor — code change that's neither a fix nor a feature
  • docs — documentation only
  • chore / ci / build / test — tooling, no user-facing change
  • Breaking change (title has ! or PR notes a BREAKING CHANGE:)

Checklist

  • PR title follows the Conventional Commits format (see comment above)
  • pnpm lint passes
  • pnpm typecheck passes
  • pnpm build passes
  • I have not bumped the version or edited CHANGELOG.md (release-please handles this)
  • I have signed the CLA (the bot will prompt on first contribution)
  • Docs / README.md / STYLE_GUIDE.md updated if behaviour or output changed

How to test

@finalerock44 finalerock44 self-assigned this Oct 22, 2026
The CLI pinned one KEK public key per environment, so every KEK rotation
needed a CLI release that customers then had to pick up. GET /cli-config
now publishes the newest KEK the API holds the private half of
(binary_kek_public_key), and the CLI wraps uploads with whatever the API it
talks to serves, fetched once per process alongside the Supabase key.

DCD_BINARY_KEK_PUBLIC still overrides for an API that publishes nothing.
An API that publishes no key keeps the old behaviour (explicit --encrypt
fails, env/org-default encryption skips with a notice); an API that cannot
be asked at all fails the run rather than silently uploading plaintext.
@finalerock44
finalerock44 force-pushed the feat/kek-public-key-from-api branch from 5270b6f to 4f9ccb2 Compare October 22, 2026 10:58
@claude

claude Bot commented Oct 22, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@finalerock44
finalerock44 merged commit 452324b into dev Oct 22, 2026
9 checks passed
@finalerock44
finalerock44 deleted the feat/kek-public-key-from-api branch October 22, 2026 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant