Secret Storage

Archestra encrypts saved credentials in PostgreSQL by default. Use HashiCorp Vault to keep their values outside the database. This storage protects credentials; content encryption protects messages and tool results separately.

Database Storage

Keep the default database storage unless you need Vault. Archestra encrypts saved values with AES-256-GCM using a key derived from ARCHESTRA_SECRETS_ENCRYPTION_SECRET.

Key Rotation

Rotate during a maintenance window. Every process that reads stored secrets must stop before any process starts with the new key. The first process that starts with both keys re-encrypts every stored secret, then serves traffic. A rolling restart would let old pods keep writing under the old key.

With Helm:

  1. Back up PostgreSQL and the current key. The chart keeps the key under secrets-encryption-secret in the <release>-auth Secret:

    bash
    kubectl -n archestra get secret archestra-platform-auth \
      -o jsonpath='{.data.secrets-encryption-secret}' | base64 -d
    
  2. Under archestra.env, set ARCHESTRA_SECRETS_ENCRYPTION_SECRET to the new key and ARCHESTRA_SECRETS_ENCRYPTION_SECRET_PREVIOUS to the old one. Run helm upgrade with --set archestra.replicaCount=0 --set archestra.worker.replicaCount=0, so every pod stops.

  3. Run helm upgrade again without those two flags. One pod's log shows Re-encrypted stored secrets under the new ARCHESTRA_SECRETS_ENCRYPTION_SECRET. Check that an integration can still read its credential.

  4. Remove the previous key in a later upgrade.

Outside Helm, stop every process, set both variables on all of them, and start one. Start the rest once its log shows the re-encryption.

Startup refuses a key that cannot decrypt existing secrets. Preserve the old key until rotation finishes. For every other secret, see Secret Rotation.

HashiCorp Vault

HashiCorp Vault stores secret values externally instead of in the database. PostgreSQL stores each secret's metadata.

Vault storage requires an Enterprise license and a Vault identity that can create, read, update, and delete secrets, plus list their paths. For KV v2, allow listing and deletion on the metadata path too.

  1. Set ARCHESTRA_SECRETS_MANAGER=VAULT and ARCHESTRA_HASHICORP_VAULT_ADDR.
  2. Configure one authentication method below on every web and worker pod, using Kubernetes Secret references for sensitive values.
  3. After rollout, open Settings → Secrets and use Check Vault Connectivity. Confirm Connection Successful before saving credentials.

Missing or invalid required Vault configuration, or an inactive Enterprise license, logs a warning and falls back to database storage. Check the active storage after rollout.

Set a custom storage prefix with ARCHESTRA_HASHICORP_VAULT_SECRET_PATH. ARCHESTRA_HASHICORP_VAULT_SECRET_METADATA_PATH overrides KV v2 metadata paths.

Vault Authentication

Choose the method matching your deployment identity using ARCHESTRA_HASHICORP_VAULT_AUTH_METHOD.

MethodSupply
TOKENARCHESTRA_HASHICORP_VAULT_TOKEN.
K8SARCHESTRA_HASHICORP_VAULT_K8S_ROLE, bound to the workload's service account.
AWSARCHESTRA_HASHICORP_VAULT_AWS_ROLE, bound to its AWS identity.

The Vault configuration entries cover KV versions, custom auth mount points, token paths, and AWS endpoints.