[Design Proposal] Secret Management with Key Vault Integration #442
Replies: 2 comments
-
|
Solid proposal. The centralized vault + injection pattern is the right direction. For teams that need a lighter-weight solution while evaluating enterprise options like Azure Key Vault or HashiCorp Vault, KeyEnv is worth a look — it's CLI-first secrets management designed specifically for developer workflows. Inject secrets at agent startup with The advantage of the approach you're describing (platform-level secret management) over per-agent solutions is exactly what you noted: consistent auditing, rotation, and access control across all agents. That's the right way to think about it at scale. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
Problem
Agent deployments require configuration values to operate, but many of these values are sensitive (API keys, tokens, credentials, private endpoints). Treating configuration as plain values creates security risks and operational overhead. The platform currently lacks a secure, standardized mechanism to store, inject, and manage sensitive configurations, resulting in the following issues:
User Stories
Platform Administrator
Agent Developer
Existing Solutions
N/A
Proposed Solution
Overview
This proposal introduces a secret management system that securely stores sensitive environment variables in OpenBao KV store and synchronizes them to Kubernetes using the External Secrets Operator. The system follows a provider-based architecture for extensibility and integrates with OpenChoreo via SecretReference custom resources.
Design
Architecture overview
flowchart TB subgraph AMS["Agent Manager Service"] STORE["1️⃣ Store secrets in OpenBao"] CREATE_SR["2️⃣ Create SecretReference CR"] CREATE_COMP["3️⃣ Create Component CR<br>(references ComponentType)"] end subgraph OpenBao["OpenBao KV Store"] KV["KV v2 Engine<br>Path: org/project/component"] META["Metadata<br>managed-by: amp-secret-manager"] end subgraph OC["OpenChoreo Control Plane"] SR["SecretReference CR"] CT["ComponentType<br>defines ExternalSecret template"] COMP["Component CR"] end subgraph DP["Data Plane"] ES["ExternalSecret CR"] K8S_SEC["K8s Secret"] POD["Workload Pod"] end subgraph ClusterWide["Cluster-Scoped"] CSS["ClusterSecretStore<br>(amp-openbao-store)"] ESO["External Secrets Operator"] end STORE -- 1️⃣ --> KV KV --> META CREATE_SR -- 2️⃣ --> SR CREATE_COMP -- 3️⃣ --> COMP COMP -. references .-> CT SR -. "remoteRef.key" .-> KV CT -- 4️⃣ template used to create --> ES SR -- 4️⃣ resolves secret paths --> ES ES -- 5️⃣ references --> CSS CSS -. configured to read .-> KV ESO -- 6️⃣ watches & processes --> ES ESO -- 7️⃣ fetches secrets via --> CSS ESO -- 8️⃣ creates --> K8S_SEC K8S_SEC -- 9️⃣ mounted as env --> PODSecret Manager Client Interface and Registry
The secret management system follows a layered architecture with a provider registry pattern for extensibility.
flowchart TB subgraph HighLevel["High-Level Interface"] SMC["SecretManagementClient<br/>(CreateSecret, UpdateSecret, GetSecret, DeleteSecret)"] end subgraph Registry["Provider Registry"] REG["Registry<br/>(Thread-safe provider lookup)"] REG -->|"GetProvider('openbao')"| PI end subgraph Providers["Provider Layer"] PI["Provider Interface<br/>(NewClient, ValidateConfig, Capabilities)"] PI --> OBP["OpenBao Provider"] PI -.-> VP["Vault Provider (future)"] PI -.-> AWSP["AWS Secrets Manager (future)"] end subgraph LowLevel["Low-Level Operations"] OBC["OpenBao Client<br/>(KV v2 CRUD with ownership tracking)"] end SMC --> REG OBP --> OBCLayer 1: SecretManagementClient (High-Level Interface)
Provides domain-level CRUD operations with JSON marshaling/unmarshaling and error handling.
Layer 2: Provider Registry (Thread-Safe Lookup)
Enables pluggable KVs via runtime registration. Providers register themselves at init time.
Layer 3: Provider Interface (Factory Pattern)
Defines the contract for secret backend implementations.
Layer 4: SecretsClient (Low-Level Operations)
Provider-specific implementation for direct backend operations.
OpenChoreo Integration Flow
The integration with OpenChoreo enables Kubernetes-native secret synchronization using SecretReference custom resources and the External Secrets Operator.
Step-by-Step Integration:
flowchart TB AMS["Agent Manager Service"] OB["OpenBao KV Store"] OC["OpenChoreo Controller"] SR["SecretReference CR"] ES["ExternalSecret CR"] COM["Component/Workload CR"] AMS -->|"1. Store secrets"| OB AMS -->|"2. Create"| SR AMS -->|"3. Create with SecretKeyRef"| COM OC -->|"4. Watch & Create"| ES SR -.->|"references KV path"| OB ESO["External Secrets Operator"] K8S["K8s Secret"] POD["Workload Pod"] ES -->|"5. Trigger"| ESO ESO -->|"6. Fetch from"| OB ESO -->|"7. Create/Update"| K8S K8S -->|"8. Mount as env"| PODorg/project/component, Data: key-value pairsamp-openbao-store){component}-secretsOut of Scope
Alternatives Considered
No response
Open Questions
No response
Milestones
N/A
Beta Was this translation helpful? Give feedback.
All reactions