Agent Credentials
A run profile names a credential; the worker resolves its value through trusted operator configuration immediately before invoking the agent. The reference is stored with the run. Resolved values are not added to profiles, queue messages, request bodies, or evaluator inputs by the host.
agent:
provider: custom
name: support-agent
version: "1.0.0"
harness:
kind: direct_probe
completion:
kind: inline
http:
url: https://agent.example.com/evaluate
credential: agent-api
References contain 1–128 ASCII letters, digits, dots, underscores, or hyphens. A reference is a lookup name, not permission to access a secret. Profiles cannot select secret files, environment variables, or credential-service URLs.
Start workers and any coordinator that polls or cancels authenticated deferred invocations with --agent-credentials /etc/vigilo/credentials.json
(or VIGILO_AGENT_CREDENTIALS). This JSON file is operator-owned and loaded once
at process startup. Workers use it for submission and inline requests. Coordinators use it for deferred requests. Missing provider configuration or an
unknown reference fails the invocation; there is no unauthenticated fallback.
Workers without credential references need no credential provider or external service.
Standalone bindings
{
"version": 1,
"provider": {
"type": "local",
"bindings": {
"agent-api": {
"source": { "type": "env", "name": "AGENT_API_TOKEN" },
"authority": { "kind": "agent" },
"allowed_origin": "https://agent.example.com",
"header": "Authorization",
"prefix": "Bearer "
}
}
}
}
Supply AGENT_API_TOKEN through your process manager. For a mounted secret, replace
source with {"type":"file","path":"/run/secrets/agent-token"}. Files contain
exact UTF-8 secret values: trailing newlines are not trimmed. Paths are interpreted
relative to the worker's working directory; absolute paths avoid ambiguity. Projected
secret symlinks are supported; their targets must be regular files.
The worker validates the reference, origin, and header conflicts before reading a
local secret. Origins match scheme, host, and effective port; they cannot contain
paths other than /, queries, userinfo, or fragments. All paths and HTTP methods on the configured
origin share a local binding's authority. Use separate origins when paths have different
trust levels. Bindings are appropriate for an operator-controlled trust domain;
a shared worker's local bindings do not provide tenant isolation.
Secret sources are read on every attempt, without caching. Atomically replacing a secret file affects subsequent resolutions; changing a process environment requires restarting the worker. Run configuration freezes the reference, not the secret value.
Service provider
The core includes a client for this HTTP protocol. A separately operated service owns authorization and secret retrieval; no hosted product or cloud SDK is required by core. It can integrate with customer-owned secret stores behind this protocol.
{
"version": 1,
"provider": {
"type": "service",
"endpoint": "https://credentials.internal.example.com/v1/resolve",
"token": { "type": "file", "path": "/run/identity/credential-service-token" },
"grants_directory": "/run/vigilo/grants"
}
}
The operator provisions a service bearer token and a grant file named with the
canonical run UUID under grants_directory, such as
/run/vigilo/grants/01900000-0000-7000-8000-000000000001. The file contains the exact
opaque grant value. Both token and grant use the same bounded source handling as
local secrets. Core only reads these inputs; it does not create or delete credential
or grant files. The operator owns provisioning, rotation, and removal. The token can instead use an environment source. The service token
may be a workload-identity token issued by external infrastructure; core does not
perform cloud token exchange, validate that token's claims, or issue execution grants.
The worker sends an authenticated POST when resolving a credential. Each outbound agent request resolves its credential binding:
{
"version": 1,
"authority": { "kind": "agent" },
"credential": "agent-api",
"destination": "https://agent.example.com/evaluate",
"run_id": "01900000-0000-7000-8000-000000000001",
"run_plan_digest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"execution_id": "01900000-0000-7000-8000-000000000002",
"attempt_id": "01900000-0000-7000-8000-000000000003",
"grant": "opaque-execution-grant"
}
IDs come from the allocated execution, not profile metadata.
run_plan_digest identifies the accepted immutable plan when resolving for run
execution; it is null when no accepted-work context is attached. The service must verify
its bearer token's issuer, audience, expiry, and worker identity; then verify the
grant's scope/lifetime and the worker's assignment to that run/execution. IDs and a
credential name are not authorization evidence. Bind authorization to the requested
destination and organization. Two organizations can use the same credential name
without sharing a secret. The service must enforce that separation.
An authorized response is HTTP 200 with this exact JSON shape:
{
"version": 1,
"authority": { "kind": "agent" },
"allowed_origin": "https://agent.example.com",
"header": "Authorization",
"value": "Bearer resolved-token",
"expires_at": "2030-01-01T00:01:00Z"
}
value is the complete header value, including its prefix. expires_at is an RFC
3339 timestamp in the future; the worker checks it again before sending the agent
request. The service should choose short validity appropriate to the credential.
Core validates the response version, origin, header, size, and expiry. It does not
cache the response or persist its fields. Core adds no control-database queries for credential resolution.
Revoking a grant prevents future resolution when enforced by the service; it does
not retract an already delivered token or cancel an in-flight agent request.
Timeouts, transport failures, and HTTP 408, 425, 429, 500, 502, 503, or 504 produce
retryable credential_unavailable failures using the existing durable attempt
budget/backoff. There are no provider-internal retries and resolver Retry-After is
not interpreted. Other non-200 statuses are terminal authentication failures.
Malformed, expired, oversized, or mismatched responses are terminal configuration
failures. Service response bodies never become error diagnostics. Service outages
never fall back to a different secret source or an unauthenticated agent call.
Host resource resolution
The library's resource resolver contract separates host-owned bindings from standalone file and environment configuration. A hosted runtime requires this resolver during construction; caller and daemon handles share its admission budget. Preparation requests carry caller, run and dataset identity. Execution requests carry verified run identity and the accepted plan digest. Replies must match the exact request and the pinned physical storage binding; a binding hash alone is not authorization.
The resolver supplies nonsecret storage configuration and evaluator credential
bindings, retained with the cached run/shard context. Live credential checks and
execution controls govern revocation. Live credential callbacks supply request-bound, expiring material.
Storage signing credentials renew through that provider; no SDK default credential
chain, environment-variable binding or read-route variable is used by injected
storage. Bindings::with_read_endpoint supplies an explicit validated read route
to the same pinned namespace without reading a process variable or changing the
binding hash. Outbound credentials retain the same origin, header, expiry and collision
checks as standalone providers. HTTPS is required by default. For local development,
the host can explicitly set HostedConfig::agent_credentials_allow_http_loopback
to permit HTTP destinations with literal loopback IP addresses; profiles cannot
enable this exception. Callbacks receive allocated execution and attempt
IDs plus agent or evaluator authority. Preparation does not grant outbound
invocation authority.
Binding and storage-credential callbacks share a runtime-wide limit of 64 calls; outbound credential resolutions share their own existing limit of 64. Each resolution has a 10-second deadline including admission wait. Per-run evaluator bindings retain the runtime's HTTP ceilings and shared request semaphore. Cancellation releases admission; denial or failure never falls back to a local source. Core performs no database lookup for these callbacks. A host that calls a remote service owns its latency, availability, service authentication and transport security. Core validates returned bindings; the host authorizes requests and selects the correct secret.
Credential revocation prevents subsequent resolution when enforced by the host; it cannot retract material already delivered or bytes already read. Storage SDK credentials and invocation-local evaluator credentials remain usable until their expiry or rejection by the destination. Execution controls govern stopping accepted work.
Transport and exposure boundaries
Agent, evaluator and standalone credential-service requests require HTTPS and use
the bundled WebPKI TLS roots.
The provider does not configure custom certificate authorities or mutual TLS.
They disable redirects and ambient HTTP proxies for both resolver and agent calls.
For local development only, top-level "allow_http_loopback": true permits HTTP
with literal loopback IP addresses; it does not allow arbitrary HTTP hosts or the
hostname localhost. URL userinfo and fragments are rejected.
Headers may be Authorization, api-key, or x- headers, except x-forwarded-*
and x-http-method-override. X-Vigilo-Attempt-Id is also reserved for
host-generated correlation and cannot carry a credential. Static profile headers cannot override the managed
header (case-insensitive), Host, or transport/routing controls. Ordinary nonsecret
headers remain supported. Static headers are persisted, so never put secrets in them.
| Boundary | Limit |
|---|---|
| Operator configuration | 1 MiB; version 1; unknown fields rejected |
| Secret, service token, or grant | 16 KiB each |
| Combined authentication header value | 16 KiB |
| Resolver response | 64 KiB |
| Injected storage signing fields | 16 KiB each; nonempty; expiry required |
| Credential destination URL | 8,192 bytes |
| Concurrent resolutions per worker | 64 |
| Resolution deadline, including permit wait and source reads | 10 seconds |
Agent body limits and request timeout apply separately after resolution. Credentials are marked sensitive in HTTP header diagnostics. Authenticated agent HTTP failures omit response-body excerpts. Host diagnostics do not include secret values, source contents, or credential-service response bodies.
An authorized worker and the intended endpoint receive the secret. This is not protection against a compromised worker, memory dumps, or an endpoint echoing secrets in successful responses. Responses still undergo normal evaluation and retention; generic redaction cannot reliably detect transformed secrets. Core does not promise complete memory erasure or zero disclosure. Operators must protect worker memory, secret sources, grant files, service authentication, and endpoint behavior.
Evaluator Credentials
Evaluator HTTP uses the same operator credential provider. The evaluator supplies
its request, never a credential reference. Operator bindings in
--evaluator-http-config select a reference
using the verified evaluator ID, method and exact destination. No matching binding
means an anonymous request; a configured binding that cannot resolve fails closed.
Service requests use version 1 and the same execution IDs, destination, credential
and grant fields shown above, with evaluator authority:
"authority": {
"kind": "evaluator",
"evaluator_id": "01900000-0000-7000-8000-000000000004",
"policy_revision": "<64-character policy digest>"
}
The service validates this authority against the grant and evaluator assignment.
Every successful response echoes the exact authority object from the request;
core rejects missing or different authority.
It must not treat evaluator requests as agent requests. Core authorizes the
requested destination before resolving credentials and includes resolution in the
HTTP budget. Credential material remains host-owned and is injected into the request.
A resolved evaluator credential is cached only within its invocation and exact binding. Every call checks expiry locally; expired values are removed before refresh. Failed refresh never reuses an expired value. A new invocation resolves again. Standalone operators rotate environment values by restarting workers; service providers can return short-lived values. Neither implies immediate revocation of a valid cached credential. Authentication failures are returned to the evaluator without an automatic retry.
Host errors and filtered response headers do not expose injected secrets. An authorized endpoint can still echo a secret in its body; core does not infer or rewrite arbitrary provider content to remove it.