| Internet-Draft | AAT Flow Labels | December 2026 |
| Bezerra | Expires 6 June 2027 | [Page] |
An agent that reads content an attacker wrote (a mail, a web page, a tool's
output) and then acts (sends, writes, pays) can be steered by that content.
Delegation tokens bound how much authority an agent holds; they say nothing
about what the agent has read. This document defines flow labels for
Attenuating Agent Tokens: per-tool marks that say a tool brings untrusted
content in (taints) or acts on the world (clean_only), and a narrower set of
argument constraints that still apply once the chain is tainted
(when_tainted). It specifies how an enforcement point records taint along a
delegation chain, how it decides a call from a tainted chain, how labels
attenuate across delegation, and what the decision records. Conformance
vectors are provided.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 6 June 2027.¶
Copyright (c) 2026 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
The attacks on AI agents seen in practice share one shape: the agent reads something an attacker controls, and then performs an action with authority the attacker lacks. Filtering the content ("prompt injection detection") is a contest the defender cannot win reliably, because the model's interpretation of text is the attack surface. This document places the control on the action instead, outside the model, and keys it to a fact the enforcement point can observe without interpreting text: whether a holder in the delegation chain has received the output of a tool marked as bringing untrusted content in.¶
[AAT] gives each delegation step a signed, attenuating grant of tools and
argument constraints. This document adds a third dimension to "who holds the
token" and "what the token allows": what the holder has read. It reuses the
AAT constraint vocabulary and its attenuation discipline, and carries the
labels in an authorization_details entry [RFC9396]. A token that carries
these labels also marks the extension critical (Section 2), so an
enforcement point that does not implement this document refuses the token
rather than verifying it as a plain AAT and acting on a call the labels would
have refused.¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
The key a delegation token is bound to, identified by its JWK thumbprint URI [RFC7638].¶
The verified sequence of tokens from the root to the presented leaf.¶
The holders of every token in the chain.¶
The component that verifies a presentation and decides a tool call before the call reaches the tool.¶
A holder is tainted once the enforcement point has delivered to it, or to any chain it belongs to, the output of a tool labelled taints.¶
A token carries flow labels in one authorization_details entry of type
agent_flow:¶
{
"type": "agent_flow",
"tools": {
"get_emails_content": { "taints": true },
"send_email": {
"clean_only": true,
"when_tainted": {
"account_name": {
"constraint_type": "one_of", "values": ["work"] },
"recipients": {
"constraint_type": "subset",
"allowed": ["boss@corp.test"] },
"subject": { "constraint_type": "wildcard" },
"body": { "constraint_type": "wildcard" }
}
}
}
}
¶
taints (boolean, default false):Output of this tool is untrusted content. When it is delivered, every holder in the lineage becomes tainted.¶
clean_only (boolean, default false):This tool acts on the world. A call from a chain whose lineage contains a tainted holder MUST be refused unless it satisfies when_tainted as specified in Section 4.¶
when_tainted (object, default empty):Argument name to an AAT constraint. It MUST NOT be present unless clean_only is true.¶
A token MUST NOT carry more than one agent_flow entry. Unknown members MUST
cause the token to be rejected. Constraint nesting is bounded as in [AAT].¶
A token that carries an agent_flow entry MUST also carry, in its JWS
protected header [RFC7515], the Header Parameter agent_flow with the value
true, and MUST list the string "agent_flow" in the crit Header Parameter. An
enforcement point that does not implement this document therefore MUST reject
the token ([RFC7515], Section 4.1.11), rather than verify it as a plain AAT
and act on a call the labels would have refused.¶
The constraints inside when_tainted use the AAT constraint vocabulary
unchanged. To pin a single value, use one_of with one member; this document
defines no new constraint.¶
When the enforcement point delivers the output of a call to a tool labelled
taints in any link of the chain, it MUST record every holder of the lineage
as tainted, together with an identifier of the evidence (for example the
decision receipt of that call, [RECEIPTS]). It MUST record taint before the
output is returned, so that no later call can be decided on a state that
predates the content.¶
Taint MUST survive restarts of the enforcement point: a restart that cleared taint would let an injected agent clear its own by crashing its client. An implementation can rebuild the state from its decision records.¶
Taint is removed only by an authenticated human decision, which MUST itself be recorded with the holder and the reason. Delegating to a fresh holder does not remove it: a token derived from a tainted holder carries the tainted holder in its lineage.¶
After the AAT verification of the presentation succeeds, the enforcement point
determines the effective labels for the called tool. taints and clean_only
hold if any link of the chain sets them for the tool.¶
If clean_only holds and any holder of the lineage is tainted, the call is
permitted only if, for every link whose entry sets clean_only for the tool:¶
that link's when_tainted is non-empty; and¶
every argument the call carries, other than those whose value is null or
an empty array, is named in that link's when_tainted and satisfies its
constraint.¶
Otherwise the call MUST be refused. The check runs on every such link, not only the leaf: a link that does not mention the tool cannot let a later link widen what an earlier one allowed.¶
The values in when_tainted are fixed by the issuer. An issuer SHOULD NOT
intend a rule such as "reply to the sender": the sender can be the attacker.¶
A derived token's flow entry MUST NOT grant more than its parent's for any tool. Verifiers MUST reject a chain in which, for some tool, a child:¶
drops taints or clean_only that its parent sets;¶
sets a non-empty when_tainted while its parent sets clean_only with an empty when_tainted;¶
names, in when_tainted, an argument its parent's non-empty when_tainted does not name; or¶
carries a when_tainted constraint that is not subsumed by the parent's constraint for that argument, under the AAT subsumption rules.¶
A child MAY drop when_tainted (refusing the tool outright once tainted), and
MAY narrow any of its constraints.¶
A decision to permit a call from a tainted chain SHOULD record the evidence
identifier of the taint (tainted_by). A decision to refuse SHOULD record
which rule refused it. Implementations using [RECEIPTS] place these in the
receipt parameters.¶
The labels are only as good as the issuer's choice of which tools bring content in. A file read can carry an injection as well as a web page.¶
Taint is coarse by design. It approximates "the agent read untrusted content"
by "the enforcement point delivered a taints output to this chain", which it
can observe without interpreting text. Per-value provenance would be finer but
depends on the model's cooperation, which is what the attacker controls.¶
Content that reaches the agent by any path outside the enforcement point does not taint it. Deployments SHOULD route every tool through one enforcement point, or share taint state between enforcement points; several enforcement points with separate state each see only part of the sequence, and a read through one can drive an action through another.¶
Persistent memory is a path that crosses sessions. A tool that writes to a
memory store later read by other sessions, other projects or other agents
SHOULD be labelled clean_only, and the tool that reads it back SHOULD be
labelled taints. Otherwise an injected agent can write an instruction to
memory while tainted, and a later, untainted session reads it back as its own
context and acts on it: taint is laundered through storage. The same holds for
any tool whose output reaches another holder outside the delegation chain
(shared files, tickets, queues). Where the memory store keeps its own records
of provenance, a write from a tainted chain SHOULD carry the tainted_by
evidence, so that a reader can tell what an untrusted read produced. A store
that raises the weight of an entry each time it is used SHOULD NOT let a tainted
chain raise it: an attacker's entry would otherwise reinforce itself.¶
An agent that can run commands as the user of the enforcement point can read its keys and state. Run the enforcement point as a separate principal.¶
Taint records identify holders and the calls that tainted them. They need not contain the content read; a digest of the arguments is enough to bind a record to a call.¶
IANA is requested to register the following Header Parameter in the "JSON Web Signature and Encryption Header Parameters" registry [RFC7515]:¶
Header Parameter Name: "agent_flow"¶
Header Parameter Usage Location(s): JWS¶
Change Controller: IETF¶
Specification Document(s): this document¶
[RFC9396] establishes no registry for authorization_details types, so the
agent_flow type defined here has no registry to go to; it is identified by
this document. [AAT] has the same open point for its own type.¶
A suite of cases (flow-labels-vectors-01.json) gives, for one tool, the
labels each link sets (root first; null where a link does not mention the
tool), whether the lineage is tainted, a call, and the expected verdict. It
covers closed-world argument checks, absent values, checks on every link,
each attenuation rule, and malformed entries.¶
CleiMesh (open source, MIT or Apache-2.0) implements these rules over AAT
chains, records decisions as [RECEIPTS] receipts, and agrees with all 20
conformance vectors. Its current encoding places the labels in its own
authorization_details entry alongside sandbox grants; moving them to
agent_flow is planned.¶