Migrate Kamal secrets from 1Password to Bitwarden (consumer)#168
Merged
Conversation
Preserve the working 1Password setup so future-you can swap back with a single cp. The two new files are verbatim copies of .kamal/secrets and .kamal/secrets.beta as of the last 1P-driven deploy. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced May 24, 2026
Same set of secret keys; only the storage backend changes. The kamal bitwarden adapter shells out to the `bw` CLI, authenticated via personal API key (BW_CLIENTID + BW_CLIENTSECRET) and unlocked with BW_PASSWORD. Prod fetches from a Bitwarden item named `quantic-prod`; beta from `quantic-beta`. Each item holds the relevant secrets as custom fields. Why consumer Bitwarden over Bitwarden Secrets Manager (BWS): BWS Free caps at 3 projects per org, which would bite us as more services land. Consumer has no item cap on the free tier. This commit alone breaks deploy until the workflow + GitHub Actions secrets land in the next commit, so don't deploy from this state. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
bf2385a to
76f2ac9
Compare
e04fa4d to
bddc907
Compare
Replaces the 1Password CLI install step with `npm install -g @bitwarden/cli`, and the `OP_*` env block with `BW_CLIENTID` + `BW_CLIENTSECRET` + `BW_PASSWORD` pulled from repo-level GitHub Actions secrets. env.sample and README updated to reflect the new bootstrap flow. README also documents how to roll back to 1Password using the preserved `.kamal/secrets.1password.example` snapshots. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
bddc907 to
d037c85
Compare
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.
First of three PRs (one per service repo) migrating deploy secrets from 1Password to consumer Bitwarden Password Manager (free tier, no project caps). 1P access requires a paid Service Account tier; Bitwarden's
bwCLI is the free alternative Kamal supports out of the box (--adapter bitwarden). Full plan:~/.claude/plans/cached-doodling-scroll.md.Three commits
.kamal/secrets+.kamal/secrets.betaas.1password.example— verbatim, no behaviour change.bitwardenadapter. Reads a Bitwarden Secure Note item (quantic-prodfor prod,quantic-betafor beta) holding all relevant secrets as custom fields. Authentication viaBW_CLIENTID+BW_CLIENTSECRET(personal API key) andBW_PASSWORD(master password for vault unlock).bwCLI vianpm install -g @bitwarden/clion each run; env block swapped fromOP_*toBW_*;env.sampleand README updated.Before merging — operator prereqs (covers all 3 repos)
quantic-prodquantic-betaKAMAL_REGISTRY_PASSWORD,RAILS_MASTER_KEY,GOOGLE_CLIENT_ID,GOOGLE_CLIENT_SECRET,GEMINI_API_KEY,VITE_LOGO_SERVICE_URL,VITE_LOGO_SERVICE_API_KEY,TELEGRAM_BOT_TOKEN,TELEGRAM_BOT_HANDLE,TELEGRAM_WEBHOOK_SECRET, plus the logo-service + pulse keysLOGO_SERVICE_API_KEYclient_idandclient_secret.BW_CLIENTID,BW_CLIENTSECRET,BW_PASSWORD(your master password)..envwith the same three values.Test plan
bundle exec kamal secrets fetch --adapter bitwarden --from quantic-prod KAMAL_REGISTRY_PASSWORDreturns the valuebundle exec kamal envifysucceeds end-to-endGEMINI_API_KEY(verify by hitting/api/v1/radar/insights) andTELEGRAM_BOT_TOKEN(verify the Telegram link still works)Rollback
cp .kamal/secrets.1password.example .kamal/secrets cp .kamal/secrets.beta.1password.example .kamal/secrets.beta # Then revert the workflow change manually.1P vault was never touched — secrets are still there.
Sister PRs
🤖 Generated with Claude Code