<?xml version="1.0" encoding="utf-8"?>
<?xml-model href="rfc7991bis.rnc"?>
<!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-oauth-authorization-evidence-01"
  ipr="trust200902"
  submissionType="IETF"
  xml:lang="en"
  version="3">

  <front>
    <title abbrev="OAuth Authorization Evidence">Authorization Evidence and Audit Trail for OAuth 2.0 Access Tokens</title>
    <seriesInfo name="Internet-Draft" value="draft-liu-oauth-authorization-evidence-01"/>

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

    <author fullname="Hongru Zhu" initials="H." surname="Zhu">
      <organization>Alibaba Group</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>

    <author fullname="Aaron Parecki" initials="A." surname="Parecki">
      <organization>Okta</organization>
      <address>
        <email>aaron@parecki.com</email>
      </address>
    </author>

    <date year="2026" month="June" day="23"/>
    <area>Security</area>
    <workgroup>Web Authorization Protocol</workgroup>

    <keyword>OAuth</keyword>
    <keyword>Evidence</keyword>
    <keyword>Audit</keyword>
    <keyword>Consent</keyword>
    <keyword>User Confirmation</keyword>

    <abstract>
      <t>
        This specification defines an authorization details type for including
        authorization evidence and audit trail information in OAuth 2.0 access
        tokens using the Rich Authorization Requests (RAR) framework. When an
        Authorization Server processes user consent, it enriches the authorization
        details with cryptographic proof of user confirmation, supporting
        accountability, compliance, and dispute resolution in scenarios where
        autonomous agents act on behalf of users.
      </t>
    </abstract>
  </front>

  <middle>
    <section anchor="introduction" title="Introduction">
      <t>
        In traditional OAuth 2.0 <xref target="RFC6749"/> flows, the Authorization Server records user consent
        internally, but this information is not typically conveyed to Resource Servers
        or included in access tokens. For many use cases, this is sufficient. However,
        emerging scenarios, particularly those involving AI agents
        acting autonomously on behalf of users, require stronger
        guarantees about user intent and consent.
      </t>

      <t>
        This specification addresses the need for:
      </t>

      <ul>
        <li>
          Verifiable consent: Cryptographic proof that a user 
          explicitly authorized a specific operation;
        </li>
        <li>
          Audit trails: Traceable records linking user intent to 
          system actions;
        </li>
        <li>
          Dispute resolution: Evidence that can be examined if 
          questions arise about what was authorized;
        </li>
        <li>
          Regulatory compliance: Documentation required by applicable
          regulations.
        </li>
      </ul>

      <t>
        This specification defines an authorization details type that leverages
        the Rich Authorization Requests (RAR) <xref target="RFC9396"/> framework
        to convey authorization evidence. When a client includes an
        <tt>authorization_evidence</tt> authorization details object in its
        request, the Authorization Server enriches it during the consent process
        with cryptographic proof of user confirmation.
      </t>

      <t>
        Unless otherwise noted, all data types and serialization rules
        follow the JSON data interchange format as defined in
        <xref target="RFC8259"/>.
      </t>

      <section 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 BCP 14 <xref target="RFC2119"/> 
          <xref target="RFC8174"/> when, and only when, they appear in all capitals.
        </t>
      </section>

      <section title="Relationship to Rich Authorization Requests">
        <t>
          This specification builds on the Rich Authorization Requests (RAR)
          framework <xref target="RFC9396"/>. In RAR, clients include
          <tt>authorization_details</tt> in authorization requests to convey
          fine-grained authorization data. RAR Section 7.1 defines an "Enriched
          Response" mechanism where the Authorization Server dynamically
          populates fields in the <tt>authorization_details</tt> based on user
          consent decisions or policy rules.
        </t>

        <t>
          The <tt>authorization_evidence</tt> type defined in this specification
          follows this enriched response pattern:
        </t>

        <ol>
          <li>
            The client includes an <tt>authorization_evidence</tt> authorization
            details object in its request, typically with minimal or placeholder
            fields indicating that evidence is requested.
          </li>
          <li>
            During the consent interaction, the AS presents the requested
            operation to the user and captures the user's confirmation action.
          </li>
          <li>
            The AS enriches the <tt>authorization_evidence</tt> object with the
            complete evidence record, including <tt>user_confirmation</tt>
            details and the AS's cryptographic signature.
          </li>
          <li>
            The enriched authorization details is included in the token response
            and bound to the issued access token.
          </li>
        </ol>

        <t>
          This approach ensures that authorization evidence is structured as a
          first-class authorization detail rather than a standalone JWT claim,
          enabling consistent handling across OAuth flows and composability with
          other authorization details types.
        </t>
      </section>
    </section>

    <section anchor="terminology" title="Terminology">
      <dl>
        <dt>User Confirmation:</dt>
        <dd>
          An explicit action by the user (e.g., clicking "Allow") to approve an 
          authorization request.
        </dd>

        <dt>Displayed Content:</dt>
        <dd>
          The human-readable description of the operation shown to the user during 
          the consent flow.
        </dd>

        <dt>Evidence:</dt>
        <dd>
          A cryptographically signed record of user confirmation, including what was 
          displayed and how the user responded.
        </dd>

        <dt>Audit Trail:</dt>
        <dd>
          Metadata that enables tracing from user intent through system interpretation 
          to final authorized action.
        </dd>

        <dt>Semantic Expansion:</dt>
        <dd>
          The process of translating user intent (e.g., natural language) into 
          concrete system operations.
        </dd>
      </dl>
    </section>

    <section anchor="evidence-claim" title="The authorization_evidence Authorization Details Type">
      <t>
        The <tt>authorization_evidence</tt> authorization details type contains
        a record of the user's confirmation action during the authorization
        process. Following the RAR enriched response pattern
        (<xref target="RFC9396"/> Section 7.1), the client requests this type
        and the AS enriches it with the complete evidence record.
      </t>

      <section title="Type Definition">
        <dl>
          <dt>Type Identifier:</dt>
          <dd>authorization_evidence</dd>

          <dt>Usage:</dt>
          <dd>authorization_details in authorization requests and token responses</dd>
        </dl>
      </section>

      <section title="Client Request">
        <t>
          A client requests authorization evidence by including an
          <tt>authorization_evidence</tt> authorization details object in its
          authorization request. The client typically includes minimal fields,
          indicating that evidence is requested:
        </t>

        <figure>
          <artwork name="Client Request" type="json"><![CDATA[
{
  "authorization_details": [
    {
      "type": "authorization_evidence"
    }
  ]
}
          ]]></artwork>
        </figure>

        <t>
          The client MAY include optional fields to indicate preferences, such
          as specific audit trail requirements. However, the AS has final authority over the evidence
          content based on the actual consent interaction.
        </t>
      </section>

      <section title="Enriched Response">
        <t>
          After the user completes the consent interaction, the AS enriches the
          <tt>authorization_evidence</tt> object with the complete evidence
          record. The enriched authorization details is included in the token
          response:
        </t>

        <figure>
          <artwork name="Enriched Response" type="json"><![CDATA[
{
  "authorization_details": [
    {
      "type": "authorization_evidence",
      "evidence": {
        "id": "urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6",
        "user_confirmation": {
          "displayed_content": "Add items under $50 to cart",
          "user_action": "confirmed_via_button_click",
          "timestamp": 1731320595
        },
        "as_signature": "eyJhbGciOiJFUzI1NiJ9..MEUCIQDx...",
        "audit_trail": {
          "semantic_expansion_level": "medium",
          "proposal_ref": "urn:uuid:proposal-xyz"
        }
      }
    }
  ]
}
          ]]></artwork>
        </figure>
      </section>

      <section title="Evidence Object Structure">
        <t>
          The <tt>evidence</tt> object within the <tt>authorization_evidence</tt>
          authorization details type contains the following fields:
        </t>

        <figure>
          <artwork name="evidence structure" type="json"><![CDATA[
{
  "evidence": {
    "id": "urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6",
    "user_confirmation": {
      "displayed_content": "Add items under $50 to cart",
      "user_action": "confirmed_via_button_click",
      "timestamp": 1731320595
    },
    "as_signature": "eyJhbGciOiJFUzI1NiJ9..MEUCIQDx..."
  }
}
          ]]></artwork>
        </figure>
      </section>

      <section title="Field Definitions">
        <table anchor="tbl-evidence-fields">
          <name>Evidence Object Fields</name>
          <thead>
            <tr>
              <th>Field</th>
              <th>Type</th>
              <th>Requirement</th>
              <th>Description</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td>id</td>
              <td>string</td>
              <td>REQUIRED</td>
              <td>Unique identifier for this evidence record. The value
                MUST use a URI or URN format with at least 128 bits
                of collision resistance.  UUID URNs (e.g.,
                "urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6")
                are RECOMMENDED.</td>
            </tr>
            <tr>
              <td>user_confirmation</td>
              <td>object</td>
              <td>REQUIRED</td>
              <td>Details of the user's confirmation action.</td>
            </tr>
            <tr>
              <td>as_signature</td>
              <td>string</td>
              <td>REQUIRED</td>
              <td>AS signature over the confirmation record.</td>
            </tr>
          </tbody>
        </table>

        <section title="user_confirmation Object">
          <table anchor="tbl-user-confirmation-fields">
            <name>user_confirmation Fields</name>
            <thead>
              <tr>
                <th>Field</th>
                <th>Type</th>
                <th>Requirement</th>
                <th>Description</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td>displayed_content</td>
                <td>string</td>
                <td>REQUIRED</td>
                <td>The text shown to user for confirmation.</td>
              </tr>
              <tr>
                <td>user_action</td>
                <td>string</td>
                <td>REQUIRED</td>
                <td>How the user confirmed the operation.  The value
                  is a free-form string, but implementations SHOULD
                  use values from the following set for
                  interoperability: <tt>button_click</tt>,
                  <tt>biometric_confirmation</tt>,
                  <tt>pin_entry</tt>, <tt>voice_confirmation</tt>,
                  <tt>hardware_key</tt>, <tt>implicit_consent</tt>.
                  Custom values MAY be used for deployment-specific
                  confirmation mechanisms.</td>
              </tr>
              <tr>
                <td>timestamp</td>
                <td>NumericDate</td>
                <td>REQUIRED</td>
                <td>When the confirmation occurred.</td>
              </tr>
            </tbody>
          </table>
        </section>

      </section>

      <section title="AS Signature">
        <t>
          The <tt>as_signature</tt> field contains a cryptographic signature from 
          the Authorization Server over the evidence record. This signature:
        </t>

        <ul>
          <li>Proves the AS witnessed the user's consent;</li>
          <li>Ensures the evidence has not been tampered with;</li>
          <li>Provides strong evidence of user consent for dispute
            resolution (subject to trust in the AS, as discussed
            in <xref target="security"/>).</li>
        </ul>

        <t>
          The signature MUST be computed over the following fields of the 
          <tt>evidence</tt> object:
        </t>

        <ul>
          <li><tt>id</tt></li>
          <li><tt>user_confirmation</tt> (entire object)</li>
        </ul>

        <t>
          The <tt>as_signature</tt> field itself MUST be excluded from the
          signature computation. The signature format MUST be a detached
          JWS <xref target="RFC7515"/> in Compact Serialization using the AS's signing key.
          In detached Compact Serialization (see RFC 7515 Appendix F), the
          payload portion is omitted, resulting in the format
          "header..signature".
        </t>

        <t>
          The signature input is constructed using the following
          deterministic algorithm:
        </t>

        <ol>
          <li>
            Create a new JSON object containing only the
            <tt>id</tt> and <tt>user_confirmation</tt> fields
            copied from the <tt>evidence</tt> object.  No other
            fields from the <tt>evidence</tt> object are included.
          </li>
          <li>
            Apply the JSON Canonicalization Scheme (JCS) as defined
            in <xref target="RFC8785"/> to the JSON object from the
            previous step, producing a deterministic byte string.
          </li>
          <li>
            Compute a detached JWS (Compact Serialization) over
            the JCS output from Step 2 using the AS's private
            signing key.  The resulting value
            (<tt>header..signature</tt>) is stored in the
            <tt>as_signature</tt> field of the <tt>evidence</tt>
            object.
          </li>
        </ol>

        <t>
          To verify an <tt>as_signature</tt>, the verifier
          reconstructs the JCS input by performing Steps 1 and 2 above
          on the received <tt>evidence</tt> object (excluding the
          <tt>as_signature</tt> field), then verifies the detached
          JWS using the AS's public key.  Any extension fields
          present in the <tt>evidence</tt> object beyond
          <tt>id</tt>, <tt>user_confirmation</tt>,
          and <tt>as_signature</tt>
          MUST NOT be included in the JCS input and therefore
          are not covered by the signature.
        </t>

        <t>
          Note: In examples throughout this document, the
          <tt>as_signature</tt> value is shown in abbreviated form for
          readability. Actual values MUST use the detached JWS Compact
          Serialization format described above.
        </t>

        <t>
          The key used to sign the evidence record MAY be the same key
          used to sign the access token, or it MAY be a separate
          dedicated key.  When a separate key is used, implementations
          MUST ensure that the evidence signing key is associated with
          the AS through a verifiable mechanism (e.g., published in the
          AS's JWKS endpoint as defined in <xref target="RFC7517"/>).
          Using a dedicated evidence signing key enables independent key
          rotation without affecting token validation.
        </t>
      </section>
    </section>

    <section anchor="audit-trail-claim" title="The audit_trail Sub-object">
      <t>
        The <tt>audit_trail</tt> sub-object provides metadata for semantic
        traceability, enabling analysis of how user intent was interpreted and
        translated into authorized operations. It is included within the
        <tt>evidence</tt> object in the <tt>authorization_evidence</tt>
        authorization details type.
      </t>

      <section title="Structure">
        <figure>
          <artwork name="audit_trail structure" type="json"><![CDATA[
{
  "audit_trail": {
    "semantic_expansion_level": "medium",
    "proposal_ref": "urn:uuid:proposal-xyz"
  }
}
          ]]></artwork>
        </figure>
      </section>

      <section title="Field Definitions">
        <table anchor="tbl-audit-trail-fields">
          <name>audit_trail Fields</name>
          <thead>
            <tr>
              <th>Field</th>
              <th>Type</th>
              <th>Requirement</th>
              <th>Description</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td>evidence_ref</td>
              <td>string</td>
              <td>OPTIONAL</td>
              <td>Reference to a related evidence record by ID.
                Can be used to link this audit trail to another
                evidence record, such as the original consent in a
                delegation chain.</td>
            </tr>
            <tr>
              <td>semantic_expansion_level</td>
              <td>string</td>
              <td>OPTIONAL</td>
              <td>Degree of interpretation applied (none, low, medium, high).</td>
            </tr>
            <tr>
              <td>proposal_ref</td>
              <td>URI</td>
              <td>OPTIONAL</td>
              <td>Reference to the original authorization proposal,
                the agent's initial request describing the intended
                operation before the AS applied policy evaluation,
                scope reduction, or user consent modifications.
                The value is an opaque URI assigned by the AS for
                internal correlation; no protocol for retrieving
                the proposal content via this URI is defined by
                this specification.  This enables post-hoc
                comparison between what the agent originally
                requested and what was ultimately authorized.</td>
            </tr>
          </tbody>
        </table>
      </section>

      <section title="Semantic Expansion Levels">
        <t>
          The <tt>semantic_expansion_level</tt> field indicates how much the system
          interpreted or expanded the user's original intent.  The
          following four values form a closed set; implementations
          MUST NOT use values outside this set:
        </t>

        <dl>
          <dt>none:</dt>
          <dd>
            No interpretation; user specified exact parameters.
            Example: User explicitly sets "transfer $100 to account X".
          </dd>

          <dt>low:</dt>
          <dd>
            Minor defaults applied.
            Example: User says "add to cart" and the system defaults
            quantity to 1 and selects the user's saved shipping address.
          </dd>

          <dt>medium:</dt>
          <dd>
            Significant interpretation of qualitative terms.
            Example: User says "buy cheap headphones" and the system
            maps "cheap" to a price ceiling of $50 and selects a
            specific product category.
          </dd>

          <dt>high:</dt>
          <dd>
            Substantial expansion from a high-level goal into a
            multi-step plan.
            Example: User says "plan my trip to Tokyo" and the agent
            derives flight search, hotel booking, and itinerary
            creation as separate authorized operations.
          </dd>
        </dl>
      </section>
    </section>

    <section anchor="purposes" title="Audit Trail Purposes">
      <t>
        The evidence and audit trail objects serve several important purposes:
      </t>

      <table anchor="tbl-purposes">
        <name>Purposes of Authorization Evidence</name>
        <thead>
          <tr>
            <th>Purpose</th>
            <th>Description</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>Intent Provenance</td>
            <td>
              Records what the user intended, preventing disputes about 
              authorization scope.
            </td>
          </tr>
          <tr>
            <td>Action Interpretation</td>
            <td>
              Documents how the system translated intent into operations, 
              showing the reasoning process.
            </td>
          </tr>
          <tr>
            <td>Semantic Transparency</td>
            <td>
              Reveals any expansions or defaults applied, enabling users to 
              understand what was authorized.
            </td>
          </tr>
          <tr>
            <td>User Confirmation</td>
            <td>
              Provides timestamped proof that the user reviewed and approved 
              the operation.
            </td>
          </tr>
          <tr>
            <td>Accountability Support</td>
            <td>
              Enables post-hoc analysis to determine responsibility for 
              erroneous transactions.
            </td>
          </tr>
        </tbody>
      </table>
    </section>

    <section anchor="as-processing" title="Authorization Server Processing">
      <section anchor="evidence-collection" title="Evidence Collection from User Interaction">
        <t>
          The <tt>evidence</tt> object records the outcome of a user
          consent interaction.  Before the AS can generate a signed
          evidence record, it must first present a consent interface
          to the user and capture the user's response.  This section
          describes the general consent-to-evidence pattern and provides
          a concrete example using the JWT Grant Interaction Response
          flow.
        </t>

        <section title="General Consent-to-Evidence Pattern">
          <t>
            Regardless of the specific OAuth grant type, evidence
            collection follows a common pattern:
          </t>

          <ol>
            <li>
              The AS receives an authorization request from a client
              (which may be acting on behalf of an AI agent).
            </li>
            <li>
              The AS determines that user consent is required and
              presents a consent interface to the user.  The consent
              interface displays a human-readable description of the
              requested operation (the <tt>displayed_content</tt>).
            </li>
            <li>
              The user reviews the displayed content and performs a
              confirmation action (e.g., clicking an "Allow" button,
              providing biometric input, entering a PIN).
            </li>
            <li>
              The AS captures the interaction details (what was
              displayed, what action the user took, when, and in
              what session context) and constructs the
              <tt>evidence</tt> object as defined in
              <xref target="evidence-claim"/>.
            </li>
            <li>
              The AS signs the evidence record and includes it in
              the issued access token.
            </li>
          </ol>

          <t>
            The following diagram illustrates this pattern:
          </t>

          <figure>
            <artwork type="ascii-art"><![CDATA[
Client/Agent          Authorization Server              User
    |                         |                          |
    |-- authorization req --->|                          |
    |                         |                          |
    |                         |--- consent UI ---------->|
    |                         |    (displayed_content)   |
    |                         |                          |
    |                         |<-- user action ----------|
    |                         |    (button_click, etc.)  |
    |                         |                          |
    |                         |  [capture evidence]      |
    |                         |  [sign with as_signature]|
    |                         |                          |
    |<-- access token --------|                          |
    |    (with evidence)      |                          |
    |                         |                          |
            ]]></artwork>
          </figure>
        </section>

        <section title="Consent UI to Evidence Field Mapping">
          <t>
            Each field in the <tt>evidence</tt> object corresponds to
            a specific event during the consent interaction:
          </t>

          <table anchor="tbl-consent-mapping">
            <name>Consent UI Event to Evidence Field Mapping</name>
            <thead>
              <tr>
                <th>Consent UI Event</th>
                <th>Evidence Field</th>
                <th>Description</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td>AS renders consent page</td>
                <td><tt>displayed_content</tt></td>
                <td>The text shown to the user describing the
                  requested operation</td>
              </tr>
              <tr>
                <td>User confirms or denies</td>
                <td><tt>user_action</tt></td>
                <td>How the user responded (button click, biometric,
                  PIN, etc.)</td>
              </tr>
              <tr>
                <td>Confirmation timestamp</td>
                <td><tt>timestamp</tt></td>
                <td>Server-side time when the user's action was
                  received</td>
              </tr>
            </tbody>
          </table>
        </section>

        <section title="Example: JWT Grant Interaction Response Flow">
          <t>
            The JWT Grant Interaction Response
            (<xref target="I-D.parecki-oauth-jwt-grant-interaction-response"/>)
            defines a mechanism for AI agents to obtain user consent
            from an external Authorization Server.  The following
            sequence shows how evidence is collected during this flow:
          </t>

          <ol>
            <li>
              An AI agent sends a token request to the AS using a
              JWT authorization grant
              (<xref target="RFC7523"/>), including the requested
              scope and <tt>authorization_details</tt>.
            </li>
            <li>
              The AS validates the agent's identity and determines
              that user interaction is required.  It responds with
              an <tt>interaction_required</tt> error containing an
              <tt>interaction_uri</tt> (a URL hosted by the AS for
              the consent interface) and a polling
              <tt>interval</tt>.
            </li>
            <li>
              The agent opens the <tt>interaction_uri</tt> in the
              user's browser.  The AS presents a consent page
              showing the interpreted operation (e.g., "Add items
              under $50 to cart on your behalf").
            </li>
            <li>
              <t>
                The user reviews the displayed content and clicks
                "Allow".  The AS captures:
              </t>
              <ul>
                <li>
                  <tt>displayed_content</tt>: the operation
                  description shown on the consent page;
                </li>
                <li>
                  <tt>user_action</tt>: <tt>button_click</tt>;
                </li>
                <li>
                  <tt>timestamp</tt>: the server time of the
                  click.
                </li>
              </ul>
            </li>
            <li>
              The AS constructs the <tt>evidence</tt> object,
              computes the <tt>as_signature</tt> per
              <xref target="evidence-claim"/>, and stores the
              evidence record.
            </li>
            <li>
              The agent polls the token endpoint.  Upon detecting
              that the user has completed interaction, the AS
              issues an access token containing the signed
              <tt>evidence</tt> object.
            </li>
          </ol>

          <figure>
            <artwork type="ascii-art"><![CDATA[
AI Agent          External AS                      User
   |                   |                            |
   |-- token request ->|                            |
   |                   |                            |
   |<- interaction_    |                            |
   |   required        |                            |
   |   (interaction_   |                            |
   |    uri, interval) |                            |
   |                   |                            |
   |-- open interaction_uri in browser ------------>|
   |                   |                            |
   |                   |--- consent UI ------------>|
   |                   |    "Add items under $50    |
   |                   |     to cart on your behalf"|
   |                   |                            |
   |                   |<-- user clicks [Allow] ----|
   |                   |                            |
   |                   |  [capture evidence fields] |
   |                   |  [compute as_signature]    |
   |                   |                            |
   |-- poll token  --->|                            |
   |   endpoint        |                            |
   |                   |                            |
   |<- access token ---|                            |
   |   (with evidence) |                            |
   |                   |                            |
            ]]></artwork>
          </figure>
        </section>

        <section title="Applicability to Other Flows">
          <t>
            The consent-to-evidence pattern described above applies
            to any OAuth flow that involves user interaction.  For
            example:
          </t>

          <ul>
            <li>
              <strong>Authorization Code Grant</strong>: The AS
              presents a consent screen during the
              <tt>/authorize</tt> redirect.  Evidence is collected
              when the user approves or denies the request.
            </li>
            <li>
              <strong>CIBA (Client-Initiated Backchannel
              Authentication)</strong>: The AS delivers a consent
              request to the user's authentication device (e.g.,
              push notification).  Evidence captures the user's
              out-of-band confirmation action.
            </li>
            <li>
              <strong>Consent-Only Flow</strong>: When the user
              already holds a valid session and the AS determines
              that only operation-specific consent is needed (not
              re-authentication), the AS presents a targeted
              consent prompt.  Evidence records the scoped
              approval.
            </li>
          </ul>

          <t>
            Flows that do not involve user interaction (e.g.,
            Client Credentials Grant without user context) cannot
            produce <tt>evidence</tt> records, since there is no
            user confirmation to record.  Such flows MAY still use
            the <tt>audit_trail</tt> sub-object
            (<xref target="audit-trail-claim"/>) for semantic
            traceability without user confirmation evidence.
          </t>
        </section>
      </section>

      <section title="Evidence Generation">
        <t>
          When issuing an access token with evidence, the AS MUST:
        </t>

        <ol>
          <li>
            Record the exact content displayed to the user during consent;
          </li>
          <li>
            Capture the user's confirmation action and timestamp;
          </li>
          <li>
            Generate a unique evidence identifier;
          </li>
          <li>
            Sign the evidence fields (id and user_confirmation)
            with the AS's private key using JCS canonicalization;
          </li>
          <li>
            Include the authorization_evidence authorization details in the access token.
          </li>
        </ol>
      </section>
    </section>

    <section anchor="rs-processing" title="Resource Server Processing">
      <section title="Evidence Verification">
        <t>
          Resource Servers MAY verify the evidence object by:
        </t>

        <ol>
          <li>
            Extracting the <tt>as_signature</tt> from the evidence;
          </li>
          <li>
            Verifying the signature using the AS's public key;
          </li>
          <li>
            Confirming that the evidence <tt>id</tt> and timestamp are
            consistent with the token's <tt>iat</tt> claim (i.e., the
            user confirmation occurred before or at token issuance);
          </li>
        </ol>

        <t>
          Note: The <tt>displayed_content</tt> field records what was
          shown to the user during consent.  The RS typically does not
          have direct knowledge of the consent interaction and therefore
          cannot independently verify this field.  Instead, the RS
          relies on the AS signature as proof that the AS witnessed the
          user's consent to the described operation.
        </t>
      </section>

      <section title="Audit Logging">
        <t>
          Resource Servers SHOULD log evidence information for audit purposes, 
          including:
        </t>

        <ul>
          <li>Evidence ID;</li>
          <li>User confirmation timestamp;</li>
          <li>Displayed content summary;</li>
          <li>Operation performed;</li>
          <li>Outcome (success/failure).</li>
        </ul>
      </section>
    </section>

    <section anchor="security" title="Security Considerations">
      <t>
        This section discusses security considerations specific to
        authorization evidence in OAuth 2.0.  General OAuth 2.0
        security considerations, including token threats and
        countermeasures, are described in <xref target="RFC6819"/>.
      </t>

      <section title="Signature Verification">
        <t>
          The AS signature over the evidence fields (id and
          user_confirmation) is critical for evidence integrity.
          Implementations MUST:
        </t>

        <ul>
          <li>Use strong cryptographic algorithms (e.g., RS256, ES256);</li>
          <li>Protect AS signing keys appropriately;</li>
          <li>Rotate keys periodically with proper key management.</li>
        </ul>
      </section>

      <section title="Evidence Tampering and Trust in the AS">
        <t>
          The evidence object is protected by the access token's signature. However,
          the <tt>as_signature</tt> field provides an additional layer of protection
          specifically for the user confirmation record.
        </t>

        <t>
          It is important to understand the trust boundary of the
          evidence mechanism: the <tt>as_signature</tt> provides
          cryptographic proof that the AS <strong>recorded</strong> a
          user confirmation.  It does not independently prove that
          the user <strong>actually</strong> consented.  The AS
          controls both the consent interaction and the signing key,
          so a compromised or malicious AS could fabricate evidence
          records.  Trust in the evidence record therefore depends
          on trust in the AS and its operational security.
          Deployments requiring stronger non-repudiation guarantees
          SHOULD supplement this mechanism with user-side signatures
          or independent consent auditing.
        </t>
      </section>

      <section title="Replay Attacks">
        <t>
          Evidence records are bound to specific access tokens. The evidence ID and 
          timestamp help detect attempts to reuse evidence across different 
          authorization contexts.
        </t>
      </section>

      <section title="Token-Evidence Binding">
        <t>
          The <tt>evidence</tt> object is embedded in a signed access
          token (<xref target="RFC9068"/>), which provides
          integrity protection at the token level.  The inner
          <tt>as_signature</tt> provides a second, independent integrity
          layer specifically over the user confirmation record.  This
          dual-signature design ensures that:
        </t>

        <ul>
          <li>
            Evidence cannot be moved from one token to another without
            detection (the token signature would not cover the new
            evidence);
          </li>
          <li>
            Evidence fields cannot be modified within a valid token
            (the inner AS signature would be invalidated);
          </li>
          <li>
            Evidence can be independently verified even when extracted
            from the token (e.g., via introspection) using the
            <tt>as_signature</tt>.
          </li>
        </ul>

        <t>
          Implementations MUST NOT copy an <tt>evidence</tt> object from
          one access token into another without re-validating the
          <tt>as_signature</tt> and confirming that the evidence
          <tt>id</tt> and <tt>timestamp</tt> are consistent with the
          new token's context.
        </t>

        <t>
          The dual-signature design described above applies to signed
          JWT access tokens (<xref target="RFC9068"/>).  When opaque
          (reference) tokens are used, the <tt>evidence</tt> object is
          not embedded in the token itself and MUST be retrieved by
          the RS via token introspection (<xref target="RFC7662"/>)
          or a dedicated evidence retrieval endpoint.  In this case,
          the <tt>as_signature</tt> provides the sole integrity
          protection for the evidence record, and implementations
          MUST ensure that the transport between the RS and the
          introspection or retrieval endpoint is protected with TLS.
        </t>
      </section>

      <section title="Cross-Domain Evidence Verification">
        <t>
          In cross-domain scenarios where the RS is in a different
          trust domain than the AS, the RS must be able to verify the
          <tt>as_signature</tt> using the AS's public key.
          Implementations SHOULD:
        </t>

        <ul>
          <li>
            Publish the AS's evidence signing keys at a well-known
            JWKS endpoint (<xref target="RFC7517"/>) accessible to
            the RS;
          </li>
          <li>
            Include a <tt>kid</tt> (Key ID) in the JWS header of
            the <tt>as_signature</tt> to enable key selection;
          </li>
          <li>
            Support key caching at the RS with appropriate cache
            invalidation to balance performance and key freshness.
          </li>
        </ul>

        <t>
          When the AS and RS belong to different administrative domains,
          trust establishment for the evidence signing key MAY be
          facilitated through a trust framework, federation agreement,
          or explicit key distribution mechanism.
        </t>
      </section>

      <section title="Privacy Considerations">
        <t>
          Evidence records contain information about user consent interactions,
          including what was displayed to the user and how they responded.
          Implementations should consider applicable data protection requirements
          when storing and processing evidence records.
        </t>
      </section>
    </section>

    <section anchor="iana" title="IANA Considerations">
      <section title="OAuth Authorization Details Type Registration">
        <t>
          This specification registers the following authorization details type
          in the "OAuth Authorization Details Types" registry established by
          <xref target="RFC9396"/>:
        </t>

        <dl>
          <dt>Type:</dt>
          <dd>authorization_evidence</dd>
          <dt>Description:</dt>
          <dd>
            Authorization evidence and audit trail information using the
            enriched response pattern, providing cryptographic proof of user
            consent for authorization proof and audit purposes.
          </dd>
          <dt>Change Controller:</dt>
          <dd>IETF</dd>
          <dt>Specification Document:</dt>
          <dd><xref target="evidence-claim"/> of this document</dd>
        </dl>
      </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.6749.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7515.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7517.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6819.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8785.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8259.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9068.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9396.xml"/>
      </references>

      <references>
        <name>Informative References</name>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7662.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7523.xml"/>

        <reference anchor="I-D.liu-oauth-rego-policy">
          <front>
            <title>Rego Policy Language for OAuth 2.0</title>
            <author initials="D." surname="Liu"/>
            <date year="2026" month="June"/>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-liu-oauth-rego-policy-00"/>
        </reference>

        <reference anchor="I-D.parecki-oauth-jwt-grant-interaction-response">
          <front>
            <title>JWT Authorization Grant with Interaction Response</title>
            <author initials="A." surname="Parecki"/>
            <author initials="B." surname="Campbell"/>
            <author initials="D." surname="Liu"/>
            <date year="2026" month="June"/>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-parecki-oauth-jwt-grant-interaction-response-00"/>
        </reference>

        <reference anchor="I-D.ietf-oauth-identity-assertion-authz-grant">
          <front>
            <title>OAuth 2.0 Identity Assertion Authorization Grant</title>
            <author initials="K." surname="Ying"/>
            <author initials="B." surname="Campbell"/>
            <date year="2026" month="January"/>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-oauth-identity-assertion-authz-grant"/>
        </reference>
      </references>
    </references>

    <section title="Complete Example">
      <t>
        The following shows a complete access token with authorization_details
        containing both <tt>authorization_evidence</tt> and <tt>rego_policy</tt>
        authorization details types:
      </t>

      <t>
        This example illustrates how the <tt>authorization_evidence</tt> type
        complements the <tt>rego_policy</tt> type
        (<xref target="I-D.liu-oauth-rego-policy"/>).  While the Rego
        policy defines <strong>what operations are permitted</strong>
        (the behavioral constraint contract), the authorization evidence records
        <strong>why those operations were authorized</strong> (the user's
        explicit consent).  Together, they enable a Resource Server to
        enforce fine-grained policy while maintaining a verifiable audit
        trail linking each authorized action back to user intent.
      </t>

      <t>
        The <tt>act.sub</tt> value uses the <tt>wit://</tt> URI scheme
        to identify the acting agent by its workload identity, as
        defined in the Identity Assertion Authorization Grant
        (<xref target="I-D.ietf-oauth-identity-assertion-authz-grant"/>).
        The hash suffix provides a collision-resistant binding between
        the URI and the agent's attestation evidence.
      </t>

      <figure>
        <artwork name="Complete Access Token Example" type="json"><![CDATA[
{
  "iss": "https://as.example.com",
  "sub": "user_12345",
  "aud": "https://api.shop.example",
  "exp": 1731369540,
  "iat": 1731320700,
  "jti": "urn:uuid:token-abc-123",

  "act": {
    "sub": "wit://myassistant.example/sha256.abc123..."
  },

  "authorization_details": [
    {
      "type": "authorization_evidence",
      "evidence": {
        "id": "urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6",
        "user_confirmation": {
          "displayed_content": "Add items under $50 to cart",
          "user_action": "confirmed_via_button_click",
          "timestamp": 1731320595
        },
        "as_signature": "eyJhbGciOiJFUzI1NiJ9..MEUCIQDx...",
        "audit_trail": {
          "semantic_expansion_level": "medium",
          "proposal_ref": "urn:uuid:proposal-xyz"
        }
      }
    },
    {
      "type": "rego_policy",
      "policy": {
        "type": "rego",
        "uri": "https://as.example.com/policies/policy-cart-50",
        "entry_point": "allow"
      }
    }
  ]
}
        ]]></artwork>
      </figure>
    </section>

    <section title="Acknowledgments" numbered="false">
      <t>
        The authors would like to thank Brian Campbell for his valuable 
        feedback and insightful discussions during the development of this 
        specification. His contributions helped shape key design decisions.
      </t>
    </section>
  </back>

</rfc>
