Agent Secret Access Policy

Status: Implemented for MCP/CLI discovery and security-proxy substitution.

Calciforge currently keeps secret values out of agent context, but it also gates secret-name discovery and placeholder substitution when a Calciforge identity is known.

What exists today:

Policy shape:

[security.secret_access]
[[security.secret_access.rules]]
agents = ["research-*"]
users = ["brian"]
channels = ["signal"]
secrets = ["BRAVE_*", "SEARCH_*"]

Selectors are conjunctive: if a rule sets agents, users, and channels, all configured selectors must match. Empty selector lists are wildcards for that selector type. Secret patterns support *.

Identity sources:

Compatibility rule: unknown identity preserves process-scoped behavior only while no secret access rules are configured. Once an operator configures identity ACLs, missing or unknown identity fails closed: no matching rule means no discovery, no reference, and no substitution. Destination allowlists remain a second, independent gate.

Scope boundary: this policy controls secret discovery, reference creation, and network-boundary substitution. The central read-only /control/secrets/list and /control/secrets/ref/* helper endpoints are guarded by secret_discovery_api_key. The central /control/secrets/set helper is a privileged operator write path guarded by secret_control_api_key; it is not a per-agent write ACL. Add identity-scoped write permissions separately before exposing write-capable helpers to broad agent surfaces.

Remaining hardening work: