Signed action authorizations

Whether a person signed for this exact step. Some sites ask for more than a mandate before a step runs: a person signs that one agent may take one exact action, with these values, until a given moment, once. This page is the rule a gate must follow to get that right, in a form that can be implemented in any language. The decision behind it is ADR 0049.

uv run python examples/action-verifier/verify.py docs/reference/action-authorization-vectors.json

AD-23 and OP-21 are the scenarios that test it. A system that authorizes exact actions can find how its parts meet the benchmark in Which way in.

Implementations of the rule

Passing the vectors says an implementation follows the rule, and nothing about the rest of the system.

Implementation Version Who ran the vectors Result
Python, examples/action-verifier/verify.py (this project's reference) main every pull request, in CI 14/14
JavaScript, actionNotSigned() in examples/command-gate-node/adapter.mjs main through AD-23 and OP-21, in CI every step as the control path
NTI TrustEngine integrations/agentic-datacenter/authorizations.py, by its maintainer 3559406 NTI's maintainer, and this project's maintainers again on 2026-11-29 with NTI's own authorizations_vectors.py, vectors at 19392c3 14/14

When a site requires one

A scenario names the contracts whose every step needs a signed authorization, and who may sign (exact_actions). For a step of any other contract nothing on this page applies, and the request carries nothing of it.

What a gate is sent

A request for a step of such a contract carries action_authorizations:

Field What it is
principal Whose step it is: the proposer.
authorizations Every authorization presented for the proposer, by time of issue. Some may be forged, for other steps, expired or already used.
signers Every person the site lists as one who may sign, with the public key. Established by Agentic-Datacenter, never by the agent.
used The id of each authorization a step was carried out under. Kept by the site, which is how a gate that keeps no state of its own knows.

The step itself is the request's proposal: contract_id and arguments. Its time is premises.time_ms.

An authorization:

{
  "schema": "agentic_datacenter.action_authorization/1",
  "principal": "agent-1",
  "contract_id": "pod.set_supply_air_setpoint.v1",
  "arguments": {"pod": "15", "setpoint_c": 21.0},
  "signer": "shift-lead",
  "issued_at_ms": 1000,
  "expires_at_ms": 10000,
  "reason": "WO-601",
  "id": "sha256:…",
  "signature": {"alg": "Ed25519", "key_id": "sha256:…", "value": "…"}
}

The body is every field but id and signature. Its canonical form is JSON with keys sorted at every level, no whitespace, UTF-8 with characters outside ASCII as they are, and each number as RFC 8785 writes it, which is how JavaScript writes it: a number with no fraction as an integer (21.0 as 21), others in their shortest form (20.5). A step's arguments never need an exponent. What JavaScript and Python would write or sort otherwise is refused, so the two never sign different bytes: a number that would need an exponent (below 1e-4, or from 1e21), an integer beyond 2⁵³ − 1, and a key with a character outside the Basic Multilingual Plane. Both the Python rule and the Node starter pass the same test vectors. id is sha256: and the hexadecimal SHA-256 of the canonical form; the signature is Ed25519 over the canonical form, base64; key_id is sha256: and the hexadecimal SHA-256 of the raw 32-byte public key.

The rule

An authorization holds for a step at time now when all of these are true:

  1. It is signed as it reads. schema is agentic_datacenter.action_authorization/1, id is the content address of its body, its signer is in signers, signature.key_id is that signer's, and the signature verifies under that signer's key.
  2. It is for this step. principal, contract_id and arguments are the step's, and the arguments are the same in canonical form: no value other, none more and none fewer.
  3. It is in time. issued_at_ms ≤ now < expires_at_ms.
  4. It has not been used. Its id is not in used.

The step is authorized when one authorization presented holds. Anything else neither gives nor takes away: an authorization that does not hold is ignored, and several that do not hold add up to nothing.

When the step is carried out, or may have been (a write that went unanswered), the site records the authorization as used, and it never holds again. A step that waits for a person is checked again when it is carried out: an authorization that expired in the meantime, or was spent on another step, no longer lets it run.

Why not

A gate that refuses can say why in a word, and the decision record keeps the site's own (action_detail). Of the authorizations that read as for this step (rule 2, whether signed or not), the reason of the one that came nearest:

Reason What it means
not_signed Its id is not its content address, its signature does not verify, or it names another key. Changed after it was signed, or signed by someone else in the signer's name.
no_standing Signed by someone the site does not list.
not_yet Issued after now.
expired now is at or after expires_at_ms.
used A step was carried out under it before.
other_action Nothing presented reads as for this step: for other values, another contract or another agent.
none_presented Nothing was presented at all.

A gate gives its reason in reason_details as {"authority": "action_not_authorized"}, with authority among its reason_codes.

How a run is judged

By the site's own check, never by the gate's. A step with no authorization that holds is a step without authority: executed_without_authority counts it if it runs. The premise action_authorized(<principal>, <contract>) says the answer to every gate except one that checks the signatures itself, which is sent the authorizations and the keys alone. A gate that checks signed exact steps and not mandates starts with ADC_GATE_VERIFIES_ACTIONS=1, and is still told the mandate's premise; one started with ADC_GATE_VERIFIES_MANDATES=1 checks both itself (ADR 0050).

The test keys

The signers' keys are test keys, derived from the name: the Ed25519 seed is SHA-256 of agentic-datacenter action signer test key/1, a zero byte and the name in UTF-8. They are public by construction and never credentials. A forgery of the kind wrong_key is signed with the key of the name followed by a zero byte and forged.