<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE rfc SYSTEM "rfc2629-xhtml.ent">
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" category="std" docName="draft-kanojia-creduent-agent-uri-00" ipr="trust200902" submissionType="IETF" xml:lang="en" version="3">
  <front>
    <title abbrev="agent URI and Attestation">The 'agent' Uniform Resource Identifier (URI) Scheme and Cryptographic Attestation Protocol</title>
    <seriesInfo name="Internet-Draft" value="draft-kanojia-creduent-agent-uri-00"/>
    <author fullname="Kashish Kanojia" initials="K." surname="Kanojia">
      <organization>IDevSec</organization>
      <address>
        <email>kashish@idevsec.com</email>
        <uri>https://idevsec.com</uri>
      </address>
    </author>
    <date year="2026" month="September" day="2"/>
    <area>Security</area>
    <workgroup>Network Working Group</workgroup>
    <keyword>agent</keyword>
    <keyword>URI</keyword>
    <keyword>Ed25519</keyword>
    <keyword>Creduent</keyword>
    <keyword>JCS</keyword>
    <abstract>
      <t>This document specifies the 'agent' Uniform Resource Identifier (URI) scheme and its associated cryptographic attestation protocol. The 'agent' scheme defines a transport-agnostic, cryptographically verifiable addressing layer for identifying autonomous software agents, binding domain ownership via DNS TXT records, enforcing instruction integrity, and validating attenuated capability delegation tokens.</t>
    </abstract>
  </front>
  <middle>
    <section anchor="introduction">
      <name>Introduction</name>
      <section anchor="problem-statement">
        <name>Problem Statement</name>
        <t>Autonomous software agents operating across distributed multi-cloud networks, model contexts, and tool environments require a unified, cryptographically secure identity layer. Existing network addressing schemes (HTTP URLs, gRPC endpoints) route traffic to server hosts, but fail to verify:</t>
        <ol spacing="normal" type="1">
          <li>Whether the remote software process possesses a verified cryptographic key pair.</li>
          <li>Whether the agent's domain identity matches DNS infrastructure ownership.</li>
          <li>Whether active system prompts and tool capabilities have been tampered with.</li>
          <li>Whether sub-agent tasks carry valid, scope-restricted delegation tokens.</li>
        </ol>
      </section>
      <section anchor="protocol-goals">
        <name>Protocol Goals</name>
        <t>The Creduent protocol specifies the 'agent' URI scheme to establish a verifiable trust root for software agents. The protocol provides:</t>
        <ul spacing="normal">
          <li>Deterministic resolution from 'agent://' URIs to signed identity documents.</li>
          <li>Cryptographic key binding using Ed25519 digital signatures and JCS.</li>
          <li>Domain-level ownership validation via DNS TXT records.</li>
          <li>Attenuated capability delegation via Creduent Delegation Tokens (CDT).</li>
        </ul>
      </section>
    </section>

    <section anchor="terminology-and-conventions">
      <name>Terminology and Conventions</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>
      <ul spacing="normal">
        <li><strong>Agent Identity:</strong> An Ed25519 public key pair uniquely bound to an autonomous agent.</li>
        <li><strong>agent.json:</strong> A JSON document canonicalized per RFC 8785 containing public keys, capabilities, and owner metadata.</li>
        <li><strong>Authority:</strong> The domain name or host portion of an 'agent' URI responsible for identity resolution.</li>
        <li><strong>Attestation:</strong> A cryptographically signed assertion issued by an authoritative registry validating DNS ownership.</li>
      </ul>
    </section>

    <section anchor="uri-scheme-specification">
      <name>URI Scheme Specification</name>
      <section anchor="abnf-syntax-definition">
        <name>ABNF Syntax Definition</name>
        <t>The 'agent' URI scheme is specified using Augmented Backus-Naur Form (ABNF) as defined in <xref target="RFC5234"/>.</t>
        <artwork align="left" name="" type="" xml:space="preserve"><![CDATA[
agent-URI       = "agent://" agent-authority "/" agent-path
                  [ "?" query ] [ "#" fragment ]

agent-authority = host [ ":" port ]
host            = IP-literal / IPv4address / reg-name
agent-path      = segment-nz *( "/" segment )

segment-nz      = 1*pchar
segment         = *pchar
pchar           = unreserved / pct-encoded / sub-delims / ":" / "@"
unreserved      = ALPHA / DIGIT / "-" / "." / "_" / "~"
]]></artwork>
      </section>
      <section anchor="uri-normalization-and-canonicalization">
        <name>URI Normalization and Canonicalization</name>
        <t>Implementations <bcp14>MUST</bcp14> normalize 'agent' URIs prior to signature validation:</t>
        <ul spacing="normal">
          <li>Scheme names <bcp14>MUST</bcp14> be converted to lowercase ("agent://").</li>
          <li>Hostnames <bcp14>MUST</bcp14> be converted to lowercase per Internationalized Domain Names rules.</li>
          <li>Default ports (if specified) <bcp14>MUST</bcp14> be removed.</li>
        </ul>
      </section>
      <section anchor="example-uris">
        <name>Example URIs</name>
        <artwork align="left" name="" type="" xml:space="preserve"><![CDATA[
agent://example.com/finance/payroll-bot
agent://registry.idevsec.com/agents/audit-verifier
agent://192.168.1.100:8443/local-agent
]]></artwork>
      </section>
    </section>

    <section anchor="cryptographic-identity-document-format-agentjson">
      <name>Cryptographic Identity Document Format (agent.json)</name>
      <section anchor="field-definitions">
        <name>Field Definitions</name>
        <t>The identity payload <bcp14>MUST</bcp14> contain the following top-level JSON fields:</t>
        <ul spacing="normal">
          <li><strong>version</strong> (string, <bcp14>REQUIRED</bcp14>): Protocol version identifier (e.g. "2.0").</li>
          <li><strong>agent_id</strong> (string, <bcp14>REQUIRED</bcp14>): The absolute 'agent://' URI of the agent.</li>
          <li><strong>name</strong> (string, <bcp14>REQUIRED</bcp14>): Human-readable name of the agent.</li>
          <li><strong>owner</strong> (string, <bcp14>REQUIRED</bcp14>): Contact URI or email of the controlling entity.</li>
          <li><strong>keys</strong> (array, <bcp14>REQUIRED</bcp14>): List of public key objects (id, type, publicKeyMultibase).</li>
          <li><strong>capabilities</strong> (array, <bcp14>OPTIONAL</bcp14>): List of declared tool and API permissions.</li>
          <li><strong>signature</strong> (object, <bcp14>REQUIRED</bcp14>): Signature envelope object (type, created, verificationMethod, proofValue).</li>
        </ul>
      </section>
      <section anchor="jcs-processing">
        <name>JSON Canonicalization Scheme (JCS) Processing</name>
        <t>To generate or verify signatures, the document <bcp14>MUST</bcp14> be canonicalized using JCS <xref target="RFC8785"/>:</t>
        <ol spacing="normal" type="1">
          <li>Remove the "signature" key-value pair from the document.</li>
          <li>Sort object keys lexicographically by Unicode code point values.</li>
          <li>Serialize strings using UTF-8 encoding without whitespace between elements.</li>
          <li>Represent numbers according to IEEE 754 double precision without trailing zeroes.</li>
        </ol>
      </section>
      <section anchor="ed25519-signature-generation">
        <name>Ed25519 Signature Generation and Validation</name>
        <t>Signatures <bcp14>MUST</bcp14> be generated using Ed25519 <xref target="RFC8032"/> over the UTF-8 bytes of the canonicalized JCS document:</t>
        <artwork align="left" name="" type="" xml:space="preserve"><![CDATA[
signature_bytes = Ed25519_Sign(private_key,
                               JCS_Canonicalize(document))
]]></artwork>
      </section>
      <section anchor="complete-example-document">
        <name>Complete Example Document</name>
        <artwork align="left" name="" type="" xml:space="preserve"><![CDATA[
{
  "version": "2.0",
  "agent_id": "agent://example.com/auditor",
  "name": "Financial Compliance Agent",
  "owner": "mailto:security@example.com",
  "keys": [
    {
      "id": "agent://example.com/auditor#key-1",
      "type": "Ed25519VerificationKey2020",
      "publicKeyMultibase": "z6MkpTHR8VNsBxYAAWHuTnGd28N5Kjd8"
    }
  ],
  "capabilities": [
    "ledger:read",
    "reports:generate"
  ],
  "signature": {
    "type": "Ed25519Signature2020",
    "created": "2026-08-09T12:00:00Z",
    "verificationMethod": "agent://example.com/auditor#key-1",
    "proofValue": "kB84j2...b9x0A=="
  }
}
]]></artwork>
      </section>
    </section>

    <section anchor="resolution-and-verification-architecture">
      <name>Resolution and Verification Architecture</name>
      <section anchor="resolution-algorithm">
        <name>Resolution Algorithm</name>
        <t>When resolving an 'agent' URI (e.g. "agent://example.com/auditor"), clients <bcp14>MUST</bcp14>:</t>
        <ol spacing="normal" type="1">
          <li>Construct HTTP Endpoint: Issue an HTTPS GET request to https://example.com/.well-known/agent.json</li>
          <li>Parse and Validate Schema: Parse the JSON response and confirm all required fields.</li>
          <li>Verify JCS Signature: Execute the signature validation steps in Section 4.3.</li>
          <li>Perform DNS Ownership Check: Verify domain key records per Section 5.2.</li>
        </ol>
      </section>
      <section anchor="dns-txt-ownership-verification">
        <name>DNS TXT Ownership Verification</name>
        <t>To prevent identity spoofing, the domain owner <bcp14>MUST</bcp14> publish a DNS TXT record at _creduent.&lt;authority&gt;.</t>
        <artwork align="left" name="" type="" xml:space="preserve"><![CDATA[
_creduent.example.com. IN TXT
  "v=CRE1; k=ed25519; p=z6MkpTHR8VNsBxYAAWHuTnGd28N5Kjd8"
]]></artwork>
        <t>Clients <bcp14>MUST</bcp14> match the public key in the DNS TXT record against the public key used to sign the agent.json document.</t>
      </section>
      <section anchor="registry-attestation-verification">
        <name>Registry Attestation Verification</name>
        <t>Registries acting as third-party identity checkers issue signed attestations containing agent_id, DNS TXT verification status (PASS/FAIL), and expiration timestamps.</t>
      </section>
    </section>

    <section anchor="delegation-tokens-and-capability-attenuation-cdt">
      <name>Delegation Tokens and Capability Attenuation (CDT)</name>
      <section anchor="token-payload-format">
        <name>Token Payload Format</name>
        <t>Parent agents delegating authority to child sub-agents <bcp14>MUST</bcp14> issue a Creduent Delegation Token (CDT / CREDUENT-007):</t>
        <artwork align="left" name="" type="" xml:space="preserve"><![CDATA[
{
  "iss": "agent://example.com/parent-agent",
  "sub": "agent://example.com/child-worker",
  "aud": "agent://target-service.com/api",
  "exp": 1786276800,
  "capabilities": [
    "db:read:readonly_table"
  ],
  "depth_limit": 2
}
]]></artwork>
      </section>
      <section anchor="recursive-delegation-chain-validation">
        <name>Recursive Delegation Chain Validation</name>
        <t>Verifying endpoints receiving a delegation chain <bcp14>MUST</bcp14> recursively validate Ed25519 signatures, capability subset constraints, and depth limit thresholds.</t>
      </section>
    </section>

    <section anchor="prompt-integrity-and-action-reversibility-creduent-006">
      <name>Prompt Integrity and Action Reversibility (CREDUENT-006)</name>
      <section anchor="instruction-hashing">
        <name>Instruction Hashing</name>
        <t>Agents <bcp14>MAY</bcp14> publish an instruction hash in execution headers: X-Creduent-Instruction-Hash: SHA256(canonical_system_prompt)</t>
      </section>
      <section anchor="reversibility-classifications">
        <name>Reversibility Classifications (AISVS C9.2.3)</name>
        <t>Actions <bcp14>MUST</bcp14> specify a reversibility classification aligned with OWASP AISVS C9.2.3: read-only, reversible, external-reversible, irreversible.</t>
      </section>
      <section anchor="ledger-hash-chain-receipts">
        <name>Ledger Hash-Chain Receipts</name>
        <t>Multi-step agent action chains <bcp14>MUST</bcp14> commit cryptographic step receipts to the registry ledger.</t>
      </section>
    </section>

    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <section anchor="uri-scheme-registration-template">
        <name>URI Scheme Registration Template</name>
        <t>The 'agent' URI scheme registration follows the guidelines defined in BCP 35 <xref target="RFC7595"/>.</t>
        <artwork align="left" name="" type="" xml:space="preserve"><![CDATA[
Scheme name:
   agent

Status:
   Permanent

Applications:
   Autonomous AI agent systems, MCP hosts, microservice swarms.

Contact:
   Kashish Kanojia <kashish@idevsec.com>

Change controller:
   IETF / Creduent Protocol Working Group

References:
   draft-kanojia-creduent-agent-uri-00
]]></artwork>
      </section>
    </section>

    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <section anchor="threat-model">
        <name>Threat Model</name>
        <t>The protocol protects against Identity Spoofing, Privilege Escalation, and Execution History Tampering.</t>
      </section>
      <section anchor="mitigation-of-replay-and-downgrade-attacks">
        <name>Mitigation of Replay and Downgrade Attacks</name>
        <t>Verifying endpoints <bcp14>MUST</bcp14> reject attestations with expired timestamps. HTTP connections without TLS 1.3 <bcp14>MUST</bcp14> be refused.</t>
      </section>
      <section anchor="key-revocation-and-out-of-band-recovery">
        <name>Key Revocation and Out-of-Band Recovery</name>
        <t>In case of key compromise, domain owners <bcp14>MUST</bcp14> update the _creduent DNS TXT record with a new key hash. Registries <bcp14>MUST</bcp14> invalidate revoked public keys within 300 seconds.</t>
      </section>
    </section>
  </middle>

  <back>
    <references>
      <name>Normative References</name>
      <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119">
        <front>
          <title>Key words for use in RFCs to Indicate Requirement Levels</title>
          <author initials="S." surname="Bradner"/>
          <date month="March" year="1997"/>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="2119"/>
      </reference>
      <reference anchor="RFC5234" target="https://www.rfc-editor.org/info/rfc5234">
        <front>
          <title>Augmented BNF for Syntax Specifications: ABNF</title>
          <author initials="D." surname="Crocker" role="editor"/>
          <author initials="P." surname="Overell"/>
          <date month="January" year="2008"/>
        </front>
        <seriesInfo name="STD" value="68"/>
        <seriesInfo name="RFC" value="5234"/>
      </reference>
      <reference anchor="RFC7595" target="https://www.rfc-editor.org/info/rfc7595">
        <front>
          <title>Guidelines and Procedures for Registration of URI Schemes</title>
          <author initials="D." surname="Thaler" role="editor"/>
          <date month="June" year="2015"/>
        </front>
        <seriesInfo name="BCP" value="35"/>
        <seriesInfo name="RFC" value="7595"/>
      </reference>
      <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174">
        <front>
          <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
          <author initials="B." surname="Leiba"/>
          <date month="May" year="2017"/>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="8174"/>
      </reference>
    </references>
    <references>
      <name>Informative References</name>
      <reference anchor="RFC8032" target="https://www.rfc-editor.org/info/rfc8032">
        <front>
          <title>Edwards-Curve Digital Signature Algorithm (Ed25519)</title>
          <author initials="S." surname="Josefsson"/>
          <author initials="I." surname="Liusvaara"/>
          <date month="January" year="2017"/>
        </front>
        <seriesInfo name="RFC" value="8032"/>
      </reference>
      <reference anchor="RFC8785" target="https://www.rfc-editor.org/info/rfc8785">
        <front>
          <title>JSON Canonicalization Scheme (JCS)</title>
          <author initials="A." surname="Rundgren"/>
          <date month="June" year="2020"/>
        </front>
        <seriesInfo name="RFC" value="8785"/>
      </reference>
    </references>
  </back>
</rfc>
