Secret delivery option 4: External vault (Vault, OpenBao, Infisical) #132
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?
Parent epic: #129
Overview
Use an external secret management system to store, encrypt, and deliver secrets to provisioned containers. Evaluates HashiCorp Vault, OpenBao (open-source Vault fork), Infisical, Doppler, SOPS, and others for our self-hosted Docker/Swarm/K8s deployment.
HashiCorp Vault
Licensing (2025-2026)
BSL is not a blocker for our use, but IBM acquisition introduces long-term uncertainty.
Architecture
Relevant Auth Methods
Secret Engines
Integration Patterns for Cameleer
Pattern A: Server-side resolution (recommended)
Simplest — only the server needs Vault access. Containers unchanged.
Pattern B: Vault Agent sidecar
More secure but adds orchestration complexity.
Pattern C: App-level SDK (Spring Cloud Vault)
Only works for apps that embed the SDK. Not suitable for arbitrary customer JARs.
K8s Integration Options
Java Libraries
Operational Overhead
Self-Hosted on k3s: Practical for Small Team?
Feasible but non-trivial. Single-node Vault + Raft on k3s works. Auto-unseal via Transit Vault on separate VM eliminates manual unseal. Expect 2-4 hours setup, ~1 hour/month maintenance. Steep learning curve (HCL policies, auth backends).
OpenBao (Vault Fork)
Linux Foundation-governed, MPL 2.0-licensed fork of Vault (forked from 1.14).
Assessment: Production-ready. For self-hosted deployment, OpenBao is the clear choice over Vault CE — true open source, same tooling, namespaces included free (perfect for multi-tenancy).
Infisical
Architecture
Key Features
com.infisical:sdk:3.0.5with Spring Boot guidePricing (Self-Hosted)
Vault vs Infisical for Small Teams
Eliminated Options
Doppler — ⛔ Eliminated
SaaS-only, no self-hosted. All secrets transit Doppler's infrastructure. No Java SDK. Non-starter for self-hosted platform managing customer secrets.
Mozilla SOPS — Not suitable as primary solution
SOPS encrypts config files at rest (YAML/JSON). It's a build/deploy-time tool, not a runtime secret delivery mechanism. No lease renewal, rotation, or audit logging. Could complement a vault (encrypt Vault credentials in Git) but cannot replace one.
CyberArk Conjur OSS — ⛔ Eliminated
Enterprise-oriented, stale OSS version (1.21.1, June 2024), small community.
1Password Connect — Not recommended
Requires subscription ($7.99/user/mo), no Java SDK, cloud dependency.
Security Assessment
The "Secret Zero" Problem
For Cameleer: Server-side resolution means the secret zero reduces to "how does the server auth to the vault?" — K8s ServiceAccount (on k3s) or AppRole (Docker standalone).
Dynamic vs Static Secrets
Single Point of Failure
Both Vault and Infisical become a SPOF if single-node:
Is a Vault Overkill for <50 Containers?
For personal projects: Yes, probably overkill.
For a SaaS platform managing customer workloads: No, it is table stakes. The value: audit trail (SOC2), rotation, encryption at rest, dynamic credentials, separation of concerns.
Cross-Platform Compatibility
Comparison Matrix
Recommendation
Phase 1 (Immediate): Infisical Self-Hosted
Why Infisical over Vault/OpenBao:
Phase 2 (If scaling beyond Infisical): OpenBao
If we outgrow Infisical (need Transit encryption, complex policies, broader dynamic secrets):
What NOT to Do
Verdict: ⭐⭐⭐⭐ (4/5) for Infisical; ⭐⭐⭐½ for Vault/OpenBao
Bottom line: Deploy Infisical self-hosted now, plan for OpenBao later if needed. Either way, this is a significant infrastructure addition — weigh against simpler options (file-mount + encryption at rest) that solve 80% of the problem.
Sources