<?xml version='1.0' encoding='utf-8'?>
<?xml-model href="rfc7991bis.rnc"?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3"
  docName="draft-bunch-groupware-scopes-00" ipr="trust200902" submissionType="IETF"
  consensus="false" category="exp">

  <front>
    <title abbrev="OAuth Groupware Scopes">Standardized OAuth 2.0 Scopes for Mail, Calendar, and
      Contact Access</title>
    <author fullname="Clinton Bunch" initials="C" surname="Bunch">
      <organization>Emerald Groupware Project</organization>
      <address>
        <email>cdbunch@emeraldgroupware.org</email>
      </address>
    </author>
    <date year="2025" month="July" day="19" />
    <area>Security</area>
    <keyword>OAuth</keyword>
    <keyword>scope</keyword>
    <keyword>mail</keyword>
    <keyword>calendar</keyword>
    <keyword>contacts</keyword>
    <keyword>CalDAV</keyword>
    <keyword>CardDAV</keyword>
    <keyword>JMAP</keyword>
    <keyword>freebusy</keyword>

    <abstract>
      <t> The OAuth 2.0 authorization framework is widely used to provide clients with delegated
        access to user data. However, the core specification, The OAuth 2.0 Authorization Framework,
        leaves the
        definition of access scopes to individual service providers. This has led to a fragmented
        ecosystem for common groupware services (Mail, Calendaring, Contacts), where each provider
        uses proprietary, non-interoperable scope identifiers. Client applications, such as desktop
        mail clients, are forced to hardcode configurations for a small number of large providers,
        stifling innovation and harming open ecosystems. </t>
      <t>
        This document proposes a standardized set of scope values, using the IETF-controlled URN
        namespace, to represent granular and aggregate permissions for common mail
        (IMAP/POP/SMTP/JMAP), calendar (CalDAV), and contact (CardDAV) operations. Adopting these
        standard scopes would significantly improve interoperability between clients and servers,
        enabling automatic client configuration and a more seamless user experience.
      </t>
    </abstract>
  </front>

  <middle>
    <section anchor="intro" title="Introduction">
      <t> The OAuth 2.0 Authorization Framework <xref target="RFC6749" /> defines the "scope"
        parameter as a mechanism for limiting an application's access to a user's account. While
        effective, the lack of standardized scope values for fundamental internet services like
        email and calendaring has led to a situation where every major provider (Google, Microsoft,
        etc.) has defined their own proprietary scope URIs. </t>
      <t>
        This forces client implementers to create and maintain a hardcoded list of provider-specific
        configurations, creating a high barrier to entry for new service providers and preventing
        seamless discovery and configuration for end-users. A user of a new groupware server, for
        example, cannot expect their favorite desktop client to "just work."
      </t>
      <t> This document aims to rectify this by defining a set of common, interoperable scopes for
        groupware functions. These scopes are intended to be published by Authorization Servers in
        their metadata documents as defined in <xref target="RFC8414" />, allowing clients to
        discover them and request appropriate permissions dynamically. </t>
      <section anchor="reqs" 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, as shown here. </t>
      </section>
    </section>

    <section anchor="scopes" title="Proposed Groupware Scopes">
      <t> This specification proposes the following scope values. They are defined within the <tt>
        urn:ietf:params:oauth:scope</tt> namespace, which is the appropriate registry for
        IETF-defined OAuth parameters. </t>

      <section anchor="scopes-mail" title="Mail Scopes">
        <t>These scopes are intended to grant access to a user's mailbox via protocols such as IMAP <xref
            target="RFC9051" />, POP3 <xref target="RFC1939" />, or JMAP <xref target="RFC8620" /> <xref
            target="RFC8621" />, and to send mail via SMTP SUBMIT <xref target="RFC6409" />.</t>
        <dl spacing="compact">
          <dt>urn:ietf:params:oauth:scope:mail:read</dt>
          <dd>Grants read-only access to the user's email. This includes listing mailboxes, fetching
            messages and headers, and searching. It <bcp14>MUST NOT</bcp14> grant permission to
            modify or delete messages.</dd>
          <dt>urn:ietf:params:oauth:scope:mail:send</dt>
          <dd>Grants permission to send email on the user's behalf. This typically applies to SMTP
            SUBMIT or the JMAP equivalent.</dd>
          <dt>urn:ietf:params:oauth:scope:mail:modify</dt>
          <dd>Grants permission to modify and delete email. This includes actions such as setting
            flags (e.g., \Seen), moving messages between mailboxes, and expunging messages.</dd>
          <dt>urn:ietf:params:oauth:scope:mail</dt>
          <dd>An aggregate scope. Granting this scope <bcp14>MUST</bcp14> be considered equivalent
            to granting <tt>mail:read</tt>, <tt>mail:send</tt>, and <tt>mail:modify</tt>
            simultaneously. Clients needing full access <bcp14>SHOULD</bcp14> request this scope for
            simplicity.</dd>
        </dl>
      </section>

      <section anchor="scopes-calendar" title="Calendar Scopes">
        <t>These scopes are intended to grant access to a user's calendar data, typically via the
          CalDAV protocol <xref target="RFC4791" /> or a JMAP-for-Calendars equivalent.</t>
        <dl spacing="compact">
          <dt>urn:ietf:params:oauth:scope:calendar:freebusy</dt>
          <dd>Grants read-only access to a user's availability information (free/busy times). This
            scope <bcp14>MUST NOT</bcp14> grant access to sensitive event details such as summary,
            description, location, or attendees.</dd>

          <dt>urn:ietf:params:oauth:scope:calendar:read</dt>
          <dd>Grants read-only access to the user's calendars and the full details of all events.
            This scope implies the permissions of <tt>calendar:freebusy</tt>.</dd>

          <dt>urn:ietf:params:oauth:scope:calendar:update</dt>
          <dd>Grants permission to create, modify, and delete calendars and events on the user's
            behalf.</dd>

          <dt>urn:ietf:params:oauth:scope:calendar</dt>
          <dd>An aggregate scope. Granting this scope <bcp14>MUST</bcp14> be considered equivalent
            to granting <tt>calendar:freebusy</tt>, <tt>calendar:read</tt>, and <tt>calendar:update</tt>
            simultaneously.</dd>
        </dl>
      </section>

      <section anchor="scopes-contacts" title="Contacts Scopes">
        <t>These scopes are intended to grant access to a user's address book data, typically via
          the CardDAV protocol <xref target="RFC6352" /> or a JMAP-for-Contacts equivalent.</t>
        <dl spacing="compact">
          <dt>urn:ietf:params:oauth:scope:contacts:read</dt>
          <dd>Grants read-only access to the user's address books and contacts.</dd>
          <dt>urn:ietf:params:oauth:scope:contacts:update</dt>
          <dd>Grants permission to create, modify, and delete address books and contacts on the
            user's behalf.</dd>
          <dt>urn:ietf:params:oauth:scope:contacts</dt>
          <dd>An aggregate scope. Granting this scope <bcp14>MUST</bcp14> be considered equivalent
            to granting <tt>contacts:read</tt> and <tt>contacts:update</tt> simultaneously.</dd>
        </dl>
      </section>
    </section>

    <section anchor="security" title="Security Considerations">
      <t> The principle of least privilege <bcp14>SHOULD</bcp14> be followed. A client application <bcp14>
        SHOULD</bcp14> request the most granular scope necessary for its function. For example, a
        scheduling assistant application that only needs to find open time slots should only request <tt>
        urn:ietf:params:oauth:scope:calendar:freebusy</tt>. </t>
      <t> Authorization servers <bcp14>MUST</bcp14> validate requested scopes and <bcp14>MUST NOT</bcp14>
        issue access tokens containing scopes that the user has not explicitly authorized for the
        client. The interpretation and enforcement of these scopes is the responsibility of the
        Resource Server (e.g., the IMAP or CalDAV server). </t>
    </section>

    <section anchor="iana" title="IANA Considerations">
      <t>This document requests the registration of eleven new values in the "OAuth Scope Registry"
        under the "OAuth Parameters" registry.</t>

      <section anchor="iana-scopes" title="OAuth Scope Registry">
        <t>The following scopes are to be registered.</t>

        <section title="Registration of the 'urn:ietf:params:oauth:scope:mail:read' Scope">
          <dl>
            <dt>Name:</dt>
            <dd>urn:ietf:params:oauth:scope:mail:read</dd>
            <dt>Description:</dt>
            <dd>Grants read-only access to a user's email.</dd>
            <dt>Change Controller:</dt>
            <dd>IETF</dd>
            <dt>Reference:</dt>
            <dd>This document.</dd>
          </dl>
        </section>
        <section title="Registration of the 'urn:ietf:params:oauth:scope:mail:send' Scope">
          <dl>
            <dt>Name:</dt>
            <dd>urn:ietf:params:oauth:scope:mail:send</dd>
            <dt>Description:</dt>
            <dd>Grants permission to send email on a user's behalf.</dd>
            <dt>Change Controller:</dt>
            <dd>IETF</dd>
            <dt>Reference:</dt>
            <dd>This document.</dd>
          </dl>
        </section>
        <section title="Registration of the 'urn:ietf:params:oauth:scope:mail:modify' Scope">
          <dl>
            <dt>Name:</dt>
            <dd>urn:ietf:params:oauth:scope:mail:modify</dd>
            <dt>Description:</dt>
            <dd>Grants permission to modify and delete email in a user's mailbox.</dd>
            <dt>Change Controller:</dt>
            <dd>IETF</dd>
            <dt>Reference:</dt>
            <dd>This document.</dd>
          </dl>
        </section>
        <section title="Registration of the 'urn:ietf:params:oauth:scope:mail' Scope">
          <dl>
            <dt>Name:</dt>
            <dd>urn:ietf:params:oauth:scope:mail</dd>
            <dt>Description:</dt>
            <dd>Aggregate scope for full read, send, and modify access to email.</dd>
            <dt>Change Controller:</dt>
            <dd>IETF</dd>
            <dt>Reference:</dt>
            <dd>This document.</dd>
          </dl>
        </section>

        <section title="Registration of the 'urn:ietf:params:oauth:scope:calendar:freebusy' Scope">
          <dl>
            <dt>Name:</dt>
            <dd>urn:ietf:params:oauth:scope:calendar:freebusy</dd>
            <dt>Description:</dt>
            <dd>Grants read-only access to a user's availability (free/busy) information.</dd>
            <dt>Change Controller:</dt>
            <dd>IETF</dd>
            <dt>Reference:</dt>
            <dd>This document.</dd>
          </dl>
        </section>
        <section title="Registration of the 'urn:ietf:params:oauth:scope:calendar:read' Scope">
          <dl>
            <dt>Name:</dt>
            <dd>urn:ietf:params:oauth:scope:calendar:read</dd>
            <dt>Description:</dt>
            <dd>Grants read-only access to full calendar and event details.</dd>
            <dt>Change Controller:</dt>
            <dd>IETF</dd>
            <dt>Reference:</dt>
            <dd>This document.</dd>
          </dl>
        </section>
        <section title="Registration of the 'urn:ietf:params:oauth:scope:calendar:update' Scope">
          <dl>
            <dt>Name:</dt>
            <dd>urn:ietf:params:oauth:scope:calendar:update</dd>
            <dt>Description:</dt>
            <dd>Grants permission to create, modify, and delete calendar data.</dd>
            <dt>Change Controller:</dt>
            <dd>IETF</dd>
            <dt>Reference:</dt>
            <dd>This document.</dd>
          </dl>
        </section>
        <section title="Registration of the 'urn:ietf:params:oauth:scope:calendar' Scope">
          <dl>
            <dt>Name:</dt>
            <dd>urn:ietf:params:oauth:scope:calendar</dd>
            <dt>Description:</dt>
            <dd>Aggregate scope for full read and update access to calendar data.</dd>
            <dt>Change Controller:</dt>
            <dd>IETF</dd>
            <dt>Reference:</dt>
            <dd>This document.</dd>
          </dl>
        </section>

        <section title="Registration of the 'urn:ietf:params:oauth:scope:contacts:read' Scope">
          <dl>
            <dt>Name:</dt>
            <dd>urn:ietf:params:oauth:scope:contacts:read</dd>
            <dt>Description:</dt>
            <dd>Grants read-only access to a user's contact data.</dd>
            <dt>Change Controller:</dt>
            <dd>IETF</dd>
            <dt>Reference:</dt>
            <dd>This document.</dd>
          </dl>
        </section>
        <section title="Registration of the 'urn:ietf:params:oauth:scope:contacts:update' Scope">
          <dl>
            <dt>Name:</dt>
            <dd>urn:ietf:params:oauth:scope:contacts:update</dd>
            <dt>Description:</dt>
            <dd>Grants permission to create, modify, and delete contact data.</dd>
            <dt>Change Controller:</dt>
            <dd>IETF</dd>
            <dt>Reference:</dt>
            <dd>This document.</dd>
          </dl>
        </section>
        <section title="Registration of the 'urn:ietf:params:oauth:scope:contacts' Scope">
          <dl>
            <dt>Name:</dt>
            <dd>urn:ietf:params:oauth:scope:contacts</dd>
            <dt>Description:</dt>
            <dd>Aggregate scope for full read and update access to contact data.</dd>
            <dt>Change Controller:</dt>
            <dd>IETF</dd>
            <dt>Reference:</dt>
            <dd>This document.</dd>
          </dl>
        </section>

      </section>
    </section>
  </middle>

  <back>
    <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.6749.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.8414.xml" />
    </references>
    <references>
      <name>Informative References</name>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.1939.xml" />
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4791.xml" />
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6352.xml" />
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6409.xml" />
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8620.xml" />
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8621.xml" />
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9051.xml" />
    </references>
  </back>
</rfc>