Popular starting points. Use Tab or arrow keys to browse results.

Skip to content
Aten SecurityThoth docs

Headless Operations

Operate Thoth without a dashboard using thothctl, the Thoth Control Plane API, and your existing CI/CD workflows.

Use this guide when you want to run Thoth with a code-first operating model and no dashboard dependency.

Operating model

  1. Git repopolicy + deployment config
  2. CI/CDthothctl + API automation
  3. Thoth Control Planesettings + integrations
  4. Managed endpointsthoth runtime + MCP traffic
  5. Security stackSIEM/SOAR + approval systems

1) Configure control-plane auth for automation

export THOTH_TENANT_ID="<tenant>"
export THOTH_APEX_DOMAIN="<apex-domain>"
export THOTH_API_KEY="<org-level-api-key>"

THOTH_API_KEY is the recommended CI/CD auth path.

Keep THOTH_TENANT_ID and THOTH_API_KEY set explicitly in automation, so an interactive login on the same machine never changes which workspace a pipeline targets.

For interactive admin sessions on a dedicated tenant, bootstrap a bearer session:

export THOTH_TENANT_ID="<tenant>"
 
thothctl auth login \
  --tenant-id "$THOTH_TENANT_ID" \
  --admin-email "<admin@company.com>"

On a trial or self-serve workspace, sign in with no options. THOTH_TENANT_ID, like --tenant-id, overrides the workspace the sign-in finds, so clear it first in a shell where it is set:

unset THOTH_TENANT_ID
thothctl auth login

You sign in in the browser and copy the sign-in code from the page it opens. thothctl finds your workspace and saves it with the session, so later commands use it when --tenant-id and THOTH_TENANT_ID are both unset. In the examples below, --tenant-id "$THOTH_TENANT_ID" is then empty and selects the saved workspace; you can also leave the flag out.

Commands that need a second factor

Some admin commands, such as thothctl api-keys create, need a recent second factor. A signed-in session gets one through the browser: the command prints a link and opens it, you confirm on that page with your authenticator, and the command continues. For the next 15 minutes that one thothctl session can run such commands without asking again; other devices and sessions are not affected. If you did not just run a command, do not confirm the link.

API keys do not use this step: they act within the permissions they were created with.

2) Bootstrap baseline governance

thothctl bootstrap \
  --tenant-id "$THOTH_TENANT_ID" \
  --compliance-profile "soc2" \
  --shadow-low allow \
  --shadow-medium step_up \
  --shadow-high block \
  --shadow-critical block \
  --webhook-url "https://siem.company.com/hooks/thoth" \
  --webhook-secret "$THOTH_WEBHOOK_SECRET" \
  --test-webhook \
  --mdm-provider "jamf" \
  --mdm-config-file "./mdm-provider.json" \
  --start-sync \
  --json

3) Enable strict Secrets Broker for MCP/API tools

Use strict fail-closed mode so that, for allowed calls to the listed hosts, the credential is resolved at request time from a managed secret backend and added as an auth header in the call's headers argument, instead of being kept in the tool call or the endpoint's local environment. This covers HTTP-style tool calls that carry a target host (url, uri, endpoint, host or target). It does not remove a credential that a local MCP server already reads from its own env or files. When the broker is on, the proxy refuses a call whose secret cannot be resolved, unless the machine sets THOTH_SECRET_BROKER_FAIL_ON_MISSING_SECRET=false. The proxy reads these settings from its environment (THOTH_SECRET_BROKER_*) or a settings file on the endpoint; see Setting the broker from code for Terraform, the MCP server and thothctl settings secret-broker, which also set agent and tool scopes.

thothctl bootstrap \
  --tenant-id "$THOTH_TENANT_ID" \
  --secret-broker-provider custom \
  --secret-broker-enabled true \
  --secret-broker-strict-endpoint-mode \
  --secret-broker-fail-on-missing-secret \
  --secret-broker-allowed-host api.figma.com \
  --secret-broker-allowed-host api.notion.com \
  --secret-broker-allowed-host <stitch-host> \
  --secret-broker-auth-binding "api.figma.com:Authorization:op://design/figma/token:Bearer " \
  --secret-broker-auth-binding "api.notion.com:Authorization:vault://kv/data/notion#token:Bearer " \
  --secret-broker-auth-binding "<stitch-host>:Authorization:aws-sm://prod/stitch/token:Bearer " \
  --json

Replace <stitch-host> with your Stitch API hostname.

4) Manage browser governance as code

thothctl browser providers upsert \
  --tenant-id "$THOTH_TENANT_ID" \
  --provider chrome \
  --name "Chrome Enterprise" \
  --config-file "./browser/chrome-provider.json" \
  --json
 
thothctl browser policies upsert \
  --tenant-id "$THOTH_TENANT_ID" \
  --provider chrome \
  --name "chrome-baseline-v1" \
  --enforcement-mode enforce \
  --policy-file "./browser/chrome-policy.json" \
  --json

5) Run endpoint-side policy sync

# Preview
thothctl browser sync \
  --tenant-id "$THOTH_TENANT_ID" \
  --device-id "<device-id>" \
  --user-id "<user@company.com>" \
  --dry-run \
  --json
 
# Apply
sudo thothctl browser sync \
  --tenant-id "$THOTH_TENANT_ID" \
  --device-id "<device-id>" \
  --user-id "<user@company.com>" \
  --json

6) Verification checklist

  • thothctl bootstrap --json returns success flags.
  • thothctl settings get --json returns expected baseline configuration.
  • thothctl mdm list --json shows enabled provider records.
  • thothctl endpoints list --json shows enrolled endpoints.
  • thoth health --json on endpoints returns healthy status.
  • SIEM webhook test succeeds and evidence events are visible in your monitoring pipeline.

7) Evidence quality checks

Run these checks after rollout and periodically in CI:

thothctl evidence slos \
  --tenant-id "$THOTH_TENANT_ID" \
  --window-hours 24 \
  --json
 
thothctl evidence decision-backfill \
  --tenant-id "$THOTH_TENANT_ID" \
  --window-hours 720 \
  --dry-run \
  --json

Use thothctl evidence backfill only when you need to materialize missing governance evidence records for older events.

Rollout guidance

Use staged rollout in automation:

  1. Canary endpoints
  2. Pilot group
  3. Broad production rollout

Use your existing incident and rollback playbooks for any regression during rollout.