<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc [ <!ENTITY nbsp "&#160;"> ]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt"?>
<?rfc toc="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" docName="draft-das-preaction-authz-00" category="info" submissionType="independent" ipr="trust200902" version="3" xml:lang="en" tocInclude="true" symRefs="true" sortRefs="true">
<front>
<title abbrev="A Framework for Pre-Action Capability A">A Framework for Pre-Action Capability Authorization: One-Time Capability Tokens Released by a Protected Enforcement Point</title>
<seriesInfo name="Internet-Draft" value="draft-das-preaction-authz-00"/>
<author fullname="Sangam Kumar Das" initials="S. K." surname="Das">
<organization>Independent</organization>
<address><postal><city>Balasore</city><region>Odisha</region><country>India</country></postal>
<phone>+91-9861363532</phone><email>info@sangamdas.com</email></address>
</author>
<date year="2026" month="December" day="2"/>
<workgroup>Independent Submission</workgroup>
<keyword>pre-action authorization</keyword>
<keyword>one-time capability token</keyword>
<keyword>single-use token</keyword>
<keyword>enforcement point</keyword>
<keyword>policy enforcement point</keyword>
<keyword>policy decision point</keyword>
<keyword>atomic consume</keyword>
<keyword>compare-and-swap</keyword>
<abstract>
<t>Authentication tells a system who is asking, and permission checks tell it what a role may generally do. Neither decides, at the moment an action would take effect, whether this specific action may happen now. For AI agents, telephony, mobile networks, satellites and payments, that gap matters because a wrong action cannot always be undone. This document describes a framework in which a candidate action has no effect until a protected enforcement point validates a set of predicates (identity scope, purpose, time window, freshness, quota, key binding and revocation state), atomically consumes the authorization state, and releases a one-time capability token to the component that causes the effect. It then lists eight companion profiles and states how each can be built with current technology (CWT/JWT, COSE, RATS attestation, TEEs and HSMs, strongly consistent state stores). The document is informational and does not claim that no similar mechanism exists.</t>
<t>Related patent application. This document is based on international application PCT/IB2026/054453 (publication WO 2026/150381 A2), which was published at WIPO PATENTSCOPE on 16 July 2026. Full text: <eref target="https://patentscope.wipo.int/search/en/detail.jsf?docId=WO2026150381"/> (also at <eref target="https://patents.google.com/patent/WO2026150381A2/en"/>). The application is a pending application only; nothing in this document states or implies that any patent has been granted. Check current status only on official registers (WIPO PATENTSCOPE and national patent offices).</t>
</abstract>
</front>
<middle>
<section><name>Introduction</name>
<t>Deployed security controls usually answer one of two questions. The first is authentication: which party is this? The second is permission: what is this party's role generally allowed to do? A third question is often left to application logic or to nothing at all: should this particular action, with these parameters, take effect now?</t>
<t>The third question matters most when the actor is automated (an AI agent or a network function driven by a learned model), when the effect is hard to reverse (a call that rings a phone, a command that changes a radio configuration, a payment, a satellite link change), or when the actor may be compromised after its credentials were issued.</t>
<t>This document describes a framework for answering the third question at the point where an action becomes effective. It is a design framework. It is not a protocol specification, and it does not claim that every element is new. Several elements are already used in other systems, and Section 7 lists them.</t>
</section>
<section><name>Terminology</name>
<ul><li>Candidate action: a requested operation that has been produced but has no effect yet.</li><li>Requester: the party or software producing a candidate action. It may be an AI agent.</li><li>Authorization issuer: a protected component that decides whether to issue an authorization for a class of actions.</li><li>Enforcement point (EP): a protected component placed on the path before the effect. It validates predicates and consumes authorization state.</li><li>Effect sink: the component that performs the effect (a gateway, a RAN function, a payment processor, an actuator). It only acts on a valid one-time capability token.</li><li>Capability token: a signed, short-lived, single-use token released by the EP to the effect sink for exactly one candidate action.</li><li>Receipt: a signed record that the EP released or refused a capability.</li><li>Protected domain: an execution environment whose code and keys the requester cannot alter, such as a hardware security module (HSM) or a confidential-computing TEE with remote attestation.</li></ul>
</section>
<section><name>Architecture</name>
<artwork><![CDATA[
 Requester --(candidate action + credential)--> Enforcement Point
                                       | validate predicates
                                       | atomically consume state
                                       v
          Effect Sink <--(one-time capability token)--
              |
              +--(effect)--> world
 Enforcement Point --(signed receipt)--> audit / transparency log
]]></artwork>
<t>The requester never talks to the effect sink with an authority of its own. The effect sink refuses any action that does not carry a capability token released for that action.</t>
<section><name>Predicates</name>
<t>The EP evaluates, at minimum, these predicates. A profile may add more.</t>
<ul><li>Identity scope: the requester's key or workload identity is within the scope of the authorization.</li><li>Purpose: the declared purpose matches the authorized purpose.</li><li>Time window: the action falls inside a validity interval.</li><li>Freshness: a nonce or counter shows the request is not a replay.</li><li>Quota: remaining uses are greater than zero.</li><li>Binding: the action's parameters match those bound into the authorization.</li><li>Revocation state: neither the authorization nor anything it derives from has been revoked.</li></ul>
</section>
<section><name>Atomic consumption</name>
<t>The decrement of the quota and the release of the capability token happen as one atomic step. Two concurrent requests for the last remaining use must not both succeed.</t>
</section>
<section><name>Uniform denial</name>
<t>Where policy allows, a refusal is returned in a form that does not reveal which predicate failed. This reduces probing by an attacker. It can conflict with transparency obligations, and profiles must say where.</t>
</section>
</section>
<section><name>Data model</name>
<t>A capability token can be carried as a CBOR Web Token (RFC 8392) signed with COSE (RFC 9052), or as a JWT (RFC 7519). An illustrative JSON form follows.</t>
<artwork><![CDATA[
{
  "iss": "https://issuer.example",
  "aud": "ep-17",
  "jti": "b3e1c0d2-...",
  "nbf": 1790000000, "exp": 1790000030,
  "cnf": { "jkt": "<requester key thumbprint>" },
  "purpose": "outbound-call",
  "bound_params_hash": "<sha-256 of action parameters>",
  "quota_remaining": 1,
  "state_version": 42
}
]]></artwork>
<t>The "cnf" claim carries proof-of-possession binding as in RFC 7800. The "state_version" claim ties the token to a version of the authorization state so that advancing that version retires earlier tokens.</t>
</section>
<section><name>Implementation with current technology</name>
<t>A deployment can be built from existing components. This is a feasibility statement. It does not say that any vendor ships the combination.</t>
<ul><li>Enforcement point as a service: run it inside a confidential VM or enclave (for example Intel TDX, AMD SEV-SNP, Arm CCA or AWS Nitro Enclaves) or behind an HSM that holds the signing key (PKCS#11, FIPS 140-3 validated modules).</li><li>Attestation: the effect sink or relying party verifies the EP using the RATS architecture (RFC 9334) with Entity Attestation Tokens (RFC 9711). Open-source verifier services exist.</li><li>Atomic consumption: use a strongly consistent store (a Raft-based key-value store, or a database using serializable transactions) so that compare-and-decrement is one operation. A single-writer HSM counter is an alternative where throughput is low.</li><li>Token transport: JWT or CWT carried in an existing header or message extension of the protocol in use (HTTP, SIP, gRPC, a 3GPP service-based interface).</li><li>Revocation: a token status list or a continuous-access-evaluation event feed (for example OpenID Shared Signals) pushes state changes to enforcement points.</li><li>Policy evaluation: express predicates in an existing policy language (Open Policy Agent Rego or Cedar) so that policy is auditable.</li><li>Receipts: write signed receipts to an append-only log built on a Merkle tree (as in Certificate Transparency, RFC 9162) so that a third party can check inclusion.</li></ul>
</section>
<section><name>Companion profiles</name>
<t>Each profile fixes the effect sink, the carrier protocol and the predicates for one domain. The companion documents are:</t>
<ul><li>Pre-alert reachability for telephony and messaging.</li><li>Multi-dimension admissibility evidence as a RATS extension.</li><li>Per-action authorization for AI-agent calls to operator network APIs.</li><li>Accelerator execution evidence for AI-generated RAN control commands.</li><li>Pre-authorized actions in the URLLC user plane.</li><li>Lifecycle of capability tokens: attested issuance, cascade revocation and migration.</li><li>Decision receipts for platform-neutral authorization.</li><li>Depth and fan-out limits for machine-to-machine cascades.</li></ul>
<t>Domains outside the IETF's scope (satellite networks, ambient IoT, reconfigurable surfaces, paging, energy budgeting, digital twins) are covered in separate contribution papers addressed to 3GPP, ETSI, SDA and ESA.</t>
</section>
<section><name>Relationship to existing work</name>
<ul><li>Authentication and identity: SPIFFE, WIMSE and OAuth drafts address agent identity and delegation. They protect tokens presented to a resource server. This framework adds a protected enforcement point that consumes the authorization on use.</li><li>Transaction-bound tokens: draft-coetzee-oauth-spt-txn-tokens describes short-lived tokens bound to one declared action with receipts and status-list revocation. It overlaps with several properties above, and a reader should compare the two.</li><li>Policy engines: Microsoft's Agent Governance Toolkit and policy engines such as OPA evaluate conditions before an agent action. They do not, in the sources reviewed, release a hardware-bound token to a downstream effect sink.</li><li>Attestation: RATS appraises evidence about an environment and returns a result. It does not define a per-action consumable token.</li></ul>
</section>
<section><name>Open issues</name>
<ul><li>Latency. Per-action validation adds a round trip. No measurement is offered here for any domain; each profile must state its budget.</li><li>Availability. An EP outage must fail closed for high-risk actions, which has operational cost.</li><li>Single point of failure and trust. The protected domain becomes critical. Multiple EPs with quorum release are an option that adds complexity.</li><li>Uniform denial versus transparency duties, such as regulatory notification of blocking.</li><li>Interoperability across administrative domains.</li></ul>
</section>
<section><name>Worked example: an AI agent restarts a production service</name>
<t>This example shows every step in one concrete case. All names, hosts and values are invented for illustration.</t>
<section><name>The situation</name>
<t>An operations agent (an AI system) has produced a plan. One step is to restart the service "svc-billing" in the production cluster. A restart has an effect: payments pause for a short time. The operator wants three things: only an agent with the right scope may do it, it may happen only inside a maintenance window, and a given approval may be used for one restart only.</t>
</section>
<section><name>Step by step</name>
<ul><li>1. Grant. A human operator, or a policy engine acting for the operator, creates a grant: agent "ops-agent-17", action type "restart", target "svc-billing", window 02:00 to 03:00 on one date, quota 1. The grant is written to the state store with state version 42.</li><li>2. Candidate action. The agent builds the candidate action as a JSON object, canonicalizes it and hashes it. The action has no effect yet.</li><li>3. Request. The agent sends the action to the EP over a mutually authenticated channel, with a proof of possession of its key.</li><li>4. Evaluate. The EP checks identity scope, purpose, time window, freshness of the agent's own attestation, quota, parameter binding and revocation. It evaluates every predicate.</li><li>5. Consume. The EP performs the atomic consume on the grant. Quota goes from 1 to 0.</li><li>6. Release. The EP signs a capability token that names the sink, the action hash, a 30 second lifetime and state version 42.</li><li>7. Present. The agent sends the token and the action to the sink (the cluster control API).</li><li>8. Verify and apply. The sink checks signature, audience, lifetime, key binding, action hash and the replay table. It records the token identifier, applies the restart and records the outcome.</li><li>9. Receipt. The EP and the sink each write a signed receipt. An auditor can later show that one restart happened and that it matches one grant.</li></ul>
<t>If the agent asks again, the quota is 0, the EP refuses and the response is the same as for any other refusal.</t>
</section>
<section><name>HTTP shape</name>
<t>The names below are illustrative.</t>
<artwork><![CDATA[
POST /ep/v1/release HTTP/1.1
Host: ep.ops.example
Authorization: DPoP <access token>
DPoP: <proof bound to this request>
Content-Type: application/json

{ "action": { "type": "restart",
              "target": "svc-billing" },
  "idempotency_key": "7f3c0b6e-..." }
]]></artwork>
<t>A release returns 200 with a body such as `{ "capability": "&lt;CWT, base64url&gt;" }`. Every refusal returns the same 403 with `{ "error": "denied" }`.</t>
<t>The agent then calls the sink:</t>
<artwork><![CDATA[
POST /v1/restart HTTP/1.1
Host: cluster-api.ops.example
Capability: <CWT, base64url>
Content-Type: application/json

{ "type": "restart", "target": "svc-billing" }
]]></artwork>
<t>The sink recomputes the hash of the body and compares it with "params-hash" in the token. A different body fails the check.</t>
</section>
</section>
<section><name>Policy examples</name>
<t>Predicates should be written in a language that can be reviewed and tested. Two sketches follow. They show shape and are not tested policy.</t>
<t>A Rego-style sketch:</t>
<artwork><![CDATA[
package ep.decision

default allow = false

allow if {
    input.grant.agent == input.ctx.agent
    input.grant.action == input.action.type
    input.grant.target == input.action.target
    input.now >= input.grant.not_before
    input.now <  input.grant.not_after
    input.attest.age_seconds <= input.grant.max_attest_age
    not revoked(input.grant.id)
}
]]></artwork>
<t>A Cedar-style sketch:</t>
<artwork><![CDATA[
permit(
  principal == Agent::"ops-agent-17",
  action    == Action::"restart",
  resource  == Service::"svc-billing"
) when {
  context.now >= context.grant_start &&
  context.now <  context.grant_end   &&
  context.quota > 0
};
]]></artwork>
<t>Quota and state version are checked by the atomic consume, not by the policy language. A policy language reads state. It must not be the place where state changes.</t>
</section>
<section><name>Implementation recipes by environment</name>
<section><name>Recipe 1: Kubernetes and a service mesh</name>
<ul><li>Run the EP as a deployment in its own namespace with its own service account and network policy. Allow the sink namespace to call it and nothing else.</li><li>Use SPIFFE identities (for example from SPIRE) for the requester, the EP and the sink. Mutual TLS carries the identity.</li><li>Put the sink check in an Envoy external authorization filter, or in a sidecar, so that the application does not need changes. The filter extracts the token, verifies it and rejects before the request reaches the application.</li><li>Store grants in a Raft-based key-value store or a serializable SQL database. Do not use an in-memory cache as the authority.</li><li>Keep the signing key in a cloud KMS or HSM, and allow only the EP identity to call the signing operation.</li></ul>
</section>
<section><name>Recipe 2: cloud API gateway</name>
<ul><li>Put the check in the gateway's custom authorizer or plugin. The authorizer calls the EP, receives the token and attaches it to the upstream request.</li><li>The upstream service verifies the token with a library. Do not rely only on the gateway, because a second route to the service would bypass it. Restrict the upstream so that it accepts traffic only from the gateway or with a valid token.</li><li>Use the provider's conditional write feature for the consume (see the storage variants).</li></ul>
</section>
<section><name>Recipe 3: on-premises appliance or private network</name>
<ul><li>Run the EP on a hardened host with an HSM (PKCS#11). Use a TPM 2.0 for platform measurements.</li><li>Use a Raft cluster of three or five nodes for the state store inside the same site.</li><li>Publish the receipt log checkpoint to a second site or to an external write-once store.</li></ul>
</section>
<section><name>Recipe 4: telecom network function</name>
<ul><li>Place the EP as a function on a service-based interface, or inside an existing function such as a policy or exposure function. Use the carrier's existing token mechanism (OAuth 2.0 on the service-based architecture) for the requester identity. Add the capability token as an additional credential for the effect.</li><li>Keep the EP inside the operator's trusted zone. Use the operator's HSM and attestation practice.</li><li>Document the effect sink (a gateway, a RAN function, a charging system) and its failure behaviour.</li></ul>
</section>
<section><name>Recipe 5: edge or constrained sink</name>
<ul><li>Where the sink cannot verify asymmetric signatures at the required rate, use a message authentication code with a key shared between the EP and the sink only. The token is then valid only for that sink, and revocation is by key rotation.</li><li>Where the sink cannot keep a replay table, use a monotonic counter in the token and have the sink remember the highest counter it has accepted.</li></ul>
</section>
</section>
<section><name>Variations of the mechanism</name>
<section><name>Predicate variations</name>
<ul><li>Identity scope: by user, by agent, by workload identity (SPIFFE), by device certificate. Choose the identity that the requester cannot change.</li><li>Purpose: a fixed list of action types, or a typed schema with ranges for parameters. A fixed list is easier to review. A schema is more flexible.</li><li>Time window: absolute interval, relative lifetime from issue, or a recurring window (maintenance hours). Use absolute intervals for safety-critical actions.</li><li>Freshness: how old the requester's attestation or the evidence may be. Use a nonce when the evidence must be fresh for this request. Use a timestamp or an epoch identifier when approximate freshness is enough (RFC 9334 describes these models).</li><li>Quota: one use, N uses, or N uses per interval. N uses per interval needs a counter that resets, and the reset must be inside the same atomic operation.</li><li>Binding: to the exact action hash, to the action type only, or to a parameter range. Exact binding is the strongest. A range is easier for agents that adjust parameters.</li><li>Revocation: pull (the EP reads state on each request), push (an event feed to the sinks) or by short lifetime only.</li></ul>
</section>
<section><name>Token variations</name>
<ul><li>Self-contained signed token (CWT or JWT): verifiable by the sink without a call. Revocation needs a feed or a short lifetime.</li><li>Reference token: an opaque identifier that the sink resolves with the EP (token introspection, RFC 7662). Revocation is immediate. It costs a call per request.</li><li>Message authentication code token: smallest and fastest. Valid only between parties that share a key.</li></ul>
</section>
<section><name>Placement variations</name>
<t>See the deployment variations V1 to V5 in the common core. As a rule, use V4 for irreversible or high-value actions and V2 or V3 for reversible, high-volume actions.</t>
</section>
</section>
<section><name>Migrating from existing authorization</name>
<t>Most systems already have OAuth scopes, API keys or role-based access control. The mechanism can be added without removing them.</t>
<ul><li>Phase 1: keep the existing checks. Add the EP in shadow mode and log the decisions it would make.</li><li>Phase 2: for one high-value action type, make the sink require a token. Leave all other action types unchanged.</li><li>Phase 3: move more action types behind tokens as the shadow logs show few false denials.</li><li>Phase 4: remove standing broad permissions that the token now makes unnecessary. This is the step that gives the security benefit. Until it is done, a stolen standing credential still works.</li></ul>
<t>A common error is to add tokens and leave the standing credential in place. The token then adds audit but not protection.</t>
</section>
<section><name>Privacy and retention</name>
<ul><li>Receipts contain action hashes, identities and times. Treat them as personal data where identities are persons. Set a retention period and a deletion rule.</li><li>Keep the action itself out of the receipt where it contains personal data. Store the hash and keep the action in a system with its own access control.</li><li>Limit who can read the internal refusal reasons. These show which predicates failed and can help an attacker.</li><li>Where the log is public or shared with a third party, publish only checkpoints and inclusion proofs, not receipt contents.</li></ul>
</section>
<section><name>Degradation and failure modes</name>
<artwork><![CDATA[
Failure                  Safe default        Note
-----------------------  ------------------  -------------------
EP unreachable           deny the action     or fail open where
                                             denial is dangerous;
                                             record it
State store down         deny                never issue from
                                             cache
Key service down         deny                cannot sign tokens
EP attestation stale     sink refuses        re-attest, resume
Receipt log down         queue, retry        do not block; alarm
Clock source untrusted   deny                all windows void
Policy bundle expired    use last valid      a stated grace
                         until expiry,       period
                         then deny
]]></artwork>
</section>
<section><name>Engineering questions and answers</name>
<t>Q: Does the EP add a network hop for every action? A: Yes, for actions that need a token. Use the mechanism only for actions where the added step is worth it. Pre-issued windows (see the real-time profile in this series) remove the per-act hop for fast paths.</t>
<t>Q: Can one EP serve many sinks? A: Yes. The token names its sink in "aud". Use one signing key per sink class if the sinks do not trust each other.</t>
<t>Q: What if the agent is compromised? A: The agent can still ask for tokens within its grants. The mechanism limits what a compromised agent can do to the scope, window and quota of its grants. It does not make a wrong grant safe.</t>
<t>Q: What if the EP is compromised? A: It can sign any token. This is why the EP runs in a protected domain, is attested, and why a federated deployment (V5) exists for cases where no single EP should be trusted.</t>
<t>Q: Is this a replacement for OAuth? A: No. OAuth identifies the requester and carries scopes. The mechanism adds a per-action, single-use step before the effect.</t>
</section>
<section><name>Implementation checklist</name>
<ul><li>The effect has one choke point, and the sink refuses without a valid token.</li><li>The canonical action form and hash are specified and tested across languages.</li><li>Policy is data, versioned, signed and reviewed.</li><li>Consume is atomic and its failure behaviour on store failover is known.</li><li>The signing key is not exportable.</li><li>The sink keeps a replay table.</li><li>Denials are uniform.</li><li>Receipts are signed and the log checkpoint is published outside the operator's sole control.</li><li>Shadow mode has run, and the fail-closed or fail-open choice is documented per class.</li><li>Break-glass is authorized and logged.</li></ul>
</section>
<section><name>Lab recipe: build and test the mechanism in a day</name>
<t>This recipe lets an engineer see the whole mechanism work with free tools. It uses the reference sketches in this document as a starting point. Nothing here is a product claim.</t>
<ul><li>Step 1, run the sketch. Copy the enforcement point and sink sketch and its tests. Run the tests. All of them should pass. Read the quota race test: thirty threads, one grant with quota one, exactly one token.</li><li>Step 2, replace the store. Create a PostgreSQL database with the "grants" table. Replace the consume statement with the single UPDATE ... RETURNING form from the storage variants. Run the race test again from several processes, not threads.</li><li>Step 3, put the sink behind a gateway. Run an Envoy proxy in front of a small HTTP service that performs the "effect" (for example appends a line to a file). Configure Envoy's external authorization filter to call a small verification service. The filter sends request headers to that service. A non-success reply makes Envoy refuse the request. The verification service checks the capability token and the body hash.</li><li>Step 4, move policy out of code. Run Open Policy Agent as a sidecar. Write the predicates in Rego. Have the EP call OPA's HTTP API with the context as input and read the decision. Keep consume out of OPA.</li><li>Step 5, add a receipt log. Start with a hash chain in a table and a signed checkpoint file every hundred rows. Later, try a Merkle log service such as an open-source transparency log, and compare the work needed.</li><li>Step 6, run the bypass test. From a second container, call the effect service directly. Make the network policy refuse it. This test is the one most often skipped.</li><li>Step 7, shadow mode. Replay a day of real or synthetic requests through the EP without blocking. Compare decisions with what happened.</li></ul>
</section>
<section><name>Test vector for canonical action hashing</name>
<t>Canonicalization differences are the most common cause of two implementations disagreeing. An engineer can check an implementation against this vector. The action is:</t>
<artwork><![CDATA[
{"type":"restart","target":"svc-billing"}
]]></artwork>
<t>With keys sorted and no spaces (as in RFC 8785 for this simple case), the canonical bytes are:</t>
<artwork><![CDATA[
{"target":"svc-billing","type":"restart"}
]]></artwork>
<t>The SHA-256 of those bytes, in hex, is:</t>
<artwork><![CDATA[
f40624664727e35a5bd8e508b7af1d987a82ea666ae5ce47f990e0cadb7eb257
]]></artwork>
<t>Check that your implementation gives this value. Then test numbers, nested objects, non-ASCII text and escaped characters against a complete JSON canonicalization library. The vector above does not cover those cases.</t>
</section>
<section><name>Frequently asked engineering questions (continued)</name>
<t>Q: How long should a token live? A: Long enough for the requester to present it once under normal network delay, and short enough that a stolen token has little time. Seconds to a minute is the usual range for interactive actions. Decide by measuring presentation delay at the 99th percentile in your environment.</t>
<t>Q: Should the token be self-contained or a reference? A: Self-contained for scale and offline sinks. Reference if immediate revocation matters more than the extra call. A short lifetime narrows the difference.</t>
<t>Q: Where does the idempotency key come from? A: From the requester, inside the canonical action, so that it is covered by the hash. The EP must not invent it.</t>
<t>Q: What if two EPs run for availability? A: They must share one consume store with linearizable writes, or each must own a disjoint set of grants. Two EPs with separate stores and the same grant will both release.</t>
<t>Q: How do I show an auditor that a given effect was authorized? A: Join three records: the grant (who allowed what), the release receipt (the EP decision with the action hash) and the sink receipt (the effect with the token identifier). All three carry the action hash.</t>
<t>Q: What do I do about actions that must always be allowed, such as moves toward a safe state? A: Do not route them through the EP. Define the always-allowed class in advance, review it carefully, and keep it as small as possible.</t>
</section>
<section><name>Engineer's reference implementation: common core</name>
<t>This section is repeated in each document of the series so that an engineer can build from one document without reading the others. It describes one concrete way to build an enforcement point (EP) and its surrounding parts. Names of products are examples of existing technology. Message layouts and code are illustrative sketches written for this document. They are not tested reference code, and no performance figure is claimed anywhere in this document.</t>
<section><name>Build order</name>
<t>An engineer can build the mechanism in this order. Each step can be tested alone before the next one starts.</t>
<ul><li>Step 1. Write down the effect. Name the one operation whose effect must not happen without authorization (place a call, change a configuration, move a robot arm, release a model output). Everything else in this document protects that one operation.</li><li>Step 2. Find the choke point. Locate the single place every route to the effect passes through. If there are two routes, there will be a bypass. Put the effect sink behind that point and make the sink refuse anything that does not carry a valid capability token.</li><li>Step 3. Define the canonical candidate action. Choose a canonical byte form for the request (for example RFC 8785 JSON canonicalization, or deterministic CBOR from RFC 8949 section 4.2). Hash it with SHA-256. The hash is what the token is bound to.</li><li>Step 4. Define the policy as data. List the predicates (who, what, when, how many, in which state). Store them in a policy language such as Open Policy Agent Rego or Cedar, and record the digest of the policy bundle that was used.</li><li>Step 5. Build the state store with an atomic consume operation (see the storage variants below).</li><li>Step 6. Build the token signer. Keep the signing key in an HSM, a cloud key management service or a confidential VM. Sign CBOR Web Tokens (RFC 8392) with COSE (RFC 9052), or JWTs (RFC 7519) with JWS.</li><li>Step 7. Build the verifier at the sink. It checks signature, audience, validity interval, action hash, proof of possession and single use, then applies the effect.</li><li>Step 8. Build the receipt log. Sign every release and refusal and append it to a log that cannot be edited silently.</li><li>Step 9. Run in shadow mode. Compute decisions but do not block. Compare with what actually happened.</li><li>Step 10. Enforce, one action class at a time, with a documented fail-closed or fail-open choice for each class.</li></ul>
</section>
<section><name>Component view</name>
<artwork><![CDATA[
 requester --> [ EP ] --> token --> [ effect sink ] --> effect
                 |  \                    |
                 |   +--> receipt log    +--> replay table (jti)
                 v
           state store (atomic consume)
                 ^
           policy bundle (signed, versioned)
 [ EP key in HSM/TEE ]  <-- attested by verifier (RFC 9334)
]]></artwork>
<t>The EP is the only component that can mint a token. The sink is the only component that can cause the effect. The state store is the only place where quota changes. Keep these three roles in separate failure domains if the risk justifies it.</t>
</section>
<section><name>Token and receipt formats</name>
<t>An illustrative token claim set in CDDL (RFC 8610) follows. The names are not registered. A deployment can map them to registered claims where they exist.</t>
<artwork><![CDATA[
capability-token = {
  "iss": tstr,
  "aud": tstr,                    ; the sink
  "jti": bstr .size 16,           ; single-use identifier
  "nbf": uint,
  "exp": uint,                    ; seconds, short lifetime
  "cnf": { "kid": bstr },         ; proof of possession (RFC 7800)
  "purpose": tstr,
  "params-hash": bstr .size 32,   ; hash of canonical action
  "state-version": uint,
  ? "profile": tstr
}

receipt = {
  "id": bstr .size 16,
  "decision": "released" / "refused",
  "ep": tstr,
  "ts": uint,
  "req-digest": bstr .size 32,
  "policy-digest": bstr .size 32,
  "state-version": uint,
  ? "token-jti": bstr .size 16,
  ? "internal-reason": tstr       ; never sent to the requester
}
]]></artwork>
<t>The "internal-reason" field is for operators and auditors. The response to the requester must carry no reason, as described under uniform denial.</t>
</section>
<section><name>Enforcement point algorithm</name>
<artwork><![CDATA[
def decide(req):
    ctx = authenticate(req)               # who is asking
    if ctx is None:
        return deny()
    cand = canonicalize(req.action)
    h = sha256(cand)
    pol = policy.load(ctx.tenant)         # signed bundle
    now = trusted_time()
    ok = True
    reasons = []
    for p in pol.predicates:       # evaluate all, no early exit
        r = p.check(ctx, cand, now)
        ok = ok and r.ok
        reasons.append(r)
    if not ok:
        log_internal(req, reasons)
        return deny()
    if not store.consume(ctx.grant, 1, pol.version):
        return deny()
    tok = sign(make_token(ctx, h, pol.version))
    log_receipt("released", tok.jti, h)
    return tok
]]></artwork>
<t>Notes for the engineer:</t>
<ul><li>Evaluate every predicate even after one fails. This reduces the difference in response time between denial reasons. It does not make timing identical. If the threat model includes timing probes, add a small randomized delay and measure the residual difference.</li><li>Take time from a trusted source. If the EP clock can be set by the requester, every time window is void. In a TEE use a time source the host cannot rewind, or compare with an attested time service.</li><li>Consume only after all predicates pass. Consuming first and failing later leaks quota. If a later step fails after consume, return the unit with a compensating write and log it.</li></ul>
</section>
<section><name>Atomic consume: storage variants</name>
<t>The consume operation must be one indivisible step: check the quota and the state version, and decrement. Five common ways to build it follow. Pick by consistency need, not by habit.</t>
<t>Variant A: Redis with a Lua script.</t>
<artwork><![CDATA[
-- KEYS[1] = grant key, ARGV[1] = expected version
local v = redis.call('HGET', KEYS[1], 'ver')
local q = tonumber(redis.call('HGET', KEYS[1], 'quota'))
if v ~= ARGV[1] or q < 1 then return 0 end
redis.call('HINCRBY', KEYS[1], 'quota', -1)
return 1
]]></artwork>
<t>The script runs atomically on one Redis node. Redis replication is asynchronous by default, so a failover can lose the last writes and allow a second use. Use this only where a rare double use is tolerable, or add replica acknowledgement (the WAIT command) and accept the latency.</t>
<t>Variant B: relational database, single statement.</t>
<artwork><![CDATA[
UPDATE grants
   SET quota = quota - 1
 WHERE grant_id = $1 AND ver = $2
   AND quota > 0 AND not_after > now()
RETURNING quota;
]]></artwork>
<t>A returned row means the unit was consumed. Zero rows means deny. A single UPDATE takes a row lock, so concurrent callers are serialized. Use a synchronous replica or a consensus-based distributed SQL database if loss on failover is not acceptable.</t>
<t>Variant C: DynamoDB conditional update.</t>
<artwork><![CDATA[
UpdateItem Key={grant_id}
  UpdateExpression:   SET quota = quota - :one
  ConditionExpression: ver = :v AND quota >= :one
]]></artwork>
<t>A failed condition means deny. Keep the authority in one region. Multi-region replication of such tables is eventually consistent, and two regions could each consume the same unit.</t>
<t>Variant D: etcd or another Raft key-value store, compare-and-swap transaction.</t>
<artwork><![CDATA[
txn:
  if   value(grant/ver) == V and value(grant/quota) > 0
  then put(grant/quota, quota-1)
  else fail
]]></artwork>
<t>This gives linearizable consume at the cost of write latency on every release. It suits low to medium rates and high-value actions.</t>
<t>Variant E: hardware counter. A TPM 2.0 non-volatile counter or an HSM counter can hold a monotonic count. Hardware counters have limited write endurance and low rates. Use them for high-value, low-rate grants or as an anchor for a periodic checkpoint of a faster store.</t>
<t>At the sink, add a replay table keyed by jti and keep entries until the token expires. This catches a token presented twice even if the EP store had a fault.</t>
</section>
<section><name>Keys and attestation</name>
<ul><li>Signing key: generate inside an HSM or cloud KMS, or inside a confidential VM with a sealed key. Prefer a key that cannot be exported. Restrict the signing operation to the EP identity.</li><li>Verification key distribution: publish the EP public key through a JWKS or a COSE key set, signed by the issuer. Pin it at the sink.</li><li>Attestation: the sink (or a third party) verifies that the EP runs the expected code in the expected protected environment, using a RATS verifier (RFC 9334) and attestation results carried as Entity Attestation Tokens (RFC 9711). Cache the result for a short, stated time. Re-verify after any restart.</li><li>Rotation: overlap two keys for one token lifetime. Revoke by publishing a new key set and a higher state version.</li><li>Proof of possession: bind the token to the requester key (RFC 7800 "cnf", or DPoP, RFC 9449, for HTTP). A stolen token without the key is then useless.</li></ul>
</section>
<section><name>Uniform denial and error handling</name>
<t>Return one response for every refusal: the same status, body shape and, as far as practical, timing. Put the reason only in the internal log. Do not return which predicate failed, whether a grant exists, or how much quota remains. Rate-limit refusals per requester so that an attacker cannot use the EP as an oracle.</t>
</section>
<section><name>Unknown outcome and idempotency</name>
<t>A request can time out after the sink applied the effect. The requester then does not know whether to retry. Handle it this way:</t>
<ul><li>Carry an idempotency key chosen by the requester inside the canonical action. Two requests with the same key and the same action hash are the same candidate action.</li><li>Let the EP map (idempotency key, action hash) to the token it already released. A repeat request within the token lifetime returns the same token without a second consume.</li><li>Let the sink record the jti before the effect, and the outcome after it. A second presentation returns the recorded outcome, not a second effect.</li><li>If the sink cannot tell whether the effect happened, it reports "unknown" to the operator. Do not guess. A manual reconciliation step is part of the design.</li></ul>
</section>
<section><name>Receipt log</name>
<t>Every release and every refusal is a signed receipt. Options for the log, from simplest to strongest:</t>
<ul><li>Option 1: an append-only table with a hash chain (each row contains the hash of the previous row) and a signed checkpoint every N rows.</li><li>Option 2: a Merkle-tree log in the style of Certificate Transparency (RFC 9162), run as a service, so that a third party can obtain an inclusion proof and a consistency proof.</li><li>Option 3: a transparency service in the style of the IETF SCITT architecture, with signed statements and receipts that carry Merkle tree proofs.</li></ul>
<t>Whatever the option, publish the checkpoint to a place the operator cannot rewrite alone (a second organization, a public log, or a write-once store). Without that, the log shows what the operator chose to keep.</t>
</section>
<section><name>Deployment variations</name>
<t>The same mechanism can be placed in five ways. Choose by where the choke point is.</t>
<ul><li>V1, library in the application. Lowest latency. Weakest separation, because the requester process holds the library. Suitable only when the requester is trusted and the goal is accident prevention, not attack resistance.</li><li>V2, sidecar next to the requester or the sink. Good for service meshes. A compromised application cannot change the sidecar's key if the sidecar runs in a separate protection domain.</li><li>V3, gateway or external authorization filter. Examples are an API gateway plugin, an Envoy external authorization filter, a SIP proxy script, an SBC hook or a 3GPP network function. One place to apply policy for many services. It becomes a high-value target and a single point of failure.</li><li>V4, hardware-backed service. The EP runs in a confidential VM, an enclave or an HSM-backed service. Highest assurance and highest operational cost. Use it for high-value actions.</li><li>V5, federated. Two or more domains each run an EP, and a token is valid only if each EP in the chain signed it. Use it when no single party should decide. It adds latency and needs agreed policy semantics.</li></ul>
</section>
<section><name>Test plan</name>
<t>A conformance suite for the mechanism contains at least these tests. Each is a pass or fail test, not a measurement.</t>
<ul><li>Replay: present a valid token twice. The second must fail at the sink.</li><li>Parameter tamper: change one byte of the action after release. The sink must refuse.</li><li>Expired token: present after "exp". Refuse.</li><li>Wrong audience: present a token for sink A to sink B. Refuse.</li><li>Wrong key: present without the bound key. Refuse.</li><li>Stale state: advance the state version, then present an older token. Refuse.</li><li>Revocation: revoke the grant, then request. Deny, with the same response as any other denial.</li><li>Quota race: start many concurrent requests for a grant with quota one. Exactly one must succeed.</li><li>Crash recovery: kill the EP between consume and token release. After restart, the unit must be either returned or recoverable by the idempotency key. It must not be lost silently and must not allow two effects.</li><li>Clock skew: move the EP clock and the sink clock apart within the stated tolerance and beyond it. Behaviour must follow the policy.</li><li>Denial uniformity: compare responses for each refusal reason. Bodies must match. Record timing differences and decide whether they are acceptable.</li><li>Bypass: attempt the effect without going through the EP. The sink must refuse.</li></ul>
</section>
<section><name>Rollout</name>
<ul><li>Shadow mode: run the EP, record decisions and do not block. Compare with real traffic for a stated period. Fix false denials.</li><li>Advisory mode: warn the requester when a request would be denied.</li><li>Enforce, low-risk class first. Widen after each class is stable.</li><li>Document for each class whether the EP fails closed (deny when the EP is unreachable) or fails open (allow). Fail-open removes the guarantee for that class. For safety-critical classes where denial is itself dangerous (for example emergency calls), fail open and record that fact in the receipt.</li><li>Keep a break-glass path that is itself authorized, logged and reviewed.</li></ul>
</section>
<section><name>What to measure</name>
<t>Measure these in the engineer's own environment before making any claim. The document gives no numbers on purpose.</t>
<ul><li>Added latency at the EP, split into authentication, policy evaluation, consume, signing and logging.</li><li>Signing throughput of the key service. It is often the first limit.</li><li>Consume latency and its behaviour under contention on one grant.</li><li>Sink verification cost per request, with and without a warm cache of the EP key and attestation result.</li><li>Receipt log append rate and checkpoint publication delay.</li><li>Rate of false denials during shadow mode.</li></ul>
</section>
<section><name>Common mistakes</name>
<ul><li>Leaving a second route to the effect that does not pass the sink check.</li><li>Binding the token to a request identifier instead of a hash of the action.</li><li>Consuming quota before checking all predicates, or after issuing the token.</li><li>Returning different errors for different denial reasons.</li><li>Using one long-lived key for everything and never rotating.</li><li>Trusting the requester's clock.</li><li>Letting the receipt log live only on the host that the operator can rewrite.</li><li>Treating attestation of the EP as proof that its policy is right. Attestation shows what code ran. It does not show that the policy is wise.</li></ul>
</section>
</section>
<section><name>Reference sketches in Python (tested)</name>
<t>This section gives small reference sketches in Python. They show the logic in running form. They were run against unit tests in a sandbox on 2 December 2026 (Python 3.13, the "cryptography" package, SQLite) and the tests passed. They are teaching sketches. They are not hardened code and have had no security review. The SQLite store stands in for a real store. It serializes through a lock. A production system would use the storage variants in the common core.</t>
<section><name>Sketch 1: enforcement point and sink</name>
<t>Tests for this sketch: a valid release and one use; replay refused at the sink; one grant with quota one gives exactly one token under 30 concurrent requests; every refusal returns the same result; a changed action or the wrong sink is refused; a repeated request with the same idempotency key returns the same token and does not consume twice; a revoked or not yet valid grant is refused.</t>
<artwork><![CDATA[
# Reference sketch: enforcement point (EP) and sink.
# Requires Python 3.9+ and the "cryptography" package.
import base64, hashlib, json, sqlite3, threading, time, uuid
from cryptography.exceptions import InvalidSignature
from cryptography.hazmat.primitives.asymmetric.ed25519 import (
    Ed25519PrivateKey,
)


def canon(obj):
    # Stand-in for RFC 8785 canonical JSON.
    return json.dumps(
        obj, sort_keys=True, separators=(",", ":")
    ).encode()


def b64(b):
    return base64.urlsafe_b64encode(b).rstrip(b"=").decode()


def unb64(s):
    return base64.urlsafe_b64decode(s + "=" * (-len(s) % 4))


class Store:
    def __init__(self):
        self.db = sqlite3.connect(
            ":memory:",
            isolation_level=None,
            check_same_thread=False,
        )
        self.lock = threading.RLock()  # sqlite sketch only
        self.db.executescript("""
          CREATE TABLE grants(id TEXT PRIMARY KEY, agent TEXT,
            action TEXT, target TEXT, nbf INT, naf INT,
            quota INT, ver INT, revoked INT DEFAULT 0);
          CREATE TABLE idem(k TEXT PRIMARY KEY, h TEXT, tok TEXT);
        """)

    def q(self, sql, args=()):
        with self.lock:
            return self.db.execute(sql, args)

    def add_grant(
        self, gid, agent, action, target, nbf, naf, q
    ):
        self.q(
            "INSERT INTO grants VALUES(?,?,?,?,?,?,?,?,0)",
            (gid, agent, action, target, nbf, naf, q, 1),
        )

    def grant(self, gid):
        return self.q(
            "SELECT agent,action,target,nbf,naf,quota,ver,revoked"
            " FROM grants WHERE id=?",
            (gid,),
        ).fetchone()

    def consume(self, gid, ver, now):
        # One statement: check and decrement together.
        with self.lock:
            cur = self.q(
                "UPDATE grants SET quota=quota-1 WHERE id=?"
                " AND ver=? AND quota>0 AND revoked=0"
                " AND nbf<=? AND naf>?",
                (gid, ver, now, now),
            )
            return cur.rowcount == 1

    def revoke(self, gid):
        self.q(
            "UPDATE grants SET revoked=1, ver=ver+1 WHERE id=?",
            (gid,),
        )


class EP:
    def __init__(
        self, store, sink_id, clock=time.time, life=30
    ):
        self.store, self.sink_id = store, sink_id
        self.key = Ed25519PrivateKey.generate()
        self.pub = self.key.public_key()
        self.clock, self.life = clock, life
        self.receipts = []  # replace with a signed log

    def _receipt(self, decision, h, jti=None):
        self.receipts.append(
            {
                "decision": decision,
                "h": h,
                "jti": jti,
                "ts": int(self.clock()),
            }
        )

    def release(self, agent, gid, action, idem_key):
        now = int(self.clock())
        h = hashlib.sha256(canon(action)).hexdigest()
        row = self.store.q(
            "SELECT h,tok FROM idem WHERE k=?", (idem_key,)
        ).fetchone()
        if row and row[0] == h:
            return row[1]  # repeat request, same token
        g = self.store.grant(gid)
        ok = g is not None
        if ok:  # evaluate every predicate
            a, act, tgt, nbf, naf, q, ver, rev = g
            checks = [
                a == agent,
                act == action.get("type"),
                tgt == action.get("target"),
                nbf <= now < naf,
                q > 0,
                rev == 0,
            ]
            ok = all(checks)
        if not ok or not self.store.consume(gid, g[6], now):
            self._receipt("refused", h)
            return None  # uniform denial
        claims = {
            "iss": "ep",
            "aud": self.sink_id,
            "jti": uuid.uuid4().hex,
            "nbf": now,
            "exp": now + self.life,
            "agent": agent,
            "params-hash": h,
            "state-version": g[6],
        }
        body = canon(claims)
        tok = b64(body) + "." + b64(self.key.sign(body))
        self.store.q(
            "INSERT INTO idem VALUES(?,?,?)",
            (idem_key, h, tok),
        )
        self._receipt("released", h, claims["jti"])
        return tok


class Sink:
    def __init__(self, ep_pub, sink_id, clock=time.time):
        self.pub, self.sink_id = ep_pub, sink_id
        self.clock = clock
        self.seen, self.lock = set(), threading.Lock()
        self.effects = []

    def apply(self, token, action):
        try:
            p, s = token.split(".")
            body = unb64(p)
            self.pub.verify(unb64(s), body)
            c = json.loads(body)
        except (ValueError, InvalidSignature):
            return False
        now = self.clock()
        want = hashlib.sha256(canon(action)).hexdigest()
        if (
            c["aud"] != self.sink_id
            or c["params-hash"] != want
            or not c["nbf"] <= now < c["exp"]
        ):
            return False
        with self.lock:  # replay table
            if c["jti"] in self.seen:
                return False
            self.seen.add(c["jti"])
        self.effects.append(action)  # the effect happens here
        return True
]]></artwork>
</section>
</section>
<section><name>Operations, threats and adoption (common core)</name>
<t>This section is repeated in each document of the series. It covers what an operator needs after the mechanism is built.</t>
<section><name>Threat model in a table</name>
<artwork><![CDATA[
Threat                      Mitigation                  Residual risk
--------------------------  --------------------------  ------------
Requester forges a token    Signature by EP key in      Key theft
                            HSM/TEE; sink verifies
Requester replays a token   jti replay table at sink;   Table loss
                            short lifetime              after crash
Requester alters action     Token bound to action hash  Hash scheme
                                                        mismatch
Stolen token used by other  Proof of possession (cnf,   Key theft
                            DPoP, mutual TLS)           of holder
Compromised requester asks  Predicates, quota, scope,   Wrong grants
for allowed things          envelope, rate limits       stay wrong
Compromised EP              Attestation, split key,     Total loss of
                            federation (V5), audit      guarantee
Bypass of the EP            Single choke point; sink    Second route
                            refuses without token       left by error
Store rollback or fork      Synchronous consensus       Operator
                            store; counters logged      error
Oracle probing of the EP    Uniform denial; rate limit  Timing leak
Log tampering               External checkpoints        Collusion
Clock manipulation          Trusted time; bounds        Time source
                                                        compromise
Policy mistakes             Review, tests, shadow       Human error
                            mode, signed bundles
]]></artwork>
<t>No row removes the need for judgement. The mechanism limits what a wrong decision can do and makes it visible afterwards.</t>
</section>
<section><name>Operator runbooks</name>
<t>### Signing key rotation</t>
<ul><li>Generate the new key in the HSM or KMS. Do not export it.</li><li>Publish the new public key in the key set with a start time. Keep the old key in the set.</li><li>Switch the EP to sign with the new key at the start time.</li><li>Keep the old key for verification for one maximum token lifetime plus the clock tolerance. Then remove it.</li><li>Write a receipt for the rotation. Check that sinks picked up the new key set.</li></ul>
<t>### Policy update</t>
<ul><li>Write the change as data and review it as code.</li><li>Run it in shadow mode against recorded requests. Compare decisions.</li><li>Sign the new bundle. Record its digest.</li><li>Deploy to one EP instance first. Watch refusals and receipts.</li><li>Roll to the rest. Keep the previous bundle for rollback.</li></ul>
<t>### Suspected EP compromise</t>
<ul><li>Revoke the EP key by publishing a new key set without it and by raising the state version.</li><li>Stop issuance. Sinks that cannot be updated at once must be told to refuse tokens signed after the suspected start time.</li><li>Preserve the receipt log and the store. Do not restore the store from backup before the investigation has taken a copy.</li><li>Re-attest the replacement EP. Issue new grants only after review.</li></ul>
<t>### Store restore</t>
<ul><li>Never restore counters silently. A restore from backup returns used units.</li><li>After a restore, advance the state version so that tokens issued after the backup point cannot be confused with earlier ones, and reconcile counters against the receipt log.</li></ul>
</section>
<section><name>What to monitor</name>
<ul><li>Rate of releases and refusals per action class, per requester and per grant.</li><li>A sudden rise in refusals (scanning, a bad policy deployment or an attack).</li><li>Quota consumed against quota granted.</li><li>Replay table hits at sinks (a token presented twice).</li><li>Latency added at the EP, split into its parts.</li><li>Key service errors and signing queue depth.</li><li>Attestation freshness of the EP and age of the oldest cached result.</li><li>Receipt log lag and checkpoint publication age.</li><li>Clock offset between EP and sinks.</li><li>Count of fail-open events and their reasons.</li></ul>
<t>Alert on a fail-open event every time it happens. A fail-open class that triggers often is a design problem.</t>
</section>
<section><name>Capacity and sizing method</name>
<t>This document gives no throughput figure. To size a deployment:</t>
<ul><li>Take the peak rate of candidate actions for the protected class.</li><li>Measure the cost of one release in the real environment: authentication, policy, consume, signing, logging.</li><li>Find the first bottleneck. It is often the signing service, then the consume store under contention on one hot grant.</li><li>Test with the failure cases: store failover, key service slowdown, log unavailable.</li><li>Add headroom for retries. Refused requests also cost work, and attackers send many.</li><li>Decide what happens above capacity: queue, shed load by class, or fail closed.</li></ul>
</section>
<section><name>Interoperability and versioning</name>
<ul><li>Name the profile and version in every token and receipt ("profile" claim) so that a verifier knows the rules.</li><li>Fix the canonical form of actions by version. A change of canonical form is a new profile version.</li><li>Plan algorithm agility: carry the algorithm identifier (COSE or JOSE header). Keep a list of allowed algorithms at the sink. Plan the move to post-quantum signatures as a future key and algorithm change, not as a redesign.</li><li>Define clock tolerance explicitly (for example how many seconds "nbf" and "exp" may be off).</li><li>Test cross-implementation: have two teams implement the sink and the EP independently and run the same test vectors. Differences in canonicalization are the most common failure.</li><li>Treat header and claim names in this series as placeholders. Registration of any name would follow the process of the relevant standards body.</li></ul>
</section>
<section><name>Adoption plan</name>
<ul><li>Phase 0, inventory: list actions with effects and the routes to them. Pick one action class with high cost of error and moderate volume.</li><li>Phase 1, shadow: deploy the EP beside the existing path. Record decisions. Fix policy.</li><li>Phase 2, pilot: require tokens for the pilot class at one sink. Keep break-glass.</li><li>Phase 3, expand: add classes. Remove standing broad permissions as classes move.</li><li>Phase 4, assure: external review of the receipt log, key procedures and bypass tests. Repeat after each major change.</li></ul>
<t>Roles: a policy owner (decides what is allowed), a platform team (runs the EP, store and keys), a sink owner (owns the effect and its check), a security reviewer (owns the test plan and bypass tests) and an auditor (reads receipts).</t>
</section>
<section><name>Standards used in this series, in one line each</name>
<artwork><![CDATA[
RFC 7519  JSON Web Token (JWT)
RFC 7800  Proof-of-possession key semantics for JWTs
RFC 8392  CBOR Web Token (CWT)
RFC 8610  Concise Data Definition Language (CDDL)
RFC 8693  OAuth 2.0 Token Exchange
RFC 8785  JSON Canonicalization Scheme
RFC 8949  Concise Binary Object Representation (CBOR)
RFC 9052  COSE: structures and process
RFC 9162  Certificate Transparency version 2.0
RFC 9334  Remote ATtestation procedureS (RATS) architecture
RFC 9396  OAuth 2.0 Rich Authorization Requests
RFC 9449  OAuth 2.0 Demonstrating Proof of Possession (DPoP)
RFC 9711  Entity Attestation Token (EAT)
RFC 5869  HMAC-based key derivation function (HKDF)
RFC 4082  TESLA broadcast authentication
]]></artwork>
<t>Check the current status of each document before relying on it, and read the document itself. This list is a reading aid, not a substitute.</t>
</section>
</section>
<section><name>Decision guide, review checklist and glossary (common core)</name>
<t>This section is repeated in each document of the series.</t>
<section><name>How to choose among the variants</name>
<t>Answer these questions in order. Each answer narrows the design.</t>
<artwork><![CDATA[
Question                         If yes               If no
-------------------------------  -------------------  ---------------
Is the effect irreversible or    Use V4 (attested EP) V2 or V3 may do
costly to other parties?         and single-use tokens
Can the sink verify signatures   Self-contained       MAC token or
at the needed rate?              signed token         reference token
Is immediate revocation needed?  Reference token or   Short lifetime
                                 push events          is enough
Can the sink reach the EP in     Per-action release   Pre-issued
the time budget?                                      window
Must two parties agree?          Federated EP (V5)    One EP
Must an outsider check later?    Merkle log with      Hash chain log
                                 external checkpoint
Is the requester untrusted or    Proof of possession  Bearer token
an AI agent?                     plus envelope        may do
Does a sweep of the target       Random token, rate   Normal controls
space matter?                    limits
]]></artwork>
<t>Where two answers conflict, choose by the cost of a wrong decision in the deployment, and write the choice down with the reason.</t>
</section>
<section><name>Worked failure analyses</name>
<t>### Failure 1: the sink applies the effect but the reply is lost</t>
<ul><li>The requester sees a timeout and sends the request again with the same idempotency key.</li><li>The EP finds the key, sees the same action hash and returns the same token without a second consume.</li><li>The sink finds the jti in its table, returns the recorded outcome and does not repeat the effect.</li><li>Result: one effect, one consumed unit, two requests in the log.</li></ul>
<t>### Failure 2: the EP crashes after consume and before returning the token</t>
<ul><li>The unit is consumed in the store. No token was returned.</li><li>On restart, the requester retries with the same idempotency key.</li><li>If the idempotency record was written in the same transaction as the consume, the EP returns a token. If it was not, the unit is lost.</li><li>Lesson: write the consume and the idempotency record in one transaction, or record an intent record before consume and finish it on restart.</li></ul>
<t>### Failure 3: two sinks receive the same token</t>
<ul><li>The sink audience check refuses the sink for which the token is not named.</li><li>If both sinks are named (a multi-sink token), the replay tables are local, so both may accept it. Avoid multi-sink tokens. If needed, use a shared replay store or one token per sink.</li></ul>
<t>### Failure 4: the clock of the EP is wrong</t>
<ul><li>If the EP clock runs ahead, tokens are issued with a window in the future and are refused by sinks until their "nbf" arrives. If it runs behind, tokens expire early at the sinks.</li><li>If the EP clock is set by the requester or by a compromised host, time windows are void.</li><li>Lesson: use an attested or independently disciplined time source, monitor offset and refuse issuance when the offset exceeds the stated tolerance.</li></ul>
<t>### Failure 5: a policy bundle with a mistake is deployed</t>
<ul><li>A predicate that is too loose allows actions that should be refused. A predicate that is too tight refuses legitimate work.</li><li>Shadow mode and recorded-request replay find both before enforcement.</li><li>Keep the previous bundle and a documented rollback. Record the policy digest in every receipt so that the decisions made under the bad bundle can be found.</li></ul>
</section>
<section><name>Security review checklist</name>
<t>Use this list before putting the mechanism into production. A "no" is a finding to resolve or to accept in writing.</t>
<ul><li>The effect has one choke point, shown by a bypass test from every network zone.</li><li>The sink refuses every request without a valid token, including requests with an expired or foreign token.</li><li>The EP signing key cannot be exported and is used only by the EP identity.</li><li>The EP code and its protected environment are attested, and the sink or a third party checks the result.</li><li>The action hash covers every parameter that matters, including the idempotency key.</li><li>The canonical form is fixed and tested against another implementation.</li><li>Consume is one atomic operation, and its behaviour under store failover is documented.</li><li>The idempotency record and the consume are written together.</li><li>The sink keeps a replay table until token expiry plus clock tolerance.</li><li>Tokens are bound to the holder's key.</li><li>Refusals are uniform in status, body and, as far as practical, timing.</li><li>Refusal reasons are logged internally and not returned.</li><li>Per-requester rate limits exist on the EP.</li><li>Policy is data, versioned, signed and recorded by digest in receipts.</li><li>Receipts are signed and the log checkpoint is published outside the operator's sole control.</li><li>Time comes from a trusted source and offset is monitored.</li><li>Key rotation, policy update, compromise response and store restore are written and rehearsed.</li><li>Fail-open classes are listed, justified and alarmed.</li><li>Break-glass is authorized, logged and reviewed.</li><li>Personal data in receipts has a retention rule.</li><li>Standing broad permissions that the mechanism replaces have been removed.</li><li>A tester has attempted to replay, tamper, race and bypass, and the results are recorded.</li></ul>
</section>
<section><name>Glossary</name>
<ul><li>Action hash: the SHA-256 of the canonical bytes of a candidate action. The token is bound to it.</li><li>Atomic consume: one indivisible step that checks and reduces a quota.</li><li>Attestation: signed evidence about the code and state of an environment, checked by a verifier (RFC 9334).</li><li>Bearer token: a token that works for whoever holds it.</li><li>Candidate action: a requested operation that has no effect until released.</li><li>Canonical form: a fixed byte form of a structured object, so that two parties compute the same hash.</li><li>Capability token: a signed, short-lived, usually single-use token for one candidate action.</li><li>Effect sink: the component that performs the effect and checks the token.</li><li>Enforcement point (EP): the protected component that decides and releases tokens.</li><li>Fail closed, fail open: deny or allow when a check cannot be made.</li><li>Idempotency key: a requester-chosen value that makes a repeated request the same request.</li><li>Predicate: one condition checked before release (identity, purpose, time, quota, state).</li><li>Proof of possession: showing control of the key a token is bound to.</li><li>Protected domain: an environment the requester cannot alter, such as an HSM or a confidential VM.</li><li>Receipt: a signed record of a release or a refusal.</li><li>Replay table: the sink's list of token identifiers already presented.</li><li>Shadow mode: running the check and recording decisions without blocking.</li><li>State version: a counter that moves when the authorization state changes, so that older tokens can be retired.</li><li>Uniform denial: the same refusal in every failure case.</li></ul>
</section>
</section>
<section><name>Security Considerations</name>
<t>Token theft is mitigated by proof-of-possession binding and short lifetimes. Replay is mitigated by atomic consumption and nonces. A compromised requester can still request actions inside its authorization; the quota and parameter binding limit the damage. A compromised EP can release arbitrary tokens, so EP integrity depends on the protected domain and on attestation, and receipts must be logged outside the EP. Side channels (response timing, error text) can reveal which predicate failed and should be reduced. Probing of the denial path should be rate limited before the EP.</t>
</section>
<section><name>Status, Intellectual Property and Notices</name>
<t>This Internet-Draft is submitted as an individual contribution. It is not an IETF standard, has no working group status and does not represent IETF consensus.</t>
<t>Intellectual property: the author is aware of the pending patent applications listed in the section "Related Patent Applications and Public Disclosures". If this draft is submitted to the IETF, the author will make the disclosure required by BCP 79 before or with submission.</t>
<t>Origin and AI assistance. The underlying invention is human-originated and is described in the PCT application named above. AI-assisted tools were used to prepare this document (summaries, mapping to existing technology and threat scenarios). It may contain errors. Readers must cross-check it against the original publicly available PCT filing and against the original sources linked in the references before drawing any conclusion.</t>
<t>Industry names. Company, product and standards names appear only to identify existing technology and the technical problems it addresses. Their appearance is not an endorsement, validation, adoption, partnership or infringement statement, and nothing here presumes patent validity, licensing obligations or technical superiority.</t>
</section>
<section anchor="iana"><name>IANA Considerations</name><t>This document has no IANA actions.</t></section>
<section anchor="search-aid"><name>Search Aid for Patent Examiners and Researchers</name>
<t>This section lists plain, industry-standard search terms. It is an aid to prior-art searching and is not a claim construction or a statement about scope.</t>
<section><name>Keywords</name><t>pre-action authorization; one-time capability token; single-use token; enforcement point; policy enforcement point; policy decision point; atomic consume; compare-and-swap; proof-of-possession; confidential computing; remote attestation; hardware security module; trusted execution environment; signed receipt; transparency log; fail-closed; AI agent authorization; zero trust; least privilege; revocation.</t></section>
<section><name>Search phrases</name><ul><li>&quot;authorization released before effect&quot;</li><li>&quot;one-time use capability token released by enforcement point&quot;</li><li>&quot;atomic decrement of authorization quota&quot;</li><li>&quot;candidate action not effective until authorization&quot;</li><li>&quot;uniform denial response to avoid oracle&quot;</li><li>&quot;enforcement point in trusted execution environment&quot;</li><li>&quot;capability token bound to action parameters hash&quot;</li><li>&quot;state version retires previously issued tokens&quot;</li></ul></section>
<section><name>Indicative classification starting points</name><t>Indicative only; not an official classification of the application. H04L 9/32 (authentication arrangements); H04L 9/40 (network security protocols); H04L 63/10 (controlling access to network resources); H04L 63/20 (managing network security policies); G06F 21/57 (certifying or maintaining trusted platforms); G06F 21/62 (protecting access to data).</t></section>
<section><name>Existing technology to compare against</name><ul><li>OAuth 2.0 Token Exchange (RFC 8693), JWT/CWT, proof-of-possession tokens (RFC 7800), DPoP.</li><li>IETF RATS architecture (RFC 9334) and EAT (RFC 9711).</li><li>draft-coetzee-oauth-spt-txn-tokens-03 and draft-asor-wimse-agent-delegation-chain-03.</li><li>Microsoft Agent Governance Toolkit; Open Policy Agent; Cedar.</li><li>Capability systems literature: macaroons, Biscuit tokens, UCAN.</li></ul></section>
<section><name>Informative references for context</name><t>The following references identify the existing specifications and drafts against which this document should be read: <xref target="AGENT-DELEGATION-CHAIN"/>, <xref target="AI-AGENT-AUTH"/>, <xref target="OAUTH-DELEGATION-CHAIN"/>, <xref target="RFC7519"/>, <xref target="RFC8392"/>, <xref target="RFC8693"/>, <xref target="RFC9052"/>, <xref target="RFC9162"/>, <xref target="RFC9334"/>, <xref target="RFC9711"/>, <xref target="SPT-TXN"/>.</t></section>
</section>
<section anchor="related-apps"><name>Related Patent Applications and Public Disclosures</name>
<t>The first entry is the application on which this document is based. The URLs come from the applicant's reference register; their current accessibility was not rechecked when this document was prepared.</t>
<dl newline="true">
<dt>1. CVID - Principal PCT application (this document is based on it)</dt><dd>
<t>PCT/IB2026/054453 - WO 2026/150381 A2</t>
<ul>
<li>Google Patents: <eref target="https://patents.google.com/patent/WO2026150381A2/en"/></li>
<li>WIPO PATENTSCOPE: <eref target="https://patentscope.wipo.int/search/en/detail.jsf?docId=WO2026150381"/></li>
</ul></dd>
<dt>2. DAS Protocols - Mothership</dt><dd>
<t>PCT/IB2026/055615 - WO 2026/150382 A2</t>
<ul>
<li>Google Patents: <eref target="https://patents.google.com/patent/WO2026150382A2/en"/></li>
<li>WIPO PATENTSCOPE: <eref target="https://patentscope.wipo.int/search/en/detail.jsf?docId=WO2026150382"/></li>
</ul></dd>
<dt>3. Algorithmic Logic Fingerprint (ALF)</dt><dd>
<t>PCT/IB2026/053385 - WO 2026/115520 (filed 7 April 2026, disclosed 4 June 2026)</t>
<ul>
<li>WIPO PATENTSCOPE: <eref target="https://patentscope.wipo.int/search/en/detail.jsf?docId=WO2026115520"/></li>
<li>Zenodo (PCT document): <eref target="https://zenodo.org/records/24438881"/></li>
</ul></dd>
<dt>4. Query-Scoped Communication Handles - Map-Based Business Discovery</dt><dd>
<t>PCT/IB2026/056771 - WO 2026/172333 A2</t>
<ul>
<li>Google Patents: <eref target="https://patents.google.com/patent/WO2026172333A2/en"/></li>
<li>WIPO PATENTSCOPE: <eref target="https://patentscope.wipo.int/search/en/detail.jsf?docId=WO2026172333"/></li>
</ul></dd>
<dt>5. Non-Bearer Capability-Validated Architecture</dt><dd>
<t>PCT/IB2026/056353 - WO 2026/196260</t>
<ul>
<li>WIPO PATENTSCOPE: <eref target="https://patentscope.wipo.int/search/en/detail.jsf?docId=WO2026196260"/></li>
</ul></dd>
<dt>6. Related public technical disclosures</dt><dd>
<ul>
<li>Computation Is Not Authority: <eref target="https://zenodo.org/records/23245054"/></li>
<li>A Skill Is Not a Capability: <eref target="https://zenodo.org/records/23793254"/></li>
<li>Protected Sequential AI Inference - Technical Disclosure: <eref target="https://zenodo.org/records/24622479"/></li>
<li>IETF - Protected Incremental AI Inference Admission: <eref target="https://datatracker.ietf.org/doc/draft-das-incremental-ai-inference-admission/"/></li>
<li>DAS Protocols Mothership - TD Commons: <eref target="https://www.tdcommons.org/dpubs_series/12542/"/></li>
</ul></dd>
</dl>
<t>Status of all filings: pending applications only; no patent is stated or implied to be granted.</t>
</section>
</middle>
<back><references><name>Informative References</name>
<reference anchor="RFC9334" target="https://www.rfc-editor.org/info/rfc9334">
<front>
<title>Remote ATtestation procedureS (RATS) Architecture</title>
<author fullname="Birkholz"/>
<date month="January" year="2023"/>
</front>
<seriesInfo name="RFC" value="9334"/>
</reference>
<reference anchor="RFC9711" target="https://www.rfc-editor.org/info/rfc9711">
<front>
<title>The Entity Attestation Token (EAT)</title>
<author><organization>IETF</organization></author>
</front>
<seriesInfo name="RFC" value="9711"/>
</reference>
<reference anchor="RFC8693" target="https://www.rfc-editor.org/info/rfc8693">
<front>
<title>OAuth 2.0 Token Exchange</title>
<author fullname="Jones"/>
<date month="January" year="2020"/>
</front>
<seriesInfo name="RFC" value="8693"/>
</reference>
<reference anchor="RFC8392" target="https://www.rfc-editor.org/info/rfc8392">
<front>
<title>CBOR Web Token (CWT)</title>
<author fullname="Jones"/>
<date month="March" year="2018"/>
</front>
<seriesInfo name="RFC" value="8392"/>
</reference>
<reference anchor="RFC7519" target="https://www.rfc-editor.org/info/rfc7519">
<front>
<title>JSON Web Token (JWT)</title>
<author fullname="Jones"/>
<date month="May" year="2015"/>
</front>
<seriesInfo name="RFC" value="7519"/>
</reference>
<reference anchor="RFC9052" target="https://www.rfc-editor.org/info/rfc9052">
<front>
<title>CBOR Object Signing and Encryption (COSE): Structures and Process</title>
<author fullname="Schaad"/>
<date month="August" year="2022"/>
</front>
<seriesInfo name="RFC" value="9052"/>
</reference>
<reference anchor="RFC9162" target="https://www.rfc-editor.org/info/rfc9162">
<front>
<title>Certificate Transparency Version 2.0</title>
<author fullname="Laurie"/>
<date month="December" year="2021"/>
</front>
<seriesInfo name="RFC" value="9162"/>
</reference>
<reference anchor="SPT-TXN" target="https://datatracker.ietf.org/doc/html/draft-coetzee-oauth-spt-txn-tokens-03">
<front>
<title>Transaction-Bound Authorization Tokens for Software and AI Agents</title>
<author fullname="Coetzee"/>
<date month="July" year="2026"/>
</front>
<seriesInfo name="Internet-Draft" value="draft-coetzee-oauth-spt-txn-tokens-03"/>
</reference>
<reference anchor="AGENT-DELEGATION-CHAIN" target="https://datatracker.ietf.org/doc/html/draft-asor-wimse-agent-delegation-chain-03">
<front>
<title>Verifiable Attenuated Delegation for AI Agent Chains</title>
<author fullname="Asor"/>
<date month="October" year="2026"/>
</front>
<seriesInfo name="Internet-Draft" value="draft-asor-wimse-agent-delegation-chain-03"/>
</reference>
<reference anchor="OAUTH-DELEGATION-CHAIN" target="https://www.ietf.org/archive/id/draft-liu-oauth-chain-delegation-00.txt">
<front>
<title>Delegation Chain for OAuth 2.0</title>
<author fullname="Liu"/>
<date month="June" year="2026"/>
</front>
<seriesInfo name="Internet-Draft" value="draft-liu-oauth-chain-delegation-00"/>
</reference>
<reference anchor="AI-AGENT-AUTH" target="https://www.ietf.org/archive/id/draft-klrc-aiagent-auth-03.html">
<front>
<title>AI Agent Authentication and Authorization</title>
<author fullname="Kasselman"/>
<date month="July" year="2026"/>
</front>
<seriesInfo name="Internet-Draft" value="draft-klrc-aiagent-auth-03"/>
</reference>
</references></back></rfc>
