<?xml version="1.0" encoding="utf-8"?>
<!-- 
     draft-rfcxml-general-template-standard-00
  
     This template includes examples of the most commonly used features of RFCXML with comments 
     explaining how to customise them. This template can be quickly turned into an I-D by editing 
     the examples provided. Look for [REPLACE], [REPLACE/DELETE], [CHECK] and edit accordingly.
     Note - 'DELETE' means delete the element or attribute, not just the contents.
     
     Documentation is at https://authors.ietf.org/en/templates-and-schemas
-->
<?xml-model href="rfc7991bis.rnc"?>  <!-- Required for schema validation and schema-aware editing -->
<!-- <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?> -->
<!-- This third-party XSLT can be enabled for direct transformations in XML processors, including most browsers -->


<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>


<rfc
  xmlns:xi="http://www.w3.org/2001/XInclude"
  category="std"
  docName="draft-liu-agent-operation-authorization-02"
  ipr="trust200902"
  obsoletes=""
  updates=""
  submissionType="IETF"
  xml:lang="en"
  version="3">

  <front>
    <title>Agent Operation Authorization</title>
    <seriesInfo name="Internet-Draft" value="draft-liu-agent-operation-authorization-02"/>

    <author fullname="Dapeng Liu" initials="D." surname="Liu">
      <organization>Alibaba</organization>
      <address>
        <email>max.ldp@alibaba-inc.com</email>
      </address>
    </author>

    <author fullname="Hongru Zhu" initials="H." surname="Zhu">
      <organization>Alibaba</organization>
      <address>
        <email>hongru.zhr@alibaba-inc.com</email>
      </address>
    </author>

    <author fullname="Suresh Krishnan" initials="S." surname="Krishnan">
      <organization>Cisco</organization>
      <address>
        <email>suresh.krishnan@gmail.com</email>
      </address>
    </author>

    <date year="2026" month="March" day="16"/>
    <area>Security</area>
    <workgroup>oauth</workgroup>

    <abstract>
    <t>
      This document specifies the Agent Operation Authorization framework — a structured mechanism that enables verifiable delegation of 
      actions from human principals to autonomous AI agents with fine-grained agent operation authorization.
    </t>

    <t>
      The framework introduces two distinct phases:
    </t>

    <ul>
      <li>
        Agent Operation Authorization Request:
        A structured proposal of operations converted to a JSON Web Token (JWT) without including the user's original natural language input.
      </li>
      <li>
        Agent Operation Authorization Token:
        A JSON Web Token representing confirmed authorization for a specific agent operation, enforceable at runtime by agents and verifiers. It cryptographically verifies user intent, prevents unauthorized or hallucinated actions, and ensures auditable traceability of each authorized operation.
      </li>
    </ul>

    
  </abstract>    
  </front>


  <middle>
    <section anchor="introduction" title="Introduction">
      <t>In agent-based systems, especially those involving generative capabilities, it is essential to convey not only what actions are permitted, but also the original intent behind them and conditions under which an autonomous agent may act on behalf of a principal.</t>

      <t>
      This document specifies the Agent Operation Authorization framework — a mechanism that enables verifiable delegation of actions from human principals to autonomous AI agents with fine-grained agent operation authorization. The framework includes Agent Operation Authorization Proposal and Agent Operation Authorization phases.
      </t>

      <t>This specification defines several new JSON Web Token (JWT) claims to support agent operation authorization: agent_operation_proposal (used in authorization requests), agent_operation_authorization (used in access tokens), agent_identity (for verified agent-user binding), evidence (for user intent provenance), and context (for policy evaluation in proposal phase). These claims enable fine-grained control over autonomous agent operations and ensure cryptographic verification of user intent.</t>
      
       <t>The AI agent constructs a structured agent_operation_proposal object and submits it to the Authorization Server (AS) via OAuth 2.0 Pushed Authorization Requests (PAR) [RFC9126], without including the user's original natural-language instruction.</t>

      
      <t>This design ensures that downstream verifiers can validate both the policy boundaries and the provenance of the initiating instruction, without dependency on Decentralized Identifiers (DIDs). This enables secure, auditable delegation for autonomous AI Agent.</t>

      <t>As an optional enhancement for user experience, the agent MAY include a reference (e.g., a hash or identifier) to the original user prompt in the PAR request. This reference can be used by the AS to display the original user intent during the authorization consent process, and MAY be included in the final authorization token for audit purposes.</t>
    
      <t>
      Upon successful user confirmation and authentication of the Authorization Proposal during the first phase, the Authorization Server (AS) SHALL issue 
      an Agent Operation Authorization Token. This token serves as the access token for subsequent interactions.
    </t>

    <t>
      The agent MUST present this JWT access token when accessing protected resources at the AS, using the mechanisms defined in OAuth 2.0 [RFC6749] and bearer token usage rules [RFC6750].
    </t>

    <t>
      Together, these components ensure that AI systems act only within user-approved boundaries, mitigating risks such as hallucination.
    </t>

    <t>
      It is designed for use in autonomous AI Agent system, multi-agent orchestration, and regulated domains such as finance, healthcare, and public services — particularly 
      where accountability and auditability are important.
    </t>

    <t>
      The framework supports enterprise identity providers, and zero-trust architectures.
    </t>

    
    </section>

    <section anchor="requirements" title="Requirements Language">
      <t>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 RFC 2119 [RFC2119] and RFC 8174 [RFC8174].</t>
    </section>

    <section anchor="agent-operation-claim" title="agent_operation_proposal Token Structure">

     <t>
        The PAR-JWT (Pushed Authorization Request in JWT format) is used in the first phase. Its purpose is to deliver the agent-proposed operational strategy to the AS, enabling the generation of a high-quality consent UI and establishing an evidentiary starting point, without including the user's original input.
    </t>

    <t>
      Its format is defined as follows:
    </t>
        <figure>
                <artwork name="" type=""><![CDATA[

                {
                    "iss": "https://client.myassistant.example",
                    "sub": "user_12345@myassistant.example",
                    "aud": "https://as.online-shop.example",
                    "exp": 1731369540,
                    "iat": 1731320400,
                    "agent_user_binding_proposal": { ... },
                    "agent_operation_proposal": "package agent\nallow { input.transaction.amount <= 50.0 }",
                    "context": { ... }
                }

                ]]></artwork>
        </figure>




<t>
  The agent_user_binding_proposal claim is a structured JSON object proposed by the client (e.g., an AI agent) to describe its own identity context when acting on behalf of a user. 
  In the Agent Operation Authorization Request (i.e., the PAR-JWT), this claim represents a <em>proposal</em> of the agent-to-user binding and is <em>not yet cryptographically endorsed</em> by the Authorization Server (AS).
</t>    
         
<t>
  The Authorization Server can determine whether a user is authorized to access a given agent
  by verifying the user's identity token (e.g., an ID Token) issued by a trusted Identity Provider.
  This requires that the token includes the agent's identifier in its <tt>aud</tt> (audience) claim,
  indicating that the token was intended for use with that agent.
  Since only users authorized by the Identity Provider receive tokens with the appropriate audience,
  validating the token and its audience suffices to establish legitimacy.

  The Authorization Server MUST validate this binding during request processing. Only upon successful validation—and after obtaining explicit user consent—does the AS issue 
  an Agent Operation Authorization Token that includes the <tt>agent_identity</tt> claim as part of a trusted authorization assertion. 
  At that point, the presence of <tt>agent_identity</tt> in the AS-issued token serves as an implicit attestation that the binding has been verified.
</t>     

<t>
  The agent_operation_proposal field is a Rego policy string for OPA enforcement.
</t>
<t>
  The context field is a structured input format for OPA decision-making.
</t>
<t>
  The evidence field in the authorization token contains user confirmation records generated during the authorization phase. See Section 4 for the detailed format of this field.
</t>
 

  
<t>
  The agent_user_binding_proposal field format is as follows:
</t>

<figure>
     <artwork name="agent_user_binding_proposal example" type="json"><![CDATA[
    {
      "agent_user_binding_proposal": {
        "user_identity_token": "eyJhbGciOiJSUzI1NiIs...",
        "agent_workload_token": "eyJhbGciOiJFUzI1NiIs...",
        "device_fingerprint": "dfp_abc123" 
      }
    }
  ]]></artwork>
</figure>

<t>
  The <tt>user_identity_token</tt> MUST be a cryptographically verifiable
  identity credential (e.g., an OpenID Connect ID Token). The AS validates this token
  to establish the user's identity before issuing an authorization token.
</t>

<t>
  The <tt>agent_workload_token</tt> identifies the running agent workload. Unless otherwise specified,
  it SHOULD be a Workload Identity Token (WIT) as defined in <xref target="I-D.ietf-wimse-workload-creds"/>.
  Deployments that already use other workload identity mechanisms (such as SPIFFE SVID) MAY map those
  tokens into this field, provided that the Authorization Server (AS) can validate them and bind the
  workload identity to the expected agent.
</t>

<table anchor="tab-agent-user-binding-proposal-fields">
  <name>agent_user_binding_proposal fields</name>
  <thead>
    <tr>
      <th>Field</th>
      <th>Type</th>
      <th>Description</th>
      <th>Requirement</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>user_identity_token</td>
      <td>JWT string</td>
      <td>A verifiable identity token for the end user, issued by a trusted Identity Provider.</td>
      <td>
        MUST be an OpenID Connect ID Token or equivalent cryptographically signed token.
        The Authorization Server will validate this token to establish the user's identity.
      </td>
    </tr>
    <tr>
      <td>agent_workload_token</td>
      <td>JWT string</td>
      <td>A verifiable workload identity token for the agent, typically a Workload Identity Token (WIT) as defined in I-D.ietf-wimse-workload-creds; deployments using SPIFFE MAY map SPIFFE SVIDs into this field.</td>
      <td>
        MUST be a valid, signed workload identity credential.
        The Authorization Server will validate this token to establish the agent's identity and trustworthiness.
      </td>
    </tr>
    <tr>
      <td>device_fingerprint</td>
      <td>string</td>
      <td>An optional unique identifier for the client device instance.</td>
      <td>
        OPTIONAL. If provided, it SHOULD be a stable, privacy-preserving fingerprint
        (e.g., derived from hardware and app properties). Used by the AS to populate
        the <tt>clientInstance</tt> field in the resulting <tt>agent_identity</tt> claim.
      </td>
    </tr>
  </tbody>
</table>
         
<table anchor="tab-agent_identity-fields">
  <name>agent_identity fields</name>
  <thead>
    <tr>
      <th>Field</th>
      <th>Type</th>
      <th>Description</th>
      <th>Requirement</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>version</td>
      <td>string</td>
      <td>Schema version</td>
      <td>MUST be "1.0"</td>
    </tr>
    <tr>
      <td>id</td>
      <td>URI</td>
      <td>Unique identifier</td>
      <td>MUST be a UUID URI</td>
    </tr>
    <tr>
      <td>issuer</td>
      <td>URI</td>
      <td>Issuer of identity</td>
      <td>MUST be a valid URI</td>
    </tr>
    <tr>
      <td>issuedTo</td>
      <td>string</td>
      <td>Target user identity</td>
      <td>MUST be a cryptographically verifiable user identifier issued by a trusted Identity Provider, such as the sub claim from an ID Token.</td>
    </tr>
    <tr>
      <td>issuedFor</td>
      <td>object</td>
      <td>Agent context</td>
      <td>MUST contain platform:the logical platform or service namespace, client:The software client identifier (e.g., mobile app ID), clientInstance:A unique fingerprint of the client instance (e.g., device+app hash).</td>
    </tr>
    <tr>
      <td>issuanceDate</td>
      <td>timestamp</td>
      <td>When identity was issued</td>
      <td>MUST conform to ISO 8601</td>
    </tr>
    <tr>
      <td>validFrom</td>
      <td>timestamp</td>
      <td>When identity becomes valid</td>
      <td>MUST conform to ISO 8601</td>
    </tr>
    <tr>
      <td>expires</td>
      <td>timestamp</td>
      <td>When identity expires</td>
      <td>MUST conform to ISO 8601</td>
    </tr>
  </tbody>
</table>


<t>
  The agent_operation_proposal field format is as follows:
</t>

<figure>
        <artwork name="agent_operation_proposal format" type=""><![CDATA[
            {
            "agent_operation_proposal": "package agent\nallow { input.transaction.amount <= 50.0 }"
            }
       ]]></artwork>
</figure>

<t>
  The agent_operation_proposal field should be a valid Rego policy string.
</t>

<t>
  The context field format is as follows:
</t>

<figure>
        <artwork name="context format" type=""><![CDATA[
            {
            "context": {
                "channel": "mobile-app",
                "deviceFingerprint": "dfp_abc123",
                "language": "zh-CN",
                "user": {
                "id": "user_12345@myassistant.example"
                },
                "agent": {
                "instance": "dfp_abc123",
                "platform": "personal-agent.myassistant.example",
                "client": "mobile-app-v1.myassistant.example"
                }
            }
            }
       ]]></artwork>
</figure>


<t>
  The Agent Client sends this PAR-JWT to the Authorization Server (AS) via the Pushed Authorization Request (PAR) mechanism, as defined in <xref target="RFC9126"/> (OAuth 2.0 Pushed Authorization Requests).
</t>

</section>


<section anchor="agent-operation-authorization-token" title="Agent Operation Authorization Token">

<t>
  Upon successful user authorization and authentication, the Authorization Server (AS) issues a Verifiable Agent Operation Credential in the form of a JWT token. 
  The purpose of this credential is to serve as a digitally signed and independently verifiable "authorization letter", which enables the Personal Agent to perform authorized operations on behalf of the user. 
  The issuer of the credential is the <tt>Authorization Server (AS)</tt> (indicated by the <tt>iss</tt> claim), and the intended audience is the <tt>Resource Server</tt> (indicated by the <tt>aud</tt> claim) that will verify and honor this authorization. 
  The credential becomes effective immediately after the user clicks "Allow" or "Consent".
</t>


<figure>
        <artwork name="" type=""><![CDATA[

{
  "iss": "https://as.online-shop.example",
  "sub": "user_12345@myassistant.example",
  "aud": "https://api.online-shop.example",
  "exp": 1731369540,
  "iat": 1731320700,
  
  // ====== Evidence of User Confirmation ======
  "evidence": {
    "id": "evidence-confirmation-abc123",
    "user_confirmation_record": {
      "displayed_content": "Add items under $50 to cart during the Nov 11 promotion (valid until 23:59)",
      "user_action": "confirmed_via_button_click",
      "timestamp": 1731320595,
      "session_context": {
        "oauth_session_id": "session_abc123",
        "device_fingerprint": "dfp_xyz789"
      }
    },
    "as_signature": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...signature_over_confirmation_record"
  },
  
  // ====== Agent Identity ======
  "agent_identity": { ... },
  
  // ====== Agent Operation Authorization ======
  "agent_operation_authorization": {
    "policy_id": "opa-policy-789"
  },

  
  // ====== auditTrail ======
  "auditTrail": {
      "evidence_reference": "evidence-confirmation-abc123",  // References the evidence object by ID
      "semanticExpansionLevel": "medium",
      "userAcknowledgeTimestamp": 1731320580,
      "consentInterfaceVersion": "consent-ui-v2.1"
  },

  // ====== Optional: Reference to Proposal ======
  "references": {
    "relatedProposalId": "urn:uuid:op-proposal-456"
  }
}

      ]]></artwork>
</figure>

  <t>
    The evidence field in the authorization token contains user confirmation records generated during the authorization phase.
  </t>

  <t>
    The evidence field format in the authorization token is as follows:
  </t>

  <figure>
    <artwork name="" type=""><![CDATA[
{
  "evidence": {
    "user_confirmation_record": {
      "displayed_content": "string",
      "user_action": "string",
      "timestamp": "NumericDate",
      "session_context": {
        "oauth_session_id": "string",
        "device_fingerprint": "string"
      }
    },
    "as_signature": "signature_over_user_confirmation_record_by_AS"
  }
}
    ]]></artwork>
  </figure>

  <t>
    The evidence field MAY alternatively use a W3C Verifiable Credential format for compatibility with existing credential infrastructures. 
    When using W3C VC format, the credential MUST contain user confirmation evidence and be signed by the Authorization Server.
  </t>

  <t>
    Alternative W3C Verifiable Credential format for evidence:
  </t>
  <figure>
    <artwork name="" type=""><![CDATA[
{
  "evidence": {
    "type": "VerifiableCredential",
    "credentialSubject": {
      "type": "UserConfirmationEvidence",
      "userAction": "confirmed_via_ui_interaction",
      "displayedContent": "Add items under $50 to cart during Nov 11 promotion",
      "confirmationTimestamp": "2025-11-11T10:33:15Z",
      "sessionId": "session_abc123"
    },
    "issuer": "https://as.example.com",
    "issuanceDate": "2025-11-11T10:33:15Z",
    "@context": ["https://www.w3.org/2018/credentials/v1"]
  }
}
    ]]></artwork>
  </figure>

  <t>
    The agent_identity claim is issued by the Authorization Server (AS)
    after successfully validating a user identity token and confirming the agent's workload identity.
    It contains an authoritative representation of the binding between the agent and the user,
    along with contextual information necessary for authorization decisions.
  </t>

  <figure>
    <artwork name="agent_identity in authorization token" type="json"><![CDATA[
      {
        "agent_identity": {
          "version": "1.0",
          "id": "urn:uuid:agent-identity-789",
          "issuer": "https://as.example.com",
          "issuedTo": "https://idp.example.com|user-12345",
          "issuedFor": {
            "platform": "personal-agent.myassistant.example",
            "client": "mobile-app-v1.myassistant.example",
            "clientInstance": "dfp_abc123"
          },
          "issuanceDate": 1731320130,
          "validFrom": 1731320130,
          "expires": 1731369540
        }
      }
    ]]></artwork>
  </figure>

  <table anchor="tab-agent_identity-fields-auth-token">
    <name>agent_identity fields in the authorization token</name>
    <thead>
      <tr>
        <th>Field</th>
        <th>Type</th>
        <th>Description</th>
        <th>Requirement</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>version</td>
        <td>string</td>
        <td>Schema version</td>
        <td>MUST be "1.0"</td>
      </tr>
      <tr>
        <td>id</td>
        <td>URI</td>
        <td>Unique identifier for this binding instance</td>
        <td>MUST be a UUID-based URI</td>
      </tr>
      <tr>
        <td>issuer</td>
        <td>URI</td>
        <td>Issuer of the <tt>agent_identity</tt> claim</td>
        <td>MUST be the URI of the Authorization Server</td>
      </tr>
      <tr>
        <td>issuedTo</td>
        <td>string</td>
        <td>Verified user identifier on whose behalf the agent acts</td>
        <td>
          MUST be a globally unique, cryptographically verifiable identifier derived from a validated identity token (e.g., the <tt>sub</tt> claim, optionally prefixed with the issuer URI such as <tt>https://idp.example.com|user-12345</tt>).
          It MUST NOT be a plain username or unverified string.
        </td>
      </tr>
      <tr>
        <td>issuedFor</td>
        <td>object</td>
        <td>Context identifying the agent</td>
        <td>
          MUST contain:
          platform: Logical service namespace;
          client: Software client identifier (e.g., mobile app ID);
          clientInstance: Unique fingerprint of the client instance (e.g., device+app hash).
        </td>
      </tr>
      <tr>
        <td>issuanceDate</td>
        <td>timestamp</td>
        <td>Time when the binding was issued</td>
        <td>MUST conform to ISO 8601 UTC</td>
      </tr>
      <tr>
        <td>validFrom</td>
        <td>timestamp</td>
        <td>Time when the binding becomes effective</td>
        <td>MUST conform to ISO 8601 UTC</td>
      </tr>
      <tr>
        <td>expires</td>
        <td>timestamp</td>
        <td>Time when the binding expires</td>
        <td>MUST conform to ISO 8601 UTC</td>
      </tr>
    </tbody>
  </table>

  <t>
    The <tt>agent_identity</tt> claim is signed by the AS to ensure its authenticity and integrity.
    The AS SHALL validate all inputs before issuing this claim, ensuring that the identities of both the user and the agent are verified.
  </t>
     

     
<t>The policy_id field is a string that serves as an OPA policy reference and MUST match a registered policy in the AS</t>


    <ul>
      <li>auditTrail establishes a complete, semantically traceable chain—from the user's original intent to the system's final executed action—in AI Agent scenarios. This mechanism is known as a <em>Semantic Audit Trail</em>. The specific purposes and their descriptions are outlined in the following table:</li>
    </ul>

    <table anchor="tbl-audit-trail-purposes">
      <name>Purposes and Descriptions of the Semantic Audit Trail</name>
      <thead>
        <tr>
          <th align="left">Purpose</th>
          <th align="left">Description</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td>1. Intent Provenance</td>
          <td>Records what the user originally said (e.g., "Add something cheap to cart on Nov 11 night") to prevent disputes such as: "I didn't say I wanted to add anything to cart!"</td>
        </tr>
        <tr>
          <td>2. Action Interpretation</td>
          <td>Documents how the system interpreted and rendered the input into a concrete operation (e.g., "Add items under $50 to cart during the Nov 11 promotion (valid until 23:59)"), reflecting the AI's reasoning process.</td>
        </tr>
        <tr>
          <td>3. Semantic Transparency</td>
          <td>Shows whether semantic expansions or default values were applied (e.g., mapping "cheap" to $50, defining "night" as 00:00–06:00).</td>
        </tr>
        <tr>
          <td>4. User Confirmation Evidence</td>
          <td>Includes timestamps indicating when the user reviewed and confirmed the interpreted action, serving as proof of authorization.</td>
        </tr>
        <tr>
          <td>5. Accountability Support</td>
          <td>Enables post-hoc analysis in case of erroneous transactions: Was the issue due to ambiguous user input, system misinterpretation, or misleading UI guidance.</td>
        </tr>
      </tbody>
    </table>

  </section> 



<section anchor="workflow" title="Workflow">
  <section title="High-Level Flow">
  
  <figure>
          <artwork name="" type=""><![CDATA[
+--------+       +----------------+       +--------+       +------------------+
|  User  |       |   AI Agent     |       |  AS    |       | Resource Server  |
+--------+       +----------------+       +--------+       +------------------+
     |                   |                    |                    |
(1)  |      prompt       |                    |                    |
     |------------------>|                    |                    |
     |                   |                    |                    |
(2)  |                   | Parse & structure  |                    |
     |                   | operation proposal |                    |
     |                   |                    |                    |
(3)  |                   | Build operation    |                    |
     |                   | proposal JWT       |                    |
     |                   |                    |                    |
(4)  |                   | Create and sign    |                    |
     |                   | JWT with JWS       |                    |
     |                   |                    |                    |
(5)  |                   | POST /par with JWT |                    |
     |                   |------------------->|                    |
     |                   |                    |                    |
(6)  |                   |                    | Validate JWT       |
     |                   |                    |                    |
     |                   |                    |                    |
     |                   |                    |                    |
(7)  |                   | Return request_uri |                    |
     |                   |<-------------------|                    |
     |                   |                    |                    |
(8)  |                   | 302 Redirect       |                    |
     |<------------------|                    |                    |
     | /authorize?client_id=..request_uri=... |                    |
     |--------------------------------------->|                    |
     |                   |                    |                    |
(9)  |                   |                    | Consent UI         |
     |<---------------------------------------|                    |
     |                   |                    |                    |
(10) | User approves     |                    |                    |
     |--------------------------------------->|                    |
     |                   |                    |                    |
(11) |                   |                    | Register policy    |
     |                   |                    | Issue access token |
     |                   |                    |                    |
(12) |                   | Return access token|                    |
     |                   |<-------------------|                    |
     |                   |                    |                    |
(13) |                   | Present access token                    |
     |                   |---------------------------------------->|
     |                   |                    |                    |
(14) |                   |                    |                    | Verify token
     |                   |                    |                    | Enforce policy
     |                   |                    |                    |
(15) |                   |                    |                    | Execute or deny
     |                   |                    | Response           |
     |<------------------------------------------------------------|
          ]]></artwork>
        </figure>
      </section>

<section title="Detailed Process Flow">
        <figure>
          <artwork name="" type=""><![CDATA[
(1) User says: "Add something cheap to cart on Nov 11 night"
     |
     v
(2) AI Agent parses intent -> builds operation proposal object
     |
     v
(3) Agent creates operation proposal JWT
     |
     v
(4) Agent creates JWT with operation proposal claim, signs with JWS
     |
     v
(5) Agent sends JWT to AS via PAR: POST /par { "request": "<jwt>" }
     |
     v
(6) AS validates JWS, extracts proposal and validates
     |
     v
(7) AS returns request_uri to Agent
     |
     v
(8) Agent redirects User to AS: /authorize?request_uri=...
     |
     v
(9) AS displays consent UI to User
     |
     v
(10) User reviews displayed operation and approves
     |
     v
(11) AS registers policy and issues Agent Operation Authorization Token
     |
     v
(12) AS returns access token to Agent
     |
     v
(13) Agent presents access token to Resource Server
     |
     v
(14) RS verifies token and enforces OPA policy
     |
     v
(15) Action executed or denied, response returned to User

          ]]></artwork>
        </figure>

      </section>
    </section>

<section anchor="a2a-delegation" title="Agent-to-Agent Delegation">
  <t>
    In multi-agent systems, a primary agent (Agent A) may delegate a subset of its authorized operations
    to a secondary agent (Agent B). This specification supports such delegation while preserving:
  </t>
  <ul spacing="normal">
    <li>End-to-end auditability back to the original human principal;</li>
    <li>No privilege escalation beyond the original authorization scope;</li>
    <li>Explicit AS validation at every delegation hop.</li>
  </ul>
     
  <t>
    To support secure agent-to-agent delegation, the Agent Operation Authorization Token MAY include a
    delegation_chain claim.
    This claim is an ordered list (from most recent to original) of cryptographically verifiable delegation events,
    enabling resource servers to validate that the current agent's authority is derived—without escalation—from
    an original human-confirmed authorization.
  </t>

  <t>
  The delegation_chain is an array of delegation records, ordered from most recent to earliest.
  Each record MUST be cryptographically bound to the issuing Authorization Server during token issuance.
  </t>


  <figure>
    <artwork name="delegation_chain example" type="json"><![CDATA[

    "delegation_chain": [
    {
      "delegator_jti": "urn:uuid:token-abc-123",
      "delegator_agent_identity": { /* agent_identity of Agent A */ },
      "delegation_timestamp": 1734516900,
      "operation_summary": "Delegate inventory check for item X",
      "as_signature": "eyJhbGciOiJSUzI1NiIs..."
    }
  ]

    ]]></artwork>
  </figure>

  <t>
    Each entry in the <tt>delegation_chain</tt> is signed by the Authorization Server at issuance time,
    ensuring its integrity and non-repudiation. The chain is extended—not copied—by the AS during each delegation step.
    The following subsections describe how agents initiate delegation and how the AS validates and extends this chain.
  </t>

  <t>
    The delegation_chain contains the following fields:
  </t>

  <table anchor="tbl-delegation-chain-fields">
    <name>delegation_chain Fields</name>
    <thead>
      <tr>
        <th>Field</th>
        <th>Type</th>
        <th>Description</th>
        <th>Requirement</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>delegator_jti</td>
        <td>string (URI)</td>
        <td>The JTI (JWT ID) of the delegator's authorization token, serving as a reference to the prior authorization in the delegation chain.</td>
        <td>REQUIRED. MUST be a valid JWT ID that can be resolved by the AS.</td>
      </tr>
      <tr>
        <td>delegator_agent_identity</td>
        <td>object</td>
        <td>The agent_identity claim from the delegator's token, identifying the delegating agent.</td>
        <td>REQUIRED. MUST match the agent_identity structure defined in this specification.</td>
      </tr>
      <tr>
        <td>delegation_timestamp</td>
        <td>timestamp</td>
        <td>The time when this delegation was authorized by the AS.</td>
        <td>REQUIRED. MUST conform to ISO 8601 UTC format.</td>
      </tr>
      <tr>
        <td>operation_summary</td>
        <td>string</td>
        <td>A human-readable description of the delegated operation for audit and logging purposes.</td>
        <td>OPTIONAL. Useful for post-hoc analysis and compliance reporting.</td>
      </tr>
      <tr>
        <td>as_signature</td>
        <td>string (JWT)</td>
        <td>Cryptographic signature from the AS over this delegation record, ensuring integrity and non-repudiation.</td>
        <td>REQUIRED. MUST be verifiable using the AS's public key.</td>
      </tr>
    </tbody>
  </table>

  <section title="Delegation Request">
    <t>
      When initiating delegation, Agent A submits a Pushed Authorization Request (PAR) to the AS containing:
    </t>
    <ul spacing="normal">
      <li>
        Its current Agent Operation Authorization Token (or a reference via <tt>jti</tt> if tokens are stored server-side);
      </li>
      <li>
        A new <tt>agent_user_binding_proposal</tt> for Agent B (note: user remains the original human principal);
      </li>
      <li>
        A <tt>requested_sub_operation</tt> descriptor (e.g., policy template ID or scope hash).
      </li>
    </ul>
    <t>
      Importantly, Agent A does <em>not</em> submit raw credentials like <tt>sourcePromptCredential</tt>.
      The AS validates the user confirmation evidence and authorization scope using the provided token reference.
    </t>
  </section>

  <section title="Authorization Server Validation">
    <t>
      The AS MUST perform the following checks:
    </t>
    <ol spacing="normal">
      <li>
        Validate that the submitted token (or <tt>jti</tt>) is valid and issued by this AS.
      </li>
      <li>
        Confirm that the original token permits delegation (e.g., contains <tt>"delegation_allowed": true</tt>).
      </li>
      <li>
        <t>
          Verify that the requested sub-operation is strictly narrower in scope than the original authorization.
          This may be implemented via:
        </t>
        <ol spacing="normal">
          <li>Pre-registered policy templates with hierarchical relationships;</li>
          <li>Runtime evaluation using a policy engine (e.g., OPA) if enabled;</li>
          <li>Scope string containment (for simple cases).</li>
        </ol>
      </li>
      <li>
        Authenticate Agent B’s identity via its <tt>agent_workload_token</tt> in the new binding proposal.
      </li>
    </ol>
    <t>
      If all checks pass, the AS issues a new Agent Operation Authorization Token for Agent B.
      The new token:
    </t>
    <ul spacing="normal">
      <li>References the same original human intent (via internal linkage, not token exposure);</li>
      <li>Includes a new <tt>agent_identity</tt> for Agent B;</li>
      <li>Extends the <tt>delegation_chain</tt> with a new, AS-signed record referencing Agent A's token (<tt>jti</tt>).</li>
    </ul>
  </section>

  <section title="Trust Chain Preservation">
    <t>
      The resulting token for Agent B contains:
    </t>
    <ul spacing="normal">
      <li>A fresh <tt>agent_identity</tt> identifying Agent B;</li>
      <li>An updated <tt>delegation_chain</tt> with one additional entry;</li>
      <li>No exposure of the original user’s ID Token or Agent A’s private credentials (while the issuedTo field allows maintaining the link to the human principal).</li>
    </ul>
    <t>
      Resource Servers can validate the entire chain by:
    </t>
    <ol spacing="normal">
      <li>Verifying the AS signature on each <tt>delegation_chain</tt> entry;</li>
      <li>Confirming that the final <tt>agent_identity.issuedTo</tt> matches the original human principal;</li>
      <li>Ensuring no operation exceeds the cumulative scope of the chain.</li>
    </ol>
  </section>
</section>

    <section anchor="security" title="Security Considerations">
      <t>The JWS signature provides integrity protection for the authorization token, while the evidence field contains user confirmation records generated during the authorization phase.</t>
      <t>Authorization Servers MUST validate the user confirmation evidence and session context before issuing authorization tokens.</t>
      <t>The Authorization Server MUST generate a cryptographic signature over the user_confirmation_record to ensure its integrity and non-repudiation. This signature provides authoritative attestation that the user confirmed the displayed content at the specified timestamp.</t>
      
        <t>When using W3C Verifiable Credential format for evidence, Authorization Servers MUST validate the credential's signature and verify that it contains appropriate user confirmation evidence as described in this specification.</t>
      <t>Public keys referenced by issuerKey MUST be obtained through secure, trusted mechanisms (e.g., pre-registration, PKI).</t>
      <t>Expression evaluation (e.g., CEL) MUST occur in sandboxed environments.</t>
      <t>The use of PAR prevents leakage of sensitive operation data in URLs.</t>

      <t>
        This specification assumes a threat model in which the agent implementation (including its evidence construction and signing logic) is part of the trusted computing base, while the large language model (LLM)
        used to derive operation proposals is not. The mechanisms defined here are primarily intended to make the transformation from the user's original intent to the final authorized operation transparent and auditable,
        and to avoid granting the LLM direct control over authorization decisions.
      </t>

      <t>
        During the authorization phase, the Authorization Server (AS) acts as the witness of the user's consent: it presents the rendered operation to the user on an AS-controlled interface and, upon explicit approval,
        issues the Agent Operation Authorization Token embedding user confirmation evidence. This evidence includes the displayed content, user action, and confirmation timestamp, all covered by the AS's
        signature on the token for audit and verification purposes.
      </t>

      <t>
        Deployments MAY define whitelists or policy profiles that limit which classes of operations an agent can be authorized to perform for a user, especially for highly sensitive resources. This can help reduce the risk of over-broad delegation.
      </t>

     <t>
      For Agent-to-Agent delegation, the Authorization Server acts as the central policy enforcer and trust anchor.
      It MUST NOT issue delegation tokens unless it can cryptographically verify the user confirmation evidence
      and confirm that the proposed sub-operation is within the bounds of the original authorization.
     </t>
     <t>
      The <tt>delegation_chain</tt> MUST be constructed and signed by the AS (and not self-reported by agents) in order to prevent forgery.
     </t>
    </section>

<section anchor="iana" title="IANA Considerations">
  <section title="JWT Claim Registration">
    <t>
      This document requests IANA to register the following two claims in the "JSON Web Token Claims" registry, 
      following the procedure defined in RFC 8126.
    </t>


    <!-- Claim 1: agent_identity -->
    <dl>
      <dt>Claim Name:</dt>
      <dd>agent_identity</dd>
      <dt>Claim Description:</dt>
      <dd>
        A structured claim that conveys the identity and issuance metadata of an autonomous agent acting on behalf of a user. 
        It includes a unique identifier, issuer, target user, deployment context, and validity timestamps, enabling secure binding of agent operations to a verified identity.
      </dd>
      <dt>Change Controller:</dt>
      <dd>IETF</dd>
      <dt>Specification Document:</dt>
      <dd> This document requests registration of the <tt>agent_identity</tt> claim in the IANA "JSON Web Token Claims" registry <xref target="RFC7519"/>.</dd>
    </dl>

    <!-- Claim 2: agent_operation_proposal -->
    <dl>
      <dt>Claim Name:</dt>
      <dd>agent_operation_proposal</dd>
      <dt>Claim Description:</dt>
      <dd>
        A Rego policy string proposed by an agent for authorization evaluation. This claim is used in the initial authorization 
        request to convey a policy that, upon validation and registration by the Authorization Server, will be referenced via a policy_id in subsequent access tokens.
      </dd>
      <dt>Change Controller:</dt>
      <dd>IETF</dd>
      <dt>Specification Document:</dt>
      <dd>This document, Section X.Y ("Agent Operation Proposal")</dd>
    </dl>

    <!-- Claim 3: agent_operation_authorization -->
    <dl>
      <dt>Claim Name:</dt>
      <dd>agent_operation_authorization</dd>
      <dt>Claim Description:</dt>
      <dd>
       A structured claim that conveys authorization metadata for agent-performed operations, including a reference to a registered policy via the policy_id field. 
       This claim is included in access tokens issued after successful policy validation and registration by the Authorization Server.
      </dd>
      <dt>Change Controller:</dt>
      <dd>IETF</dd>
      <dt>Specification Document:</dt>
      <dd>This document, Section X.Z ("Agent Operation Authorization")</dd>
    </dl>

    <!-- Claim 4: context -->
    <dl>
      <dt>Claim Name:</dt>
      <dd>context</dd>
      <dt>Claim Description:</dt>
      <dd>
       A structured claim providing contextual information for policy evaluation, including user and agent identity attributes, device characteristics, 
       channel, and locale. This claim serves as the input data for Open Policy Agent (OPA) enforcement decisions.
      </dd>
      <dt>Change Controller:</dt>
      <dd>IETF</dd>
      <dt>Specification Document:</dt>
      <dd>This document, Section X.Z ("context")</dd>
    </dl>

     <!-- Claim 5: delegation_chain -->
<dl>
  <dt>Claim Name:</dt>
  <dd>delegation_chain</dd>
  <dt>Claim Description:</dt>
  <dd>
    An optional array of AS-signed delegation records tracing agent-to-agent authorizations.
    Each record includes:
    <tt>delegator_jti</tt> (reference to prior token),
    <tt>delegator_agent_identity</tt> (delegating agent's identity),
    <tt>delegation_timestamp</tt>,
    <tt>operation_summary</tt> (optional human-readable description),
    and <tt>as_signature</tt> (AS cryptographic signature ensuring integrity).
    Enables end-to-end validation of delegation lineage without exposing raw credentials.
  </dd>
  <dt>Change Controller:</dt>
  <dd>IETF</dd>
  <dt>Specification Document:</dt>
  <dd>This document, Section <xref target="a2a-delegation" format="counter"/>.</dd>
</dl>

  </section>

    <section title="JSON Schema (Informative)" anchor="json-schema">
    <t>
        While not required for interoperability, implementers may find it useful to
        validate claim structures using JSON Schema. Informative schemas for the
        claims defined in this document may be developed and published separately.
        Such schemas are not normative and do not require IANA registration.
    </t>
    </section>

</section>


</middle>

      
<back>
    <references>
      <name>References</name>
        <references>
          <name>Normative References</name>
            <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
            <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
            <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7519.xml"/>
            <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9126.xml"/>
        </references>
        <references>
          <name>Informative References</name>
          <reference anchor="I-D.ietf-wimse-workload-creds">
              <front>
                <title>Workload Identity Credentials</title>
                <author>
                  <organization>IETF WIMSE Working Group</organization>
                </author>
                <date year="2024" month="October"/>
              </front>
              <seriesInfo name="Internet-Draft" value="draft-ietf-wimse-workload-creds"/>
          </reference>
                
          <reference anchor="OpenID" target="https://openid.net/specs/openid-connect-core-1_0.html">
              <front>
                <title>OpenID Connect Core 1.0</title>
                <author>
                  <organization>OpenID Foundation</organization>
                </author>
                <date year="2014" month="November"/>
              </front>
          </reference>
        </references>
    </references>
      
  
    <section title="Acknowledgments" numbered="false">
      <t>TBD</t>
    </section>
  </back>

</rfc>
