Skip to content

Migrate Kamal secrets from 1Password to Bitwarden (consumer)#25

Merged
fleveque merged 3 commits into
mainfrom
chore/bws-migration
May 24, 2026
Merged

Migrate Kamal secrets from 1Password to Bitwarden (consumer)#25
fleveque merged 3 commits into
mainfrom
chore/bws-migration

Conversation

@fleveque

@fleveque fleveque commented May 24, 2026

Copy link
Copy Markdown
Owner

Second of three coordinated PRs migrating deploy secrets from 1Password to consumer Bitwarden Password Manager (free tier). Sister PRs:

Earlier revision targeted Bitwarden Secrets Manager (BWS), but BWS Free caps at 3 projects per org — too tight as more services land. Switched to consumer Bitwarden (no item cap).

Three commits

  1. Snapshot the current 1P-driven .kamal/secrets as .kamal/secrets.1password.example — verbatim, no behaviour change.
  2. Switch the active .kamal/secrets to the bitwarden adapter. Same 4 keys (KAMAL_REGISTRY_PASSWORD, LOGO_AUTH_API_KEYS, LOGO_AUTH_ADMIN_KEYS, GEMINI_API_KEY), now fetched from a shared Bitwarden item quantic-prod (custom fields).
  3. Workflow + docs: deploy workflow installs the bw CLI via npm on each run; env block swapped from OP_* to BW_*; env.sample and README updated.

Before merging — operator prereqs

See dividend-portfolio#168 for the full setup (same Bitwarden vault covers all three services).

Test plan

  • Locally: bundle exec kamal secrets fetch --adapter bitwarden --from quantic-prod KAMAL_REGISTRY_PASSWORD returns the value
  • Merge → auto-deploy to prod runs green
  • Smoke check: hit any auth-required endpoint (verifies LOGO_AUTH_API_KEYS reached the container)

Rollback

cp .kamal/secrets.1password.example .kamal/secrets
# Then revert the workflow change manually.

1P vault was never touched.

🤖 Generated with Claude Code

Preserve the working 1Password setup so future-you can swap back with a
single cp. Verbatim copy of .kamal/secrets as of the last 1P-driven deploy.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Same set of secret keys; only the storage backend changes. All four
secrets live in a shared Bitwarden item named `quantic-prod`, with
each secret as a custom field on the item.

GEMINI_API_KEY is still extracted into LOGO_LLM_GEMINI_API_KEY so the
app-level env name stays the same.

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 change in the next
commit, so don't deploy from this state.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@fleveque fleveque force-pushed the chore/bws-migration branch from 337363c to 3de9d33 Compare May 24, 2026 20:04
@fleveque fleveque changed the title Migrate Kamal secrets from 1Password to Bitwarden Secrets Manager Migrate Kamal secrets from 1Password to Bitwarden (consumer) May 24, 2026
@fleveque fleveque force-pushed the chore/bws-migration branch from 3de9d33 to 73cca3e Compare May 24, 2026 20:49
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` snapshot.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@fleveque fleveque force-pushed the chore/bws-migration branch from 73cca3e to 4ebdfa5 Compare May 24, 2026 20:49
@fleveque fleveque merged commit 3205bff into main May 24, 2026
2 checks passed
@fleveque fleveque deleted the chore/bws-migration branch May 24, 2026 21:02
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