<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc compact="yes"?>
<?rfc strict="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc toc="yes"?>
<?rfc tocdepth="2"?>
<?rfc rfcsubcompact="no"?>
<?rfc rfcedstyle="yes"?>

<rfc category="std" number="7565" ipr="trust200902" submissionType="IETF" consensus="yes">

  <front>
    <title abbrev="The 'acct' URI Scheme">The 'acct' URI Scheme</title>
    <author initials="P." surname="Saint-Andre" fullname="Peter Saint-Andre">
      <organization/>
      <address>
        <email>peter@andyet.com</email>
       <uri>https://andyet.com/</uri>
      </address>
    </author>

    <date month="May" year="2015"/>

    <keyword>Uniform Resource Identifier</keyword>
    <keyword>URI</keyword>

    <abstract>
      <t>This document defines the 'acct' Uniform Resource Identifier (URI)
      scheme as a way to identify a user's account at a service provider,
      irrespective of the particular protocols that can be used to
      interact with the account.</t>
    </abstract>
  </front>

  <middle>

    <section title="Introduction" anchor="intro">
      <t>Existing Uniform Resource Identifier (URI) schemes that enable
      interaction with, or that identify resources associated with, a user's
      account at a service provider are tied to particular services or
      application protocols.  Two examples are the 'mailto' scheme (which
      enables interaction with a user's email account) and the 'http' scheme
      (which enables retrieval of web files controlled by a user or
      interaction with interfaces providing information about a user).
      However, there exists no URI scheme that generically identifies a user's
      account at a service provider without specifying a particular protocol
      to use when interacting with the account.  This specification fills that
      gap.</t>

    </section>

    <section title="Terminology" anchor="terms">
      <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 <xref
      target='RFC2119'/>.</t>

    </section>

    <section title="Rationale" anchor="rationale">
      <t>During formalization of the WebFinger protocol <xref
      target='RFC7033'/>, much discussion occurred regarding the appropriate
      URI scheme to include when specifying a user's account as a web link
      <xref target='RFC5988'/>.  Although both the 'mailto' <xref
      target='RFC6068'/> and 'http' <xref target='RFC7230'/> schemes were
      proposed, not all service providers offer email services or web
      interfaces on behalf of user accounts (e.g., a microblogging or instant
      messaging provider might not offer email services, or an enterprise
      might not offer HTTP interfaces to information about its employees).
      Therefore, the participants in the discussion recognized that it would
      be helpful to define a URI scheme that could be used to generically
      identify a user's account at a service provider, irrespective of the
      particular application protocols used to interact with the account.  The
      result was the 'acct' URI scheme defined in this document.</t>

      <t>(Note that a user is not necessarily a human; it could be an
      automated application such as a bot, a role-based alias, etc.  However,
      an 'acct' URI is always used to identify something that has
      an account at a service, not the service itself.)</t>

    </section>

    <section title="Definition" anchor="definition">
      <t>The syntax of the 'acct' URI scheme is defined under <xref
      target='iana'/> of this document.  Although 'acct' URIs take
      the form "user@host", the scheme is designed for the purpose of
      identification instead of interaction (regarding this distinction, see
      Section 1.2.2 of <xref target="RFC3986"/>).  The "Internet resource"
      identified by an 'acct' URI is a user's account hosted at a
      service provider, where the service provider is typically associated
      with a DNS domain name.  Thus, a particular 'acct' URI is
      formed by setting the "user" portion to the user's account name at
      the service provider and by setting the "host" portion to the DNS
      domain name of the service provider.</t>

      <t>Consider the case of a user with an account name of "foobar" on a
      microblogging service "status.example.net".  It is taken as convention
      that the string "foobar@status.example.net" designates that account.
      This is expressed as a URI using the 'acct' scheme as
      "acct:foobar@status.example.net".</t>

      <t>A common scenario is for a user to register with a service provider
      using an identifier (such as an email address) that is associated with
      some other service provider.  For example, a user with the email address
      "juliet@capulet.example" might register with a commerce website whose
      domain name is "shoppingsite.example".  In order to use her email
      address as the localpart of the 'acct' URI, the at-sign character
      (U+0040) needs to be percent-encoded as described in <xref
      target='RFC3986'/>.  Thus, the resulting 'acct' URI would be
      "acct:juliet%40capulet.example@shoppingsite.example".</t>

      <t>It is not assumed that an entity will necessarily be able to interact
      with a user's account using any particular application protocol, such as
      email; to enable such interaction, an entity would need to use the
      appropriate URI scheme for such a protocol, such as the 'mailto' scheme.
      While it might be true that the 'acct' URI minus the scheme name (e.g.,
      "user@example.com" derived from "acct:user@example.com") can be reached
      via email or some other application protocol, that fact would be purely
      contingent and dependent upon the deployment practices of the
      provider.</t>

      <t>Because an 'acct' URI enables abstract identification only and not
      interaction, this specification provides no method for dereferencing an
      'acct' URI on its own, e.g., as the value of the 'href' attribute of an
      HTML anchor element.  For example, there is no behavior specified in
      this document for an 'acct' URI used as follows:</t>

      <figure>
        <artwork><![CDATA[
<a href='acct:bob@example.com'>find out more</a>
        ]]></artwork>
      </figure>

      <t>Any protocol that uses 'acct' URIs is responsible for specifying how
      an 'acct' URI is employed in the context of that protocol (in
      particular, how it is dereferenced or resolved; see <xref
      target='RFC3986'/>).  As a concrete example, an "Account Information"
      application of the WebFinger protocol <xref target='RFC7033'/> might
      take an 'acct' URI, resolve the host portion to find a WebFinger server,
      and then pass the 'acct' URI as a parameter in a WebFinger HTTP request
      for metadata (i.e., web links <xref target='RFC5988'/>) about the
      resource.  For example:</t>

      <figure>
        <artwork><![CDATA[
GET /.well-known/webfinger?resource=acct%3Abob%40example.com HTTP/1.1
        ]]></artwork>
      </figure>
      <t>The service retrieves the metadata associated with the account
      identified by that URI and then provides that metadata to the requesting
      entity in an HTTP response.</t>

      <t>If an application needs to compare two 'acct' URIs (e.g., for
      purposes of authentication and authorization), it MUST do so using case
      normalization and percent-encoding normalization as specified in
      Sections 6.2.2.1 and 6.2.2.2 of <xref target='RFC3986'/>.</t>

    </section>

    <section title="Security Considerations" anchor="security">
      <t>Because the 'acct' URI scheme does not directly enable interaction
      with a user's account at a service provider, direct security concerns
      are minimized.</t>

      <t>However, an 'acct' URI does provide proof of existence of the
      account; this implies that harvesting published 'acct' URIs could prove
      useful to spammers and similar attackers -- for example, if they can
      use an 'acct' URI to leverage more information about the account (e.g.,
      via WebFinger) or if they can interact with protocol-specific URIs
      (such as 'mailto' URIs) whose user@host portion is the same as that of
      the 'acct' URI.</t>

      <t>In addition, protocols that make use of 'acct' URIs
      are responsible for defining security considerations related to
      such usage, e.g., the risks involved in dereferencing
      an 'acct' URI, the authentication and authorization
      methods that could be used to control access to personal data
      associated with a user&apos;s account at a service, and methods for
      ensuring the confidentiality of such information.</t>

      <t>The use of percent-encoding allows a wider range of characters in
      account names but introduces some additional risks.  Implementers are
      advised to disallow percent-encoded characters or sequences that would
      (1) result in space, null, control, or other characters that are
      otherwise forbidden, (2) allow unauthorized access to private data, or
      (3) lead to other security vulnerabilities.</t>

    </section>

    <section title="Internationalization Considerations" anchor="i18n">
      <t>As specified in <xref target='RFC3986'/>, the 'acct' URI scheme
      allows any character from the Unicode repertoire <xref
      target='Unicode'/> encoded as UTF-8 <xref target='RFC3629'/> and then
      percent-encoded into valid ASCII <xref target='RFC20'/>.  Before
      applying any percent-encoding, an application MUST ensure the following
      about the string that is used as input to the URI-construction
      process:</t>

      <t>
        <list style='symbols'>
          <t>The userpart consists only of Unicode code points that conform to
          the PRECIS IdentifierClass specified in <xref target='RFC7564'/>.</t>

          <t>The host consists only of Unicode code points that conform to the
          rules specified in <xref target='RFC5892'/>.</t>

          <t>Internationalized domain name (IDN) labels are encoded as
          A-labels <xref target='RFC5890'/>.</t>

        </list>
      </t>
    </section>

    <section title="IANA Considerations" anchor="iana">

      <t>In accordance with the guidelines and registration procedures for new
      URI schemes <xref target='RFC4395'/>, this section provides the
      information needed to register the 'acct' URI scheme.</t>

      <t><list style="hanging">
      <t hangText='URI Scheme Name:'>acct</t>

      <t hangText='Status:'>permanent</t>

      <t hangText='URI Scheme Syntax:'>The 'acct' URI syntax is
      defined here in Augmented Backus-Naur Form
      (ABNF) <xref target='RFC5234'/>, borrowing the 'host', 'pct-encoded',
      'sub-delims', and 'unreserved' rules from <xref target='RFC3986'/>:</t>
      </list></t>

        <figure>
          <artwork><![CDATA[
   acctURI      = "acct" ":" userpart "@" host
   userpart     = unreserved / sub-delims
                  0*( unreserved / pct-encoded / sub-delims )

   Note that additional rules regarding the strings that are used as
   input to construction of 'acct' URIs further limit the characters
   that can be percent-encoded; see the Encoding Considerations as
   well as Section 6 of this document.
        ]]></artwork>
        </figure>

      <t><list style='hanging'>
      <t hangText='URI Scheme Semantics:'>The 'acct' URI scheme
        identifies accounts hosted at service providers.
        It is used only for identification, not interaction.  A
        protocol that employs the 'acct' URI scheme is responsible for
        specifying how an 'acct' URI is dereferenced in the context of that
        protocol.  There is no media type associated with the 'acct' URI
        scheme.</t>

      <t hangText='Encoding Considerations:'>See <xref target="i18n"/>
      of this document.</t>

      <t hangText='Applications/Protocols That Use This URI Scheme Name:'>
        At the time of this writing, only the WebFinger protocol uses the
        'acct' URI scheme.  However, use is not restricted to the WebFinger
        protocol, and the scheme might be considered for use in other
        protocols.</t>

      <t hangText='Interoperability Considerations:'>There are no known
      interoperability concerns related to use of the 'acct' URI scheme.</t>

      <t hangText='Security Considerations:'>See <xref target="security"/> of
      this document.</t>

      <t hangText='Contact:'>Peter Saint-Andre, peter@andyet.com</t>

      <t hangText='Author/Change Controller:'>This scheme is registered
      under the IETF tree.  As such, the IETF maintains change control.</t>

      <t hangText='References:'>None.</t>
      </list></t>
    </section>

  </middle>

  <back>

    <references title="Normative References">

    <reference  anchor='RFC2119' target='http://www.rfc-editor.org/info/rfc2119'>
    <front>
    <title>Key words for use in RFCs to Indicate Requirement Levels</title>
    <author initials='S.' surname='Bradner' fullname='S. Bradner'><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'/>
    <format type='ASCII' octets='4723'/>
    </reference>
    <reference  anchor='RFC3629' target='http://www.rfc-editor.org/info/rfc3629'>
    <front>
    <title>UTF-8, a transformation format of ISO 10646</title>
    <author initials='F.' surname='Yergeau' fullname='F. Yergeau'><organization /></author>
    <date year='2003' month='November' />
    </front>
    <seriesInfo name='STD' value='63'/>
    <seriesInfo name='RFC' value='3629'/>
    <seriesInfo name='DOI' value='10.17487/RFC3629'/>
    <format type='ASCII' octets='33856'/>
    </reference>

    <reference  anchor='RFC3986' target='http://www.rfc-editor.org/info/rfc3986'>
    <front>
    <title>Uniform Resource Identifier (URI): Generic Syntax</title>
    <author initials='T.' surname='Berners-Lee' fullname='T. Berners-Lee'><organization /></author>
    <author initials='R.' surname='Fielding' fullname='R. Fielding'><organization /></author>
    <author initials='L.' surname='Masinter' fullname='L. Masinter'><organization /></author>
    <date year='2005' month='January' />
    </front>
    <seriesInfo name='STD' value='66'/>
    <seriesInfo name='RFC' value='3986'/>
    <seriesInfo name='DOI' value='10.17487/RFC3986'/>
    <format type='ASCII' octets='141811'/>
    </reference>

    <reference  anchor='RFC5234' target='http://www.rfc-editor.org/info/rfc5234'>
    <front>
    <title>Augmented BNF for Syntax Specifications: ABNF</title>
    <author initials='D.' surname='Crocker' fullname='D. Crocker' role='editor'><organization /></author>
    <author initials='P.' surname='Overell' fullname='P. Overell'><organization /></author>
    <date year='2008' month='January' />
    </front>
    <seriesInfo name='STD' value='68'/>
    <seriesInfo name='RFC' value='5234'/>
    <seriesInfo name='DOI' value='10.17487/RFC5234'/>
    <format type='ASCII' octets='26359'/>
    </reference>

    <reference  anchor='RFC5890' target='http://www.rfc-editor.org/info/rfc5890'>
    <front>
    <title>Internationalized Domain Names for Applications (IDNA): Definitions and Document Framework</title>
    <author initials='J.' surname='Klensin' fullname='J. Klensin'><organization /></author>
    <date year='2010' month='August' />
    </front>
    <seriesInfo name='RFC' value='5890'/>
    <seriesInfo name='DOI' value='10.17487/RFC5890'/>
    <format type='ASCII' octets='54245'/>
    </reference>

    <reference  anchor='RFC5892' target='http://www.rfc-editor.org/info/rfc5892'>
    <front>
    <title>The Unicode Code Points and Internationalized Domain Names for Applications (IDNA)</title>
    <author initials='P.' surname='Faltstrom' fullname='P. Faltstrom' role='editor'><organization /></author>
    <date year='2010' month='August' />
    </front>
    <seriesInfo name='RFC' value='5892'/>
    <seriesInfo name='DOI' value='10.17487/RFC5892'/>
    <format type='ASCII' octets='187370'/>
    </reference>

<!-- draft-ietf-precis-framework (RFC 7564) -->
<reference anchor='RFC7564' target="http://www.rfc-editor.org/info/rfc7564">
<front>
<title>PRECIS Framework: Preparation, Enforcement, and Comparison of
  Internationalized Strings in Application Protocols</title>
<author initials='P' surname='Saint-Andre' fullname='Peter Saint-Andre'>
</author>
<author initials='M' surname='Blanchet' fullname='Marc Blanchet'>
</author>
<date month='May' year='2015' />
</front>
<seriesInfo name='RFC' value='7564' />
<seriesInfo name='DOI' value='10.17487/RFC7564'/>
</reference>

<reference anchor="Unicode" target="http://www.unicode.org/versions/latest/">
  <front>
    <title>The Unicode Standard</title>
    <author>
      <organization>The Unicode Consortium</organization>
    </author>
<!--    <date year="2015-present" /> -->
  <date/>
  </front>
</reference>

    </references>

    <references title="Informative References">

    <reference  anchor='RFC20' target='http://www.rfc-editor.org/info/rfc20'>
    <front>
    <title>ASCII format for network interchange</title>
    <author initials='V.G.' surname='Cerf' fullname='V.G. Cerf'><organization /></author>
    <date year='1969' month='October' />
    </front>
    <seriesInfo name='STD' value='80'/>
    <seriesInfo name='RFC' value='20'/>
    <seriesInfo name='DOI' value='10.17487/RFC0020'/>
    <format type='ASCII, PDF' octets='18504, 197096'/>
    </reference>

    <reference  anchor='RFC7230' target='http://www.rfc-editor.org/info/rfc7230'>
    <front>
    <title>Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing</title>
    <author initials='R.' surname='Fielding' fullname='R. Fielding' role='editor'><organization /></author>
    <author initials='J.' surname='Reschke' fullname='J. Reschke' role='editor'><organization /></author>
    <date year='2014' month='June' />
    </front>
    <seriesInfo name='RFC' value='7230'/>
    <seriesInfo name='DOI' value='10.17487/RFC7230'/>
    <format type='ASCII' octets='205947'/>
    </reference>

    <reference  anchor='RFC4395' target='http://www.rfc-editor.org/info/rfc4395'>
    <front>
    <title>Guidelines and Registration Procedures for New URI Schemes</title>
    <author initials='T.' surname='Hansen' fullname='T. Hansen'><organization /></author>
    <author initials='T.' surname='Hardie' fullname='T. Hardie'><organization /></author>
    <author initials='L.' surname='Masinter' fullname='L. Masinter'><organization /></author>
    <date year='2006' month='February' />
    </front>
    <seriesInfo name='BCP' value='35'/>
    <seriesInfo name='RFC' value='4395'/>
    <seriesInfo name='DOI' value='10.17487/RFC4395'/>
    <format type='ASCII' octets='31933'/>
    </reference>

    <reference  anchor='RFC5988' target='http://www.rfc-editor.org/info/rfc5988'>
    <front>
    <title>Web Linking</title>
    <author initials='M.' surname='Nottingham' fullname='M. Nottingham'><organization /></author>
    <date year='2010' month='October' />
    </front>
    <seriesInfo name='RFC' value='5988'/>
    <seriesInfo name='DOI' value='10.17487/RFC5988'/>
    <format type='ASCII' octets='46834'/>
    </reference>

    <reference  anchor='RFC6068' target='http://www.rfc-editor.org/info/rfc6068'>
    <front>
    <title>The 'mailto' URI Scheme</title>
    <author initials='M.' surname='Duerst' fullname='M. Duerst'><organization /></author>
    <author initials='L.' surname='Masinter' fullname='L. Masinter'><organization /></author>
    <author initials='J.' surname='Zawinski' fullname='J. Zawinski'><organization /></author>
    <date year='2010' month='October' />
    </front>
    <seriesInfo name='RFC' value='6068'/>
    <seriesInfo name='DOI' value='10.17487/RFC6068'/>
    <format type='ASCII' octets='36683'/>
    </reference>

    <reference  anchor='RFC7033' target='http://www.rfc-editor.org/info/rfc7033'>
    <front>
    <title>WebFinger</title>
    <author initials='P.' surname='Jones' fullname='P. Jones'><organization /></author>
    <author initials='G.' surname='Salgueiro' fullname='G. Salgueiro'><organization /></author>
    <author initials='M.' surname='Jones' fullname='M. Jones'><organization /></author>
    <author initials='J.' surname='Smarr' fullname='J. Smarr'><organization /></author>
    <date year='2013' month='September' />
    </front>
    <seriesInfo name='RFC' value='7033'/>
    <seriesInfo name='DOI' value='10.17487/RFC7033'/>
    <format type='ASCII' octets='61552'/>
    </reference>

    </references>

    <section title="Acknowledgements" anchor="ack" numbered="no">
      <t>The 'acct' URI scheme was originally proposed during work on the
      WebFinger protocol; special thanks are due to Blaine Cook, Brad
      Fitzpatrick, and Eran Hammer-Lahav for their early work on the concept
      (which in turn was partially inspired by work on Extensible Resource
      Identifiers at OASIS).  The scheme was first formally specified in
      <xref target='RFC7033'/>; the authors of that specification (Paul Jones,
      Gonzalo Salgueiro, and Joseph Smarr) are gratefully acknowledged.
      Thanks are also due to Stephane Bortzmeyer, Melvin Carvalho, Martin
      Duerst, Graham Klyne, Barry Leiba, Subramanian Moonesamy, Evan
      Prodromou, James Snell, and various participants in the IETF APPSAWG for
      their feedback.  Meral Shirazipour completed a Gen-ART review.  Dave
      Cridland completed an AppsDir review and is gratefully acknowledged for
      providing proposed text that was incorporated into
      Sections&nbsp;<xref target="rationale" format="counter"/> and 
      <xref target="security" format="counter"/>.  IESG comments from
      Richard Barnes, Adrian Farrel, Stephen Farrell, Barry Leiba,
      Pete Resnick, and Sean Turner also led to improvements in the
      specification.</t>

    </section>

  </back>
</rfc>
