Skip to content

safekeys/secret-transport [built] ​

Transport is how a secret gets from where it was created to where it is used — across environments, clouds, agents, and multi-agent protocol buses (MCP, A2A) — carrying only folders and tokens. No unwrap occurs during transport, so the journey is the safe part and every hop can be untrusted.

Status: built

Why this exists ​

Agentic systems route credentials through many hops, and each hop is traditionally a new exposure. Making the transport artefacts inert (ciphertext folders) and the authority artefact harmless (tokens) decouples movement from risk: a secret can be copied anywhere, and the only place it becomes real is a sidecar with a valid token at the destination.

Design decisions ​

transport-is-the-differentiator [accepted] ​

Decision: Differentiate on transport — folders and tokens that agents create and move through arbitrary flows — rather than on use-time brokering alone.

Rationale: The competitive analysis in the blueprint notes that broker and proxy patterns already keep credentials out of model context at use time. Transport is the gap — the ability to move secrets freely through agentic flows with a stable interface that can later grow a hardware root of trust.

bus-agnostic-payload [accepted] ​

Decision: Carry only folder URIs and tokens over MCP, A2A, and other agent buses.

Rationale: Bus payloads are logged, cached, and inspected by third parties; keeping them inert makes every one of those observers harmless.

How it works ​

Transport a secret between agents (agent-to-agent) ​

Agent A creates a secret; Agent B uses it, with neither transcript containing plaintext.

  1. Receive — Agent A creates a secret and receives a token and folder path.
  2. Send — Agent A passes the folder path and token to Agent B through the agent bus.
  3. Observe — No unwrap occurs in transit; the folder is inert.
  4. Send — Agent B presents the token to its local sidecar to use the secret.
  5. Observe — Neither Agent A's nor Agent B's transcript contains plaintext.

Transport a secret across environments (cross-environment) ​

A folder is synced or copied to another environment and used there under a new token.

  1. Send — The folder is copied to the destination environment via git, an object store, or artefacts.
  2. Observe — No key material travels with it and no unwrap occurs.
  3. Transmit — A token scoped to the destination audience is minted.
  4. Observe — The destination sidecar can now resolve; the source's token cannot be used at the destination.

Guarantees ​

transport-is-inert ​

Moving a secret must not require or reveal key material.

Acceptance criteria:

  • [ ] Transport carries folders and tokens only
  • [ ] No unwrap occurs during transport
  • [ ] Compromise of a transport channel yields ciphertext and tokens, not values

tokens-bounded-to-audience ​

A token valid in one environment is not automatically valid in another.

Acceptance criteria:

  • [ ] aud binds the token to its intended resolver or environment
  • [ ] A token used outside its audience is denied
  • [ ] Cross-environment use requires a new token

transcripts-stay-clean ​

Agent-to-agent handoff leaves no plaintext in any transcript, log, or tool call.

Acceptance criteria:

  • [ ] Handoff payloads contain only paths and tokens
  • [ ] The two-agent demo asserts no transcript contains plaintext
  • [ ] Tool-call arguments never carry values

Test specifications ​

two-agent-demo-no-plaintext ​

Given:

  • agent_a: "creator"
  • agent_b: "consumer"
  • secret_value: "demo-secret"

When: agent-to-agent

Then:

  • assertion: Agent A's transcript contains no plaintext
  • assertion: Agent B's transcript contains no plaintext
  • assertion: Agent B successfully used the secret

Contracts verified: transcripts-stay-clean, transport-is-inert

cross-environment-token-rejected ​

Given:

  • source_aud: "env-staging"
  • destination: "env-production"

When: cross-environment

Then:

  • assertion: the source token is denied at the destination
  • assertion: a destination-scoped token succeeds

Contracts verified: tokens-bounded-to-audience

intercepted-transport-yields-nothing ​

Given:

  • capture_transport: true

When: cross-environment

Then:

  • assertion: captured payloads contain no plaintext
  • assertion: captured tokens cannot be used without a reachable sidecar and key authority

Contracts verified: transport-is-inert

Implementation ​

  • Primary: pkg/sidecar/server.go
  • Test code: test/e2e/two_agent_demo_test.go
  • Test code status: manual

See Also ​

  • safekeys/encrypted-folder
  • safekeys/capability-token
  • safekeys/mcp-server