Skip to main content
Version: 1.16.0-dev

Secure AgentWorks identity and credentials

An AgentWorks Runtime keeps no users, passwords, sessions or API tokens. Every request carries a bearer credential that the Runtime checks on each use, and every secret an agent needs is named by a credential reference and read only when a call needs it. What checks a caller depends on the mode: a headless Runtime accepts the caller keys and identity providers its runtime file names, and a Runtime connected to DVARA Flightdeck accepts Flightdeck's tokens. Model, MCP and agent-to-agent calls made through the DVARA Gateway then carry the governance the gateway applies to every call: policy, personal-data checks and a tamper-evident audit trail.

How do callers authenticate to a headless Runtime?​

The runtime file's callers section names who may call the Runtime. It names the environment variable that holds each key, never the key itself:

callers:
keys:
- {name: ci, secretEnv: CALLER_KEY_CI, role: operator}
- {name: dashboards, secretEnv: CALLER_KEY_DASHBOARDS, role: viewer}
- name: kyc-bot
secretEnv: CALLER_KEY_KYC
role: operator
deployments: [production/kyc] # optional; every deployment when left out
issuers: # identity providers whose signed tokens are accepted
- issuer: https://login.example.com
audience: agents
jwkSetUri: https://login.example.com/.well-known/jwks.json # optional; this is the default
roleClaim: roles # optional; default "roles"
roles:
admin: [agentworks-admin]
operator: [agentworks-run]
viewer: [agentworks-read]
  • Caller keys are sent as Authorization: Bearer <key> and act with their role in the file's workspace. A key must be at least 32 characters, every key must differ, and its variable must not start with AGENTWORKS_. The Runtime keeps only a SHA-256 digest of each key.
  • A key's deployments, from AgentWorks 1.16.0, limit what it changes. Each entry is environment/name, or a name alone for that name in every environment, and must name a deployment of the file. The key then starts runs only on those deployments and cancels, pauses, resumes and answers only for their runs, operations and sessions; anything else is refused with 403 ACCESS_DENIED, on the A2A front too. It still reads the workspace as its role allows. A key with no deployments is not limited, and an identity-provider token always holds its role in the whole workspace.
  • Identity-provider tokens must be signed by a key from the issuer's JWK set, name the issuer in iss, include the audience and be within their lifetime. The values of roleClaim map to roles as roles says; a token with no mapped value is refused with FLIGHTDECK_ROLE_MISSING. The token's groups are recorded with the run, so tool permissions can name a group.
  • Anything else is refused with 401. A credential in a URL, as a query parameter named like a credential, is refused with CREDENTIAL_IN_URL.
RoleHolds
viewerRead the workspace and answer interactions
operatorThe viewer's permissions, plus start, cancel, pause and resume runs and operate deployments
authorThe viewer's permissions, plus write agents, releases and artifacts, where a headless Runtime serves them
adminEvery permission

Rotate a key by changing the runtime file: the Runtime picks the change up without a restart, a removed key stops working at once, and its open run streams end. A caller's pause request, its withdrawal and a cancel are recorded in the Runtime's run store with the caller and how they signed in (runtime-key or runtime-issuer); a viewer reads them at GET /api/v1/administrative-audit. See Run AgentWorks headless for the rest of the file.

How do callers authenticate to a connected Runtime?​

Flightdeck signs users in and issues product tokens whose roles are per environment. The Runtime checks each token's signature, audience, account and workspace against the workspaces its verified bundle assigns, and writes no identity of its own.

RefusalCause
401 AUTHENTICATION_FAILEDA bad signature, another audience, an expired token, or a token without its environment claims
403 FLIGHTDECK_WORKSPACE_UNKNOWNAn account or workspace the bundle does not assign to this Runtime
403 FLIGHTDECK_ROLE_MISSINGA token with no AgentWorks role
403 FLIGHTDECK_WORKSPACE_REQUIREDA Flightdeck user who has not picked a workspace; AgentWorks never picks one

A run starts only in the environment the user selected and needs the permission there; a request in an environment where the token holds no such permission is refused with 403 ACCESS_DENIED, on the REST API and on the A2A front. When the DVARA Gateway calls an agent for a user, it exchanges the user's token at Flightdeck. The run is then the user's, and its recorded actor names both the user and the gateway. See how identity works in a connected Runtime.

How do credential references keep secrets out of agents?​

Agent specifications, runtime files and releases carry credential references, never secret values. A runtime file refuses a deployment credential that is not a reference. The packaged Runtime resolves two kinds of reference:

ReferenceResolves toAvailable
env://<id>The environment variable that agentworks.credentials.environment.<id>.variable namesHeadless and connected
flightdeck://dvara-gateway, flightdeck://dvara-gateway:<slug>By default, the Runtime's current Flightdeck service token for the gateway, for its first workspace or for workspace <slug>Connected only
agentworks:
credentials:
environment:
crm-api:
variable: CRM_API_TOKEN
scope: platform # required: platform, organization:<uuid> or workspace:<uuid>
gateway:
gateways:
dvara:
type: openai-compatible
base-url: https://gateway.example.com/v1
credential-ref: env://dvara-gateway

A deployment in the runtime file then binds crm: env://crm-api under its credentials. An id is lower-case letters, digits, . or -. The scope is required, and a missing or unknown scope stops startup and names the setting. A reference used outside its scope, or one no provider knows, is refused. The secret is read only when a call needs it, and is never cached or logged; each use is logged under agentworks.credentials.audit with its action, outcome and reference, never the value. A connected Runtime also sends each use to Flightdeck's audit trail.

Environment variables can be visible to child processes and diagnostics. Fill them from Docker or Kubernetes secrets rather than from a configuration file, and never bake them into an image.

How does a connected Runtime get its gateway credentials?​

An enrolled Runtime proves its identity with its own certificate, created at enrolment and renewed before it expires. Keep the enrolment directory on a protected durable volume: it holds the Runtime's private key, certificate, Flightdeck's CA, the last verified bundle and the audit spool.

For gateway calls the Runtime requests short-lived service tokens from Flightdeck over that certificate, one per workspace, and for a run in an environment the bundle lists, one bound to that environment. Tokens stay in memory and are not written to the run store, logs or the records sent to Flightdeck. If a token cannot be issued, the call fails with SERVICE_TOKEN_UNAVAILABLE instead of continuing without a credential, and after a revocation flightdeck:// references resolve nothing. A run started for a user keeps that user's authority on its governed MCP and A2A calls rather than borrowing the Runtime's.

What network and process boundaries should you set?​

  • TLS. Under the production or prod profile the Runtime refuses to start without server.ssl.enabled=true or an explicit trusted-proxy server.forward-headers-strategy. The same profiles refuse local-development mode and obvious placeholder values in secret settings.
  • Model gateway transport. An openai-compatible gateway's base-url must be HTTPS, or plain HTTP to a loopback host. agentworks.gateway.gateways.<id>.private-network=true (default false) allows plain HTTP elsewhere; set it only on a network you trust.
  • Egress. Allow only what the agents need: the DVARA Gateway or model endpoint, tool, MCP and A2A services, the identity providers' key sets, DNS and telemetry, plus Flightdeck's enrolment port (8443 by default) for a connected Runtime.
  • No database credentials. A Runtime has no database; a removed spring.datasource.* or agentworks.planes.* setting stops its start.
  • Container. The packaged image runs as non-root uid 65532 with a read-only root filesystem. Mount only the data volume writable, and run one Runtime per volume.
  • Secrets at rest. Keep caller keys, enrolment tokens, provider credentials and signing keys out of images, Git, logs, support bundles and agent specifications.

Production checks​

Before accepting production work:

  1. Verify the exact AgentWorks version and image digest.
  2. Start under the production profile and confirm it accepts your TLS or proxy configuration.
  3. Send a request without a credential and confirm 401; confirm a viewer key cannot start a run.
  4. Remove a test caller key from the runtime file and confirm it stops working.
  5. For a connected Runtime, revoke a test Runtime and confirm its flightdeck:// references stop resolving.
  6. Confirm credential-use and run-control records name the caller and the reference, and contain no secret value.

Next steps​