Skip to content

Automate Management

Control is the zone-bound remote automation counterpart to the web console. It is an optional plugin inside the API service, not a separate deployable or port.

Use the Admin SDK when trusted automation can call the Admin API directly with an appropriately scoped operator credential. Use Control when automation needs a self-describing, zone-bound invoke surface with short-lived Control tokens, replay protection, per-command scopes, rate limits, and mandatory audit.

Neither surface manages local stack lifecycle or launches workloads. Control must never appear as a top-level caracal runtime command.

ItemContract
HostAPI service, local port 3000
InvokePOST /v1/control/invoke
Build-time mountCARACAL_CONTROL_ENABLED=true
Runtime gateCONTROL_GATE_FILE must exist
Default Helm postureDisabled

Removing the gate file makes invoke return 503 without restarting API. API health and readiness remain the service probes.

sequenceDiagram
  participant Operator as Console operator
  participant STS
  participant Client as Trusted automation
  participant Control as API Control plugin
  Operator->>Control: create zone-bound Control key in console
  Client->>STS: exchange key for short-lived caracal-control token
  STS-->>Client: scoped one-use token
  Client->>Control: POST /v1/control/invoke
  Control->>Control: verify gate, JWT, scope, JTI, rate, audit
  Control-->>Client: result or structured error

The token’s zone comes from the Control key. A caller must not select another zone. Each token is replay-protected, so mint a fresh token for each invoke.

Control exposes the shared management catalog, including imperative noun/verb operations and declarative ensure and state plan|verify|apply workflows. Prefer declarative reconciliation for repeatable CI: it is idempotent, reports per-object outcomes, authorizes each touched noun, and can dry-run before writes.

Use catalog describe to discover commands, scopes, flags, and desired-state schema instead of hardcoding a copied catalog. Authority records and governed Sessions are separate nouns.

For exact payload examples, scopes, reconciliation documents, and error envelopes, use Use the Admin API and Bootstrap Control State.

ConditionResult
Gate absentcontrol_disabled, 503
Token missing or invalidunauthorized, 401
Token reusedtoken_replay, 401
Scope or policy insufficientdenied, 403
Bound zone conflicts with requested statezone_mismatch, 409
Subject/source exceeds raterate_limited, 429
Required audit cannot be recordedaudit_unavailable, 500; operation does not execute
Body exceeds 64 KiB413

Control depends on STS JWKS/issuer validation, Redis replay/rate state, the API’s downstream credential, and durable audit. Keep it behind TLS and store the long-lived Control key in the automation platform’s secret store.

Control keys are managed in Services → Control. They are zone-bound applications restricted to control:<noun>:<verb> scopes. Control operations cannot mutate, rotate, or delete Control-key applications, so automation cannot use one key to take over another. Secret reveal is audited.

Choose the Right Surface for the complete boundary or Enforce Boundaries for trust placement.