Skip to main content

Secrets Module

The Secrets module provides encrypted storage for sensitive values such as API keys and credentials. Values are encrypted at rest using AES-256-GCM and are never returned by any API response.

Overview

Secrets are associated with a project. Once stored, a secret's value can only be replaced — it is never readable again. All operations return a hasValue boolean to indicate whether an encrypted value is on file.

Secrets can be linked to AI Providers to supply credentials at inference time.

Configuration

Environment VariableRequiredDescription
SECRETS_ENCRYPTION_KEYYes64-character hex string (32 bytes). Used for AES-256-GCM encryption of all stored secret values.

Generate a key with:

openssl rand -hex 32

Data Model

FieldTypeDescription
idstringPublic identifier (e.g. sec_…)
projectIdstringID of the owning project
namestringHuman-readable label
hasValuebooleantrue when an encrypted value is stored
createdAtstringISO 8601 creation timestamp
updatedAtstringISO 8601 last-updated timestamp

Deletion behaviour

By default, deleting a secret that is still referenced by one or more AI providers returns 409 Conflict. Pass ?force=true to cascade-delete the dependent AI providers along with the secret.

Permissions

ActionPermissionREST EndpointMCP Tool
List secretssecrets:ListSecretsGET /api/v1/secretslist-secrets
Get a secretsecrets:GetSecretGET /api/v1/secrets/:secretIdget-secret
Create secretsecrets:CreateSecretPOST /api/v1/secretscreate-secret
Update secretsecrets:UpdateSecretPATCH /api/v1/secrets/:secretIdupdate-secret
Delete secretsecrets:DeleteSecretDELETE /api/v1/secrets/:secretIddelete-secret