<?xml version="1.0" encoding="UTF-8"?>
<rfc category="exp" consensus="true" docName="draft-liao-aipref-autoctl-ext-01" ipr="trust200902" sortRefs="true" submissionType="IETF" symRefs="true" tocInclude="true" version="3" xmlns:xi="http://www.w3.org/2001/XInclude">
  <front>
    <title abbrev="aipref-autoctl-ext">Protocol Extension for Automation Control</title>
    <seriesInfo name="Internet-Draft" value="draft-liao-aipref-autoctl-ext-01"/>
    <author fullname="Liao Peiyuan">
      <organization>Condé Nast</organization>
      <address>
        <postal>
          <country>United States of America</country>
        </postal>
        <email>peiyuan_liao@condenast.com</email>
      </address>
    </author>
    <date day="20" month="April" year="2025"/>
    <area>Applications</area>
    <workgroup>AI Preferences</workgroup>
    <keyword>Automation Preferences</keyword>
    <keyword>Automation Control</keyword>
    <keyword>Advanced Web Automation</keyword>
    <abstract>
      <t>This document specifies extensions to <xref target="CORE-SPEC"/>,
      providing a wider range of controls for server-side automation permissions. 
      It supports rate limiting, automation technology restrictions, API permissions, 
      session requirements, and HTML asset annotations. These extensions enable service owners
      to exercise more granular control over automated interactions.</t>
    </abstract>
    <note removeInRFC="true">
      <name>About This Document</name>
      <t>The latest revision of this draft can be found at <eref target="https://datatracker.ietf.org/doc/draft-liao-aipref-autoctl-ext/"/>.
      Status information for this document may be found at <eref target="https://datatracker.ietf.org/doc/draft-liao-aipref-autoctl-ext/"/>.</t>
      <t>Discussion of this document takes place on the
      AI Preferences Working Group mailing list (<eref target="mailto:ai-control@ietf.org"/>),
      which is archived at <eref target="https://mailarchive.ietf.org/arch/browse/ai-control/"/>.
      Subscribe at <eref target="https://www.ietf.org/mailman/listinfo/ai-control/"/>.</t>
    </note>
  </front>
  
  <middle>
    <section anchor="introduction">
      <name>Introduction</name>
      <t>Often, the behaviors of automated systems may exhibit a certain pattern that is hard to characterize
      with only the HTTP method and user-agent used by <xref target="CORE-SPEC"/>. This document introduces a set of extensions
      for service owners to specify more complex and granular automation policies involving rate limiting,
      particularly prevalent automation technologies, API permissions, session requirements, and annotations on HTML assets.</t>
      
      <section anchor="relationship-to-core-specification">
        <name>Relationship to Core Specification</name>
        <t>All directives and mechanisms defined in the core specification
        remain valid and are not redefined here. This document assumes familiarity
        with <xref target="CORE-SPEC"/> and uses its terminology and concepts throughout.</t>
        
        <t>The extensions defined in this document are <bcp14>OPTIONAL</bcp14> for both servers and
        clients. Implementations that support only the core specification are
        considered compliant with the <tt>automation-preferences.txt</tt> protocol, though they
        will not benefit from the granular controls defined here.</t>
        
        <t>When both core and extended directives are present in an <tt>automation-preferences.txt</tt>
        file, parsers that do not support the extensions defined in this document
        <bcp14>MUST</bcp14> ignore the unrecognized directives, as specified in the core
        specification's <xref target="CORE-SPEC" section="extension-mechanism" sectionFormat="bare"/>.</t>
      </section>
    </section>
    
    <section anchor="conventions-and-terminology">
      <name>Conventions and Terminology</name>
      <t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
      NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
      "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" 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, as shown here.</t>
      
      <t>This document uses the terminology defined in <xref target="CORE-SPEC"/>. The following additional terms are introduced:</t>
      
      <ul spacing="normal">
        <li>
          Rate limiting: Constraints on the frequency or concurrency of automated
          requests.
        </li>
        <li>
          Automation technology: Specific tools or frameworks used for automation,
          such as headless browsers or browser automation protocols.
        </li>
        <li>
          XHR/Fetch: XMLHttpRequest or Fetch API calls performed programmatically.
        </li>
        <li>
          Session validation: Mechanisms to verify that automated requests are part
          of a legitimate user session.
        </li>
        <li>
          Asset annotation: Metadata embedded within HTML documents to specify
          automation policies for individual content elements.
        </li>
      </ul>
    </section>
    
    <section anchor="extended-protocol-specification">
      <name>Extended Protocol Specification</name>
      <t>This section defines additional directives that extend the <tt>automation-preferences.txt</tt>
      protocol. These directives may be used alongside the core directives in any
      group within the <tt>automation-preferences.txt</tt> file.</t>

      <t>
        Unless stated otherwise, the empty form of any comma-separated list
        means "explicitly none", distinct from omitting the directive.
      </t>
            
      <section anchor="rate-limiting">
        <name>Rate Limiting</name>
        <t>The following directives are defined:</t>
        
        <ul spacing="normal">
          <li>
            <t><tt>request-limit</tt>: Specifies the maximum number of requests allowed within a
            time period, expressed as a count followed by a time unit (e.g., "60/minute").
            Supported time units are "second", "minute", "hour", and "day".</t>
          </li>
          <li>
            <t><tt>concurrent-limit</tt>: Specifies the maximum number of concurrent connections
            allowed from a single client.</t>
          </li>
        </ul>
        
        <t>Example:</t>
        <figure><artwork><![CDATA[
request-limit: 60/minute
concurrent-limit: 5
        ]]></artwork></figure>
        
        <t>Rate limiting directives apply to all requests within the scope of the group,
        regardless of HTTP method. If no rate limiting directives are specified,
        clients <bcp14>SHOULD NOT</bcp14> assume any specific rate limits.</t>
      </section>
      
      <section anchor="automation-technology-restrictions">
        <name>Automation Technology Restrictions</name>

        <t>Automation technology directives specify whether particular automation
        capabilities are permitted.  Automation mechanisms fall into two orthogonal
        layers: <em>protocol</em> (the wire format exchanged with the browser) and
        <em>runtime</em> (whether the browser runs headless or headed).  Tokens defined
        in <xref target="proto-tokens"/> and <xref target="runtime-tokens"/> <bcp14>MAY</bcp14> be
        mixed in any order.</t>

        <t>The following directive is defined:</t>
        <ul spacing="normal">
          <li>
            <t><tt>allowed-automations</tt>: A comma-separated list of tokens
            representing permitted automation mechanisms.  If this directive is
            present but empty, it implies that no standard tokens are explicitly
            permitted.  If the directive is absent, clients
            <bcp14>SHOULD NOT</bcp14> assume any mechanism is allowed.</t>
          </li>
        </ul>

        <t>Default behavior: when the <tt>allowed-automations</tt> directive is:</t>

        <dl>
          <dt>present and empty</dt>
          <dd>no standard tokens are permitted;</dd>
          <dt>absent</dt>
          <dd>the server makes no statement, and clients
            <bcp14>SHOULD</bcp14> assume the most restrictive stance (i.e.,
            that no automation mechanism is authorised).</dd>
        </dl>

        <t>This aligns the silent default with that of <tt>api-automation</tt>,
        <tt>allow-xhr</tt>, and <tt>disallow-fetch-from</tt>, ensuring a
        single, predictable "fail-closed" rule across all extension
        directives.</t>

        <t>
          A list-valued directive that appears as <tt>name:</tt> followed only by
          whitespace or a comment <bcp14>MUST</bcp14> be parsed as an empty
          list, not a syntax error.  This applies to
          <tt>allowed-automations</tt> and all other comma-separated lists in the
          core or extension specs.
        </t>

        <t>Example (allowing WebDriver traffic in headless mode):</t>
        <figure><artwork><![CDATA[
allowed-automations: webdriver, headless
        ]]></artwork></figure>

        <t>If a token is not listed in a present <tt>allowed-automations</tt>
        directive, clients <bcp14>SHOULD</bcp14> assume that the use of that
        mechanism is not permitted within the specified scope.  Implementations
        <bcp14>SHOULD</bcp14> respect these directives when applicable, even though
        detection techniques may differ.</t>

        <t>The directive accepts any string token, but the following identifiers are
        suggested for interoperability.</t>

        <t>This list is not exhaustive.  Future specifications <bcp14>MAY</bcp14>
        define additional standard tokens.</t>

        <section anchor="proto-tokens">
          <name>Protocol Tokens</name>
          <ul spacing="normal">
            <li><t><tt>webdriver</tt>: Automation using the W3C WebDriver wire
            protocol <xref target="WEBDRIVER"/>.</t></li>
            <li><t><tt>cdp</tt>: Automation using the Chrome DevTools
            Protocol <xref target="CDP"/>.</t></li>
            <li><t><tt>webkit-remote</tt>: Automation using the WebKit Remote
            Debugging Protocol <xref target="WKREMOTE"/>.</t></li>
            <li><t><tt>firefox-remote</tt>: Automation using the Firefox Remote Debug
            Protocol via GeckoDriver <xref target="FFREMOTE"/>.</t></li>
          </ul>
        </section>

        <section anchor="runtime-tokens">
          <name>Runtime Tokens</name>
          <ul spacing="normal">
            <li><t><tt>headless</tt>: Browser runs with no visible UI
            <xref target="HEADLESS"/>.</t></li>
            <li><t><tt>headed</tt>: Browser UI is presented to the user.</t></li>
          </ul>
        </section>
      </section>

      
      <section anchor="api-and-xhr-permissions">
        <name>API and XHR Permissions</name>
        <t>API and XHR permission directives specify rules for API usage and automated
        use of XMLHttpRequest, Fetch, or AJAX. The following directives are defined:</t>
        
        <ul spacing="normal">
          <li>
            <t><tt>api-automation</tt>: Indicates how API endpoints may be accessed by automated
            clients. Valid values are:</t>
            <ul spacing="normal">
              <li>
                <t><em>none</em>: No API automation is permitted.</t>
              </li>
              <li>
                <t><em>with-key-only</em>: API automation is permitted only with proper authentication.</t>
              </li>
              <li>
                <t><em>open</em>: API automation is generally permitted.</t>
              </li>
            </ul>
          </li>
          <li>
            <t><tt>allow-xhr</tt>: Indicates how XMLHttpRequest or Fetch API may be used by
            automated clients. Valid values are:</t>
            <ul spacing="normal">
              <li>
                <t><em>none</em>: No XHR/Fetch automation is permitted.</t>
              </li>
              <li>
                <t><em>read-only</em>: Only GET requests are permitted via XHR/Fetch.</t>
              </li>
              <li>
                <t><em>open</em>: XHR/Fetch automation is generally permitted.</t>
              </li>
            </ul>
          </li>
          <li>
            <t><tt>disallow-fetch-from</tt>: Comma-separated list of URL patterns from which
            automated XHR/Fetch requests are prohibited. Wildcards MAY be used.</t>
          </li>
        </ul>
        
        <t>Example:</t>
        <figure><artwork><![CDATA[
api-automation: with-key-only
allow-xhr: read-only
disallow-fetch-from: /account/*, /checkout/*, /admin/*
        ]]></artwork></figure>
        
        <t>If API and XHR permission directives are not specified, clients SHOULD assume
        the most restrictive value (i.e., "none" for <tt>api-automation</tt> and <tt>allow-xhr</tt>).</t>
      </section>
      
      <section anchor="session-requirements">
        <name>Session Requirements</name>
        <t>Session requirement directives specify whether automated requests must be part
        of a legitimate user session. The following directives are defined:</t>
        
        <ul spacing="normal">
          <li>
            <t><tt>require-human-initiated-session</tt>: Boolean value indicating whether automated
            requests must be part of a session that was initiated by a human user.</t>
          </li>
          <li>
            <t><tt>session-validation</tt>: Specifies the method used to validate sessions. Valid
            values are:</t>
            <ul spacing="normal">
              <li>
                <t><em>cookie-based</em>: Sessions are validated using HTTP cookies.</t>
              </li>
              <li>
                <t><em>token-based</em>: Sessions are validated using authentication tokens.</t>
              </li>
              <li>
                <t><em>oauth</em>: Sessions are validated using OAuth.</t>
              </li>
              <li>
                <t><em>none</em>: No session validation is required.</t>
              </li>
            </ul>
          </li>
          <li>
            <t><tt>session-ttl</tt>: Specifies the maximum time-to-live for a session, expressed
            as a duration (e.g., "30m", "2h", "1d").</t>
            <t>
              A <tt>duration</tt> literal consists of a sequence of decimal
              digits immediately followed by a single unit character.  Units are
              mapped as follows:
            </t>
            <ul spacing="normal">
              <li><tt>s</tt> - seconds (1 &lt;= value &lt;= 86400)</li>
              <li><tt>m</tt> - minutes (1 &lt;= value &lt;= 1440)</li>
              <li><tt>h</tt> - hours    (1 &lt;= value &lt;= 168)</li>
              <li><tt>d</tt> - days     (1 &lt;= value &lt;= 365)</li>
            </ul>
            <t>
              Implementations <bcp14>MUST</bcp14> reject values outside these
              ranges with a client or server error appropriate to their role.
            </t>
          </li>
        </ul>
        
        <t>Example:</t>
        <figure><artwork><![CDATA[
require-human-initiated-session: true
session-validation: cookie-based
session-ttl: 1h
        ]]></artwork></figure>
        
        <t>If session requirement directives are not specified, clients SHOULD NOT assume
        any specific session requirements, but SHOULD include a valid User-Agent header
        in all requests.</t>
      </section>
      
      <section anchor="html-asset-annotation">
        <name>HTML Asset Annotation</name>
        <t>Automation preferences <bcp14>MAY</bcp14> be embedded directly within HTML documents 
        to annotate individual assets. Authors <bcp14>SHOULD</bcp14> use structured data markup 
        using JSON-LD <xref target="JSON-LD11"/> embedded in a <tt>&lt;script&gt;</tt>
        element. The JSON object <bcp14>SHOULD</bcp14> use a defined type
        and include relevant fields that mirror those used in <tt>automation-preferences.txt</tt>.
        </t>

        <t>Note that unlike site-wide directives, asset-level annotations <bcp14>SHOULD NOT</bcp14> include
        HTTP method restrictions, request limits, or concurrency limits, as these concepts
        apply to endpoints and services rather than to individual content assets.</t>
        
        <t>Example:</t>
        <figure><artwork><![CDATA[
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "AutomationPolicyAnnotation",
  "allowedAutomations": [],
  "allowedPurposes": [],
}
</script>
        ]]></artwork></figure>
        
        <t>When both an <tt>automation-preferences.txt</tt> file and HTML asset annotations are present,
        the more specific rule (typically the HTML annotation) <bcp14>SHALL</bcp14> be applied to
        the corresponding content asset. Clients supporting HTML asset annotations
        <bcp14>SHOULD</bcp14> parse and respect these annotations when present.</t>
        
        <t>The annotation schema <bcp14>MAY</bcp14> include any directives defined in the core or
        extension specifications. Fields in the annotation <bcp14>SHOULD</bcp14> use camelCase naming
        to align with JSON-LD conventions (e.g., <tt>allowedAutomations</tt> for <tt>allowed-automations</tt>, <tt>requestLimit</tt> for <tt>request-limit</tt>),
        while maintaining semantic equivalence to the corresponding directives in the <tt>automation-preferences.txt</tt> file.</t>
      </section>
    </section>
    
    <section anchor="extended-formal-syntax" numbered="true" toc="include">
      <name>Formal Syntax</name>
      <t>
        Below is an Augmented Backus-Naur Form (ABNF) description,
        incorporating the extensions defined in this document. It extends the
        grammar defined in the core specification <xref target="CORE-SPEC" section="formal-syntax" format="default" sectionFormat="of"/>.
      </t>
      <t>
        Rules inherited or unmodified from the core specification are included for
        completeness. Rules added or modified by this extension are indicated
        with comments (`; Extension directive` or `; Extended rule`).
      </t>
      <sourcecode type="abnf" name="automation-preferences-extended">
automation-preferences = *( group )

group            = 1*scope-directive           ; at least one &lt;scope&gt;
                   *( directive / emptyline )
                   1*emptyline                 ; blank line terminates group

directive        = scope-directive / host-directive /
                   user-agent-directive /
                   method-directive / purpose-directive /
                   ; Extended rule: Added extension directives
                   request-limit-directive / concurrent-limit-directive /
                   allowed-automations-directive / api-automation-directive /
                   allow-xhr-directive / disallow-fetch-from-directive /
                   require-human-session-directive / session-validation-directive /
                   session-ttl-directive

; --- Core directives (from CORE-SPEC) ---------------------

scope-directive   = *WS "scope"            *WS ":" *WS url-pattern    EOL
host-directive    = *WS "host"             *WS ":" *WS host-pattern   EOL
method-directive  = *WS "allowed-methods"  *WS ":" *WS method-list    EOL
purpose-directive = *WS "allowed-purposes" *WS ":" *WS purpose-list   EOL
user-agent-directive  = *WS "user-agent" *WS ":" *WS product-token
                        *( *WS "," *WS product-token ) EOL

; --- Extension directives ---------------------------------

request-limit-directive = *WS "request-limit"  *WS ":" *WS rate-spec EOL
concurrent-limit-directive = *WS "concurrent-limit" *WS ":" *WS count EOL
allowed-automations-directive = *WS "allowed-automations" *WS ":" *WS automation-list EOL
api-automation-directive = *WS "api-automation" *WS ":" *WS api-automation-value EOL
allow-xhr-directive = *WS "allow-xhr" *WS ":" *WS allow-xhr-value EOL
disallow-fetch-from-directive = *WS "disallow-fetch-from" *WS ":" *WS url-pattern-list EOL
require-human-session-directive = *WS "require-human-initiated-session" *WS ":" *WS boolean EOL
session-validation-directive = *WS "session-validation" *WS ":" *WS session-validation-value EOL
session-ttl-directive = *WS "session-ttl" *WS ":" *WS duration EOL

; --- Directive value syntax (Core) ------------------------

url-pattern     = 1*( VCHAR / UTF8-char-noctl )
host-pattern    = 1*( ALPHA / DIGIT / "-" / "." / UTF8-char-noctl )
method-list     = method *( *WS "," *WS method )
method          = "GET" / "HEAD" / "POST" / "PUT" /
                  "DELETE" / "PATCH" / "OPTIONS" /
                  "TRACE" / "CONNECT"
purpose-list    = purpose-token *( *WS "," *WS purpose-token )
purpose-token   = 1*VCHAR   ; placeholder for future vocabulary
product-token   = identifier / "*"
identifier      = 1*( %x2D / %x41-5A / %x5F / %x61-7A )

; --- Directive value syntax (Extension) -------------------

rate-spec       = count "/" time-unit
count           = 1*DIGIT
time-unit       = "second" / "minute" / "hour" / "day"

automation-list = *( automation-token *( *WS "," *WS automation-token ) )
automation-token= 1*VCHAR ; e.g., "cdp", "headless", "selenium"

api-automation-value = "none" / "with-key-only" / "open"

allow-xhr-value = "none" / "read-only" / "open"

url-pattern-list= url-pattern *( *WS "," *WS url-pattern )

boolean         = "true" / "false"

session-validation-value = "cookie-based" / "token-based" / "oauth" / "none"

duration        = 1*DIGIT time-unit-char
time-unit-char  = "s" / "m" / "h" / "d"  ; s=second, m=minute,
                                         ; h=hour, d=day

; --- Lexical primitives (from CORE-SPEC) ------------------

comment         = "#" *( UTF8-char-noctl / WS / "#" )

emptyline       = *WS [comment] EOL
EOL             = *WS [comment] NL
NL              = CRLF / LF / CR
CRLF            = CR LF
CR              = %x0D
LF              = %x0A
WS              = SP / HTAB
SP              = %x20
HTAB            = %x09

; --- Core ABNF terminals (RFC 5234) -----------------------

ALPHA           = %x41-5A / %x61-7A
DIGIT           = %x30-39
VCHAR           = %x21-7E

; --- UTF-8 (derived from RFC 3629) ------------------------

UTF8-char-noctl = UTF8-1-noctl / UTF8-2 / UTF8-3 / UTF8-4
UTF8-1-noctl    = %x21 / %x22 / %x24-7F
UTF8-2          = %xC2-DF UTF8-tail
UTF8-3          = %xE0 %xA0-BF UTF8-tail
                / %xE1-EC UTF8-tail-2
                / %xED %x80-9F UTF8-tail
                / %xEE-EF UTF8-tail-2
UTF8-4          = %xF0 %x90-BF UTF8-tail-2
                / %xF1-F3 UTF8-tail-3
                / %xF4 %x80-8F UTF8-tail-2
UTF8-tail       = %x80-BF
UTF8-tail-2     = UTF8-tail UTF8-tail
UTF8-tail-3     = UTF8-tail UTF8-tail UTF8-tail

</sourcecode>
    </section>
    
    <section anchor="backward-compatibility">
      <name>Backward Compatibility</name>
      <t>All directives defined in this document are <bcp14>OPTIONAL</bcp14>. 
      Implementations that support only the core specification can safely ignore these directives.</t>
      
      <t>Implementations supporting these extensions <bcp14>SHOULD</bcp14> degrade gracefully when
      interacting with servers or clients that support only the core specification.</t>
      
      <ul spacing="normal">
        <li>
          <t>Servers supporting extensions <bcp14>SHOULD</bcp14> still process all core directives
          correctly, even if extended directives are also present.</t>
        </li>
        <li>
          <t>Clients supporting extensions <bcp14>SHOULD</bcp14> still honor all core directives, even
          if they do not recognize extended directives in a file.</t>
        </li>
        <li>
          <t>When HTML asset annotations are not supported by a client, the client <bcp14>SHOULD</bcp14>
          fall back to the site-level <tt>automation-preferences.txt</tt> file for guidance.</t>
        </li>
      </ul>
    </section>
    
    <section anchor="implementation-and-enforcement">
      <name>Implementation and Enforcement</name>
      <t>Servers implementing the extensions defined in this document <bcp14>SHOULD</bcp14>:</t>
      
      <ul spacing="normal">
        <li>
          <t>Employ detection mechanisms (e.g., CDP fingerprinting, headless browser
          detection) to identify automated clients using specific technologies.</t>
        </li>
        <li>
          <t>Implement rate limiting according to the specified directives.</t>
        </li>
        <li>
          <t>Validate sessions as required by the session requirement directives.</t>
        </li>
        <li>
          <t>Process HTML asset annotations when interpreting automation policies for
          specific content.</t>
        </li>
        <li>
          <t>Respond with appropriate HTTP status codes <xref target="RFC9110"/> for non-compliant requests,
          such as:</t>
          <ul spacing="normal">
            <li>
              <t>429 Too Many Requests for rate limit violations.</t>
            </li>
            <li>
              <t>403 Forbidden for unauthorized automation technology use.</t>
            </li>
            <li>
              <t>401 Unauthorized for missing or invalid authentication.</t>
            </li>
          </ul>
        </li>
      </ul>
      
      <t>Clients supporting these extensions <bcp14>SHOULD</bcp14>:</t>
      
      <ul spacing="normal">
        <li>
          <t>Honor rate limiting directives by self-throttling requests.</t>
        </li>
        <li>
          <t>Respect automation technology restrictions by only using tools listed in the <tt>allowed-automations</tt> directive, if present.</t>
        </li>
        <li>
          <t>Adhere to API and XHR permissions as specified (<tt>api-automation</tt>, <tt>allow-xhr</tt>, <tt>disallow-fetch-from</tt>).</t>
        </li>
        <li>
          <t>Establish and maintain valid sessions when required (<tt>require-human-initiated-session</tt>, <tt>session-validation</tt>, <tt>session-ttl</tt>).</t>
        </li>
        <li>
          <t>Parse and respect HTML asset annotations when present.</t>
        </li>
      </ul>
      
      <t>Both servers and clients <bcp14>MAY</bcp14> implement additional detection and enforcement
      mechanisms beyond those explicitly described in this document, as long as they
      maintain compatibility with the specified directives.</t>
    </section>
    
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>In addition to the security considerations mentioned in <xref target="CORE-SPEC"/>,
      the extensions defined in this document introduce the following considerations:</t>
      
      <ul spacing="normal">
        <li>
          <t>Rate Limiting: Implementations of rate limiting <bcp14>SHOULD</bcp14> use secure methods
          to track request counts and prevent circumvention through IP spoofing or
          other means.</t>
        </li>
        <li>
          <t>Technology Detection: Methods used to detect specific automation
          technologies can be circumvented by sophisticated clients. Servers <bcp14>SHOULD</bcp14>
          employ multiple detection approaches and adapt to evolving evasion techniques.</t>
        </li>
        <li>
          <t>Session Validation: Session validation mechanisms <bcp14>SHOULD</bcp14> be resistant to
          replay attacks and session hijacking attempts.</t>
        </li>
        <li>
          <t>HTML Asset Annotations: Parsing of JSON-LD annotations <bcp14>MUST</bcp14> be performed
          securely to prevent injection attacks or denial-of-service through malformed
          input.</t>
        </li>
      </ul>
    </section>
    
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>This document has no IANA actions.</t>
    </section>
    
  </middle>
  
  <back>
    <references>
      <name>References</name>
      
      <references anchor="normative">
        <name>Normative References</name>
        <reference anchor="RFC2119">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author initials="S." surname="Bradner" fullname="Scott Bradner">
              <organization>Harvard University</organization>
            </author>
            <date year="1997" month="March" />
          </front>
          <seriesInfo name="BCP" value="14" />
          <seriesInfo name="RFC" value="2119" />
          <seriesInfo name="DOI" value="10.17487/RFC2119" />
        </reference>
        <reference anchor="RFC8174">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author initials="B." surname="Leiba" fullname="Barry Leiba">
              <organization>Huawei Technologies</organization>
            </author>
            <date year="2017" month="May" />
          </front>
          <seriesInfo name="BCP" value="14" />
          <seriesInfo name="RFC" value="8174" />
          <seriesInfo name="DOI" value="10.17487/RFC8174" />
        </reference>
        <reference anchor="CORE-SPEC">
          <front>
            <title>Protocol for Automation Control</title>
            <author initials="P." surname="Liao" fullname="Liao Peiyuan">
              <organization>Condé Nast</organization>
            </author>
            <date year="2025" month="April" />
          </front>
          <seriesInfo name="Internet-Draft" value="draft-liao-aipref-autoctl-core-01" />
        </reference>
      </references>
      
      <references anchor="informative">
        <name>Informative References</name>
        <reference anchor="JSON-LD11"
          target="https://www.w3.org/TR/json-ld11/">
          <front>
            <title>JSON-LD 1.1</title>
            <author initials="G." surname="Kellogg" fullname="Gregg Kellogg"/>
            <author initials="P.-A." surname="Champin" fullname="Pierre-Antoine Champin"/>
            <author initials="D." surname="Longley" fullname="Dave Longley"/>
            <date year="2020" month="July" day="16"/>
          </front>
          <seriesInfo name="W3C Recommendation" value="REC-json-ld11-20200716"/>
        </reference>
         <reference anchor="WEBDRIVER" target="https://www.w3.org/TR/webdriver/">
          <front>
            <title>WebDriver</title>
            <author><organization>W3C</organization></author>
            <date year="2018"/>
          </front>
        </reference>
        <reference anchor="CDP" target="https://chromedevtools.github.io/devtools-protocol/">
          <front>
            <title>Chrome DevTools Protocol</title>
            <author><organization>Google</organization></author>
            <date year="2025"/>
          </front>
        </reference>
        <reference anchor="WKREMOTE" target="https://webkit.org/debugging-webkit/">
          <front>
            <title>WebKit Remote Debugging Protocol</title>
            <author><organization>WebKit Project</organization></author>
            <date year="2015"/>
          </front>
        </reference>
        <reference anchor="FFREMOTE" target="https://firefox-source-docs.mozilla.org/testing/geckodriver/index.html">
          <front>
            <title>GeckoDriver Remote Protocol</title>
            <author><organization>Mozilla</organization></author>
            <date year="2025"/>
          </front>
        </reference>
        <reference anchor="HEADLESS" target="https://developer.chrome.com/docs/chromium/headless">
          <front>
            <title>Chrome Headless Mode</title>
            <author><organization>Google</organization></author>
            <date year="2024"/>
          </front>
        </reference>
        <reference anchor="RFC9110" target="https://www.rfc-editor.org/info/rfc9110" quoteTitle="true" derivedAnchor="RFC9110">
          <front>
            <title>HTTP Semantics</title>
            <author fullname="R. Fielding" initials="R." role="editor" surname="Fielding"/>
            <author fullname="M. Nottingham" initials="M." role="editor" surname="Nottingham"/>
            <author fullname="J. Reschke" initials="J." role="editor" surname="Reschke"/>
            <date month="June" year="2022"/>
          </front>
          <seriesInfo name="STD" value="97"/>
          <seriesInfo name="RFC" value="9110"/>
          <seriesInfo name="DOI" value="10.17487/RFC9110"/>
        </reference>
      </references>
    </references>
    
    <section numbered="false" anchor="sample-extended-automation-preferences-txt-file">
      <name>Sample Extended automation-preferences.txt File</name>
      <t>The following is an example of an <tt>automation-preferences.txt</tt> file that includes
      both core and extended directives:</t>
      
      <figure>
        <artwork><![CDATA[
<!-- Automation preferences for example.com -->
<!-- Version: 2.0 (incorporating extensions) -->
<!-- Last updated: 2025-04-20 -->

<!-- Group 1: Applies to the entire site for all user agents -->
user-agent: *
host: example.com
scope: /
allowed-methods: GET, HEAD
allowed-purposes: PLACEHOLDER_PURPOSE1, PLACEHOLDER_PURPOSE2

<!-- Extended directives for Group 1 -->
request-limit: 60/minute
concurrent-limit: 5
<!-- Empty - forbids all automation technologies -->
allowed-automations: 
api-automation: with-key-only
require-human-initiated-session: true
session-validation: cookie-based
session-ttl: 1h


<!-- Group 2: Specific preferences for the /admin/ path for ExampleBot -->
user-agent: ExampleBot
host: example.com
scope: /admin/
allowed-methods: GET
allowed-purposes: PLACEHOLDER_PURPOSE1

<!-- Extended directives for admin path (Group 2) -->
request-limit: 10/minute
concurrent-limit: 2
require-human-initiated-session: true
session-validation: token-based
session-ttl: 30m


<!-- Group 3: Default for /admin/ for other user agents (less specific than Group 2) -->
user-agent: *
host: example.com
scope: /admin/
allowed-methods: GET
        ]]></artwork>
      </figure>
    </section>
  </back>
</rfc>