- 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
At a Glance
Where config lives
fracta.yaml has two auth layers:
Typical flow:
- Define a reusable profile under
auth.credentials.profiles. - Point a runtime at it with
auth_profile. - Override
auth_bindingon 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:
- 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:Architecture
Three Layers
Sources
Sources describe credential origins. In YAML, they live underauth_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 isfetch-bedrock-token:
- Try corporate proxy HEAD request (source:
proxy) - If that fails, read mounted fallback file (source:
host_fallback)
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:
source + env_name: inject a materialized source into an env varresolver + env_name: inject the first materialized source that the helper usesenv_nameonly: 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)
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
ordertemporarily 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
- 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
SetFRACTA_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 viafractalog.Component("credentials"):
Config File Locations
Afterfracta init --scaffold <mode>, the per-mode config files live under your project root:
Known Limitations
— Fixed:auth_profilenested underkubernetesauth_profileandauth_bindingnow live atagents.agent_runtimes.<name>.*directly, not underagents.agent_runtimes.<name>.kubernetes.*.K8sCredentialStageris not yet implemented — staging usesInMemoryCredentialStager(same-process) orRemoteCredentialStager(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.

