Skip to main content

A08 - Secrets and Transit Crypto

GroupTechnologyStatusServiceRoadmap phaseContracts
A - Governance, identity and securityOpenBaoopen source integratedsecrets1-

Back to index - Français

Role and responsibilities​

Write-only secret storage, dynamic credentials, transit encryption and key rotation.

Data model​

Tables (schema eai, every tenant table carries tenant_id uuid NOT NULL with an RLS policy on current_setting('app.tenant_id', true)::uuid): eai.secrets, eai.audit_events.

API endpoints​

  • POST /v1/secrets
  • GET /v1/secrets
  • DELETE /v1/secrets/{path}
POST /v1/secrets HTTP/1.1
Host: <control-plane-host>
X-API-Key: eai_xxx_secret
Accept-Language: en
Content-Type: application/json

{"path": "providers/openai/api_key", "value": "sk-proj-example-0000"}
{
"id": "017bb0db-d73f-40aa-af02-3fc862b2eb72",
"tenant_id": "18de5695-21f9-4053-a4ea-beb4bf2a5932",
"path": "providers/openai/api_key",
"backend": "local",
"version": 1,
"created_by": "alice",
"created_at": "2026-10-30T02:35:52.744727+01:00",
"updated_at": "2026-10-30T02:35:52.744727+01:00"
}

Errors use the common envelope {"error": {"code", "message", "message_i18n", "details", "request_id"}}; lists are paginated with limit and cursor.

SDK usage​

Python (enterprise_ai):

from enterprise_ai import EnterpriseAI

client = EnterpriseAI(base_url="<control-plane-url>", api_key="eai_xxx_secret")
items = client.identity.list_secrets()

TypeScript (@enterprise-ai/sdk):

import { EnterpriseAI } from "@enterprise-ai/sdk";

const eai = new EnterpriseAI({ baseUrl: "<control-plane-url>", apiKey: process.env.EAI_API_KEY });
const items = await eai.secrets.list();

Java (enterprise-ai-java):

EnterpriseAIClient client = EnterpriseAIClient.builder()
.baseUrl("<control-plane-url>")
.apiKey(System.getenv("EAI_API_KEY"))
.build();
var items = client.secrets().list();

Go (enterprise-ai-go):

client, _ := eai.NewClient(eai.WithBaseURL("<control-plane-url>"), eai.WithAPIKey(os.Getenv("EAI_API_KEY")))
items, err := client.Secrets.List(ctx)

Configuration​

  • Environment: EAI_DATABASE_URL, EAI_OTEL_EXPORTER_OTLP_ENDPOINT.
  • Helm values: controlPlane.enabled, controlPlane.replicas, controlPlane.resources, controlPlane.config.

Security controls​

  • Authentication by OIDC JWT, tenant API key with scopes, or SPIFFE mTLS; tenant resolved from the credential, never from the body.
  • Authorization through OpenFGA and OPA decisions; every mutation and decision writes a hash-chained eai.audit_events row.
  • Secrets never returned by the API; TLS everywhere; Cilium network policies restrict who can reach the service.

Observability​

  • Metrics: eai_secrets_and_transit_crypto_requests_total, eai_secrets_and_transit_crypto_errors_total, eai_secrets_and_transit_crypto_latency_seconds (Prometheus).
  • Traces: OpenTelemetry spans eai.secrets.* with W3C traceparent propagation, AI spans forwarded to Opik.
  • Audit actions: secret.write, secret.delete, encryption.encrypt, encryption.decrypt, policy.evaluate.

FinOps aspects​

Operating cost is allocated per tenant and project through labels on Usage Events and Kubernetes resource requests; no direct per-call cost.

Failure modes and resilience​

  • Stateless replicas behind the API Gateway, PostgreSQL HA for state; readiness probe GET /readyz removes unhealthy pods.
  • External system unavailable: fail closed for security decisions, explicit error code, no silent bypass.

Standalone adoption (client of a client)​

A client of a client can adopt this brick alone with the Python SDK sub-client client.identity (TS eai.secrets, Java client.secrets(), Go client.Secrets). Minimal deployment: Control Plane API + PostgreSQL + Keycloak (or API keys), the Control Plane loads every domain of services/control-plane/src/eai/domains; the optional chart components are switched off in deploy/helm/enterprise-ai/values.yaml (vllm.enabled, qdrant.enabled, nats.enabled, workers.enabled).

Acceptance tests​

  1. A tenant cannot read or modify another tenant's resources (RLS test).
  2. Every mutation produces an audit event verifiable by GET /v1/audit/verify.
  3. Errors are returned in English and French according to Accept-Language.

Evidence on real components​

See the identity and policy plane guide: components started from the official releases (tools/iam/fetch.sh), tests services/control-plane/tests/test_iam_*.py.