Skip to content

request_secret: deliver straight into agenix through a local command #9

Closed

Description

@caniko

What

request_secret gets a third delivery mode, delivery: "agenix". The T3 secret card stays the entry surface, but the value goes straight into the operator's agenix store through a local command instead of into a T3 file or a one-use ref.

The request carries target metadata:

  • exactly one of user, rootModule, host
  • name
  • env[] (one variable per entry; omit for a bare secret)
  • category, expires (YYYY-MM-DD or never), custodian, project
  • verifyUrl

The card shows where the value will be stored (target, name, wiring, expiry, verify URL) next to the agent's description of what to create and with which scopes.

Why

Today an agent that needs a persistent secret asks with delivery: "file", gets a path under userdata/secrets/files/, and hands that path to canix's secret writers. On 2026-11-17 T3 swept that store before canix registered a Cloudflare token (canix evaluation was blocked at the time), the file was gone, and the operator had to create and paste the token again. A secret meant to live in agenix should never sit in a T3 file waiting for a second step.

Contract

On submit the server runs the configured command (setting agenixSecretCommand, default ["canix", "secret", "store"]) with no shell:

canix secret store (--user U | --root-module M | --host H) --name N [--env VAR ...] \
  [--category C] [--expires YYYY-MM-DD|never] [--custodian X] [--project P] [--verify-url URL]
  • stdin: the value as entered, then EOF. Nothing else.
  • success: exit 0, stdout one JSON object { path, committed_sha, verify: "pass"|"skipped", rekey: "queued"|"pending"|"not-needed", rops_id? }. The agent gets exactly this object.
  • failure: non-zero exit, stdout { "error": { code, message, path? } } (codes invalid, exists, verify_failed, eval_blocked, encrypt_failed, commit_failed). The card shows the message and stays open, so the operator can fix the value and retry or decline.
  • An empty command setting refuses delivery: "agenix" at request time with a clear error.
  • The command is killed after 5 minutes.

The receiving end (canix secret store) is built in canix.

Security properties

  • stdin only. The value is never in argv, the environment, a temp file or a log line.
  • No persistence in T3. The value is never written to the server secret store or secrets/files/. If the command fails, nothing is retained; the operator re-enters it.
  • Metadata-only result. The agent and the turn item see only the command's JSON result (path, commit, verify/rekey state), never the value.
  • Server-owned target. The target metadata is recorded on the turn item when the agent asks; the client's answer cannot change where the value goes.

Activity

  1. caniko commented on Nov 17, 2026

    @caniko
    OwnerAuthor

    Shipped in #10 (1cfc367 on canix), live on Atlas since 2026-11-17 and used for the SynDB Cloudflare token. Making it generic (secretStores) is tracked in #11 and proposed upstream in pingdotgg#38143.

  2. added a commit that references this issue on Nov 17, 2026
    62b64bb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions