Skip to content

Secrets layout ​

This page lists where secrets live, what they are called and who owns them. It never holds a value. A build check fails the whole site if anything key-shaped appears here.

The rules ​

  • Secrets are files in one secrets directory, outside the checkout, mode 0700 (local) with each file mode 0600. In the AWS tenant they are in /run/forelead/secrets, owner uid 10001, mode 0400.
  • Put a secret there with forelead_secret_put NAME < source-file (single-host guide). It sets owner and mode and refuses an empty file. Never put a value in a command line, shell history or the checkout.
  • The PKI directory (FORELEAD_PKI_DIR) is a different directory and must not sit inside the secrets directory.
  • The agent and the sandbox never get these files. Provider keys are read only by the broker; the GitHub App key only by the control plane.

Local stack (FORELEAD_SECRETS_DIR) ​

FilesOwner inside the containerMode
app_pgpass, migrator_pgpass, gateway_pgpass, modelwatcher_pgpass, broker_config.json, model-watcher.json, model_key, oidc_google_client_secret, oidc_microsoft_client_secret, and every *.crt and *.key named in compose.yamluid 10001 (platform image)0600
runner-governance-profile.json, runner-governance-public-key.pem, reconciler-config.json, github-app-key.pem, session-object-access-key, session-object-secret-key, session-object-ca.crt (only with compose.agent.yaml)uid 100010600
postgres_passworduid 999 (postgres:17)0600
app_password, migrator_passwordthe root-run bootstrap process only0600

What the main ones are:

NameWhat it isRead by
model_keyThe model provider API key (a Console API key; subscription credentials are refused)broker
broker_config.jsonModel mappings and key file pathsbroker
github-app-key.pemThe GitHub App's private keycontrol plane
reconciler-config.jsonBoard, repository and agent configurationcontrol plane, gateway (cache setting)
task-ca.crt / task-ca.keyThe CA the broker signs task certificates withbroker (key), runner and gateway (cert)
client-ca.crtCA that verifies runner and operator certificatescontrol plane
runner-governance-profile.json, runner-governance-public-key.pemSigned agent rules and the trusted key that verifies themcontrol plane, runner
*_pgpassPer-service Postgres password fileseach service

Where the host files live (defaults in upgrade.sh) ​

PathHolds
$FORELEAD_HOME (default $HOME/.forelead-96)The stack's root on the local host
$FORELEAD_HOME/operatorThe operator certificate pair
$FORELEAD_HOME/pki/caThe client CA for issuing operator certificates
$FORELEAD_HOME/live/agent-runner, $FORELEAD_HOME/live/preflightRunner working directories and their private key files

Instance-specific, non-secret configuration (env files, mirror allow-lists) is kept in the forelead-ai/ops repository under instances/.

AWS tenant secret files (names only) ​

HostFiles
appapp_pgpass, migrator_pgpass, gateway_pgpass, modelwatcher_pgpass, broker_config.json, model-watcher.json, model-watcher.crt, model-watcher.key, model_key, controlplane.crt, controlplane.key, client-ca.crt, broker.crt, broker.key, broker-ca.crt, gateway-ca.crt, gateway.crt, gateway.key, task-ca.crt, task-ca.key, task-cert-client.crt, task-cert-client.key, reconciler-config.json, github-app-key.pem, runner-governance-profile.json, runner-governance-public-key.pem, runner-model-ca.crt; may be empty: openai_key, oidc_google_client_secret, oidc_microsoft_client_secret
runnercontrolplane-ca.crt, runner.crt, runner.key, preflight-runner.crt, preflight-runner.key, runner-preflight.key, task-ca.crt, runner-model-ca.crt, runner-governance-profile.json, runner-governance-public-key.pem; may be empty: ghcr_pull_token
mirrorcloudflare_token, packagemirror-ca.pem, packagemirror-server.pem, packagemirror-server.key

Technical notes ​

  • deploy/cloud/start.sh refuses to start a role when a required secret file is missing or empty, and names it.
  • Rotating model_key: forelead_secret_put model_key < replacement, then docker compose -f deploy/compose.yaml up -d --wait --force-recreate so the mounts pick up the new file. Delete a retired secret only after nothing in the current bundle references it. The broker validates Anthropic keys at startup and again when it reads a rotated key.

Sources ​