Skip to content

Store encryption keys per-project in non-production envs#74

Merged
jonathonbyrdziak merged 1 commit intomasterfrom
feature/per-project-secrets
Mar 21, 2026
Merged

Store encryption keys per-project in non-production envs#74
jonathonbyrdziak merged 1 commit intomasterfrom
feature/per-project-secrets

Conversation

@jonathonbyrdziak
Copy link
Copy Markdown
Contributor

Summary

  • Secrets key storage is now environment-aware via config:env — production stores globally in protocol/.node/key, all other environments (local, dev, staging) store per-project in .protocol/key
  • Automatically adds .protocol/ to the project's .gitignore (with duplicate detection)
  • No flags needed — behavior is fully determined by the configured environment

Test plan

  • Run protocol secrets:setup in a dev/local environment — verify key is stored at {project}/.protocol/key
  • Verify .protocol/ is added to .gitignore without duplicates on repeated runs
  • Run protocol secrets:setup in a production environment — verify key is stored at protocol/.node/key
  • Verify secrets:encrypt and secrets:decrypt still work with the new key paths

🤖 Generated with Claude Code

Uses config:env (via IncidentDetector::isDev()) to determine storage
location. Production stores globally in protocol's .node/key, all other
environments store per-project in .protocol/key. Automatically adds
.protocol/ to the project's .gitignore when storing locally.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jonathonbyrdziak jonathonbyrdziak merged commit 835f0bb into master Mar 21, 2026
5 of 8 checks passed
@jonathonbyrdziak jonathonbyrdziak deleted the feature/per-project-secrets branch March 21, 2026 20:28
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