feat(mcpd): pluggable SecretBackend + OpenBao driver + migrate #51
Reference in New Issue
Block a user
Delete Branch "feat/secretbackend"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Phase 0 of the larger Llm + SecretBackend plan: every API key in mcpctl lives in Postgres as plaintext JSON. Before centralising more credentials (LLM keys, etc.), we want a pluggable backend so the deployment can point at the cluster's existing OpenBao and drop DB-level access to sensitive rows.
SecretBackendwith driver dispatch ontype. Bootstrap rowplaintext/defaultis seeded at startup; it's the trust root.openbao— talks raw HTTP to KV v2 (also Vault-compatible). Auth via static token stored in a plaintextSecret, resolved once and cached. Broke the circular dep through a deferredsecretResolverBridgein mcpd startup.mcpctl migrate secrets --from X --to Y— per-secret atomic, idempotent on restart, optional--dry-runand--keep-source.secretbackendsresource +run:migrate-secretsoperation.create|get|describe|delete secretbackend(+apply -fround-trip), shell completions regenerated, docs/secret-backends.md written.Test plan
🤖 Generated with Claude Code