Web Authorization Protocol C. A. C. Bezerra
Internet-Draft 3 December 2026
Intended status: Standards Track
Expires: 6 June 2027
Flow Labels for Attenuating Agent Tokens
draft-correa-oauth-aat-flow-labels-02
Abstract
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.
Status of This Memo
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 Notice
Copyright (c) 2026 IETF Trust and the persons identified as the
document authors. All rights reserved.
Bezerra Expires 6 June 2027 [Page 1]
Internet-Draft AAT Flow Labels December 2026
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.
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1. Conventions . . . . . . . . . . . . . . . . . . . . . . . 3
2. The Flow Entry . . . . . . . . . . . . . . . . . . . . . . . 3
3. Recording Taint . . . . . . . . . . . . . . . . . . . . . . . 5
4. Deciding a Call . . . . . . . . . . . . . . . . . . . . . . . 5
5. Attenuation . . . . . . . . . . . . . . . . . . . . . . . . . 6
6. Recording the Decision . . . . . . . . . . . . . . . . . . . 6
7. Security Considerations . . . . . . . . . . . . . . . . . . . 6
8. Privacy Considerations . . . . . . . . . . . . . . . . . . . 7
9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7
10. References . . . . . . . . . . . . . . . . . . . . . . . . . 7
10.1. Normative References . . . . . . . . . . . . . . . . . . 7
10.2. Informative References . . . . . . . . . . . . . . . . . 8
Appendix A. Conformance Vectors . . . . . . . . . . . . . . . . 8
Appendix B. Implementation Status . . . . . . . . . . . . . . . 9
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 9
1. Introduction
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
Bezerra Expires 6 June 2027 [Page 2]
Internet-Draft AAT Flow Labels December 2026
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.
1.1. Conventions
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.
Holder: The key a delegation token is bound to, identified by its
JWK thumbprint URI [RFC7638].
Chain: The verified sequence of tokens from the root to the
presented leaf.
Lineage: The holders of every token in the chain.
Enforcement point: The component that verifies a presentation and
decides a tool call before the call reaches the tool.
Tainted: 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.
2. The Flow Entry
A token carries flow labels in one authorization_details entry of
type agent_flow:
Bezerra Expires 6 June 2027 [Page 3]
Internet-Draft AAT Flow Labels December 2026
{
"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.
Bezerra Expires 6 June 2027 [Page 4]
Internet-Draft AAT Flow Labels December 2026
3. Recording Taint
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.
4. Deciding a Call
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:
1. that link's when_tainted is non-empty; and
2. 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.
Bezerra Expires 6 June 2027 [Page 5]
Internet-Draft AAT Flow Labels December 2026
5. Attenuation
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.
6. Recording the Decision
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.
7. Security Considerations
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.
Bezerra Expires 6 June 2027 [Page 6]
Internet-Draft AAT Flow Labels December 2026
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.
8. Privacy Considerations
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.
9. IANA Considerations
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.
10. References
10.1. Normative References
Bezerra Expires 6 June 2027 [Page 7]
Internet-Draft AAT Flow Labels December 2026
[AAT] Niyikiza, N., "Attenuating Authorization Tokens for
Agentic Delegation Chains", n.d.,
.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997,
.
[RFC7515] Jones, M., Bradley, J., and N. Sakimura, "JSON Web
Signature (JWS)", RFC 7515, DOI 10.17487/RFC7515, May
2015, .
[RFC7638] Jones, M. and N. Sakimura, "JSON Web Key (JWK)
Thumbprint", RFC 7638, DOI 10.17487/RFC7638, September
2015, .
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, .
[RFC9396] Lodderstedt, T., Richer, J., and B. Campbell, "OAuth 2.0
Rich Authorization Requests", RFC 9396,
DOI 10.17487/RFC9396, May 2023,
.
10.2. Informative References
[RECEIPTS] Sahu, S., "Agent Action Receipts", n.d.,
.
Appendix A. Conformance Vectors
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.
Bezerra Expires 6 June 2027 [Page 8]
Internet-Draft AAT Flow Labels December 2026
Appendix B. Implementation Status
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.
Author's Address
Cleiton Augusto Correa Bezerra
Email: augusto.cleiton@gmail.com
Bezerra Expires 6 June 2027 [Page 9]