Security: Vault-based credential storage for agents and CI #346
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
Epic: Vault-Based Credential Storage
Centralized credential management using OpenBao (open-source Vault fork) with PostgreSQL encrypted storage and RLS enforcement. Users and admins can manage API keys, git tokens, and OAuth tokens securely.
Design Document: docs/design/credential-security.md
Approach: Hybrid OpenBao Transit encryption + PostgreSQL RLS
Architecture
User stores API key via UI
-> NestJS API receives plaintext key
-> VaultService.encrypt(key) calls OpenBao Transit API
-> Ciphertext stored in PostgreSQL (user_credentials table, RLS-enforced)
-> Plaintext never persists to disk
When OpenBao is unavailable (local dev), VaultService falls back to AES-256-GCM CryptoService.
Phase 1: Security Foundations (p0)
Phase 2: OpenBao Integration (p1)
Phase 3: User Credential Storage (p1)
Phase 4: Frontend (p1)
Phase 5: Migration and Hardening (p1-p3)
Phase Dependencies
Phase 1 (RLS + Token Encryption)
-> Phase 2 (OpenBao + VaultService)
-> Phase 3 (Credential Model + API) -> Phase 4 (Frontend)
-> Phase 5 (LLM Migration + Federation)