Skip to main content
The credential pipeline handles authentication for both local-process agents and K8s agents. It uses a three-layer model:
  • sources: named credential origins under auth_origins
  • resolvers: runtime helper commands under runtime_auth_resolvers
  • bindings: delivery rules that tell a host adapter how to consume credentials
The names are easy to read as peers, but they are not peers in time:

At a Glance

Where config lives

fracta.yaml has two auth layers: Typical flow:
  1. Define a reusable profile under auth.credentials.profiles.
  2. Point a runtime at it with auth_profile.
  3. Override auth_binding on the runtime only when the same profile needs a different delivery shape for a different adapter.

How to read the names

Auth config mixes three different kinds of names: Reference fields are what connect the local labels: ASCII relationship diagram:
Annotated example:
Practical rule:
  • If changing the name requires changing a matching reference elsewhere in fracta.yaml, it is probably a local label.
  • If changing the name requires changing a real Secret, env var, or runtime expectation outside fracta.yaml, it is probably an external name.
  • If the name comes from the config schema itself, it is a schema keyword and should not be renamed.

Binding types

Bindings answer: “how do credentials reach the runtime?”

Credential source types

Sources answer: “where does the credential come from?”

Quick examples

Claude with refreshable Bedrock auth:
Codex or OpenAI-style direct API key:
K8s Secret-backed API key:

Architecture

Three Layers

Sources

Sources describe credential origins. In YAML, they live under auth_origins. Each source has a scope that determines when it is available: Source types:

Resolvers

A resolver is a runtime helper command. The primary example is fetch-bedrock-token:
  1. Try corporate proxy HEAD request (source: proxy)
  2. If that fails, read mounted fallback file (source: host_fallback)
In local-process mode, a resolver can also stand alone with no sources block at all. Example: Claude can call bedrock-auth-helper directly as its apiKeyHelper. order is deprecated. If a helper command needs fallback logic, the command should own it internally rather than duplicating it in config.

Bindings

Bindings describe how a host adapter consumes credentials: bearer_env has three valid shapes:
  1. source + env_name: inject a materialized source into an env var
  2. resolver + env_name: inject the first materialized source that the helper uses
  3. env_name only: plain env passthrough, where the value already exists in host/profile env

Execution Flow

Source Phase Annotation

When the planner builds a credential plan, each source is annotated with an execution phase based on its scope and the current topology:

Cross-Boundary Staging

When the orchestrator runs in-cluster (Topology B), host-edge credentials must be staged across the CP API boundary:

Staging Rules

Config Reference

Minimal local-process profile (Claude on host)

Env passthrough profile (OpenAI/Codex-style)

This binding does not need a source or resolver. It simply states that the adapter expects OPENAI_API_KEY to already be present in the merged env.

Full credential profile (K8s host-orchestrator)

In-cluster profile (no host_fallback — pods self-auth via the credentials proxy)

Host binding override (non-Claude adapter)

order Deprecation

resolvers.<name>.order is deprecated. Use this rule going forward:
  • If the helper is an opaque command, fallback order belongs inside the command.
  • New configs should omit order.
  • Existing configs may keep order temporarily for backward compatibility.

Assertions

Assertions are declarative config-driven validation rules. They run against the final merged environment (host env + profile env + binding-derived env) before credentials are materialized. No Claude/Bedrock-specific logic is hardcoded in Go.

Diagnostics

fracta auth diagnose

Runs the credential pipeline in dry-run mode and prints:
  • Credential origins with scope and execution phase
  • Runtime helper command, TTL, and deprecated source order when present
  • Binding type and target
  • Assertion results (pass/fail)
  • Final merged environment variables

Pod helper debug mode

Set FRACTA_CREDENTIALS_DEBUG=1 in the credential profile env to enable verbose stderr logging in fetch-bedrock-token:

Structured log events

All credential operations emit structured logs via fractalog.Component("credentials"):

Config File Locations

After fracta init --scaffold <mode>, the per-mode config files live under your project root:

Known Limitations

  • auth_profile nested under kubernetesFixed: auth_profile and auth_binding now live at agents.agent_runtimes.<name>.* directly, not under agents.agent_runtimes.<name>.kubernetes.*.
  • K8sCredentialStager is not yet implemented — staging uses InMemoryCredentialStager (same-process) or RemoteCredentialStager (CP API HTTP). A K8s Secret-backed stager would be needed for multi-process production deployments without a CP API.
  • No end-to-end integration test covering the full remote staging → CP API → worker rehydration path.