<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.6.25 (Ruby 3.1.3) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-ietf-mls-federation-02" category="info" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.16.0 -->
  <front>
    <title abbrev="MLS Federation">The Messaging Layer Security (MLS) Federation</title>
    <seriesInfo name="Internet-Draft" value="draft-ietf-mls-federation-02"/>
    <author initials="E." surname="Omara" fullname="Emad Omara">
      <organization>Google</organization>
      <address>
        <email>emadomara@google.com</email>
      </address>
    </author>
    <author initials="R." surname="Robert" fullname="Raphael Robert">
      <organization>Phoenix R&amp;D</organization>
      <address>
        <email>ietf@raphaelrobert.com</email>
      </address>
    </author>
    <date year="2023" month="March" day="13"/>
    <area>Security</area>
    <keyword>Internet-Draft</keyword>
    <abstract>
      <t>This document describes how the Messaging Layer Security (MLS) protocol can be
used in a federated environment.</t>
    </abstract>
    <note removeInRFC="true">
      <name>Discussion Venues</name>
      <t>Source for this draft and an issue tracker can be found at
  <eref target="https://github.com/mlswg/mls-federation"/>.</t>
    </note>
  </front>
  <middle>
    <section anchor="introduction">
      <name>Introduction</name>
      <t>MLS Architecture draft <xref target="I-D.ietf-mls-architecture"/> describes the overall MLS
system architecture, assuming the client and servers (Delivery Service and
Authentication Service) are operated by the same entity. This is however not a
strict requirement, the MLS protocol does not have an inherent dependency on one
single entity and can instead be used between multiple entities.</t>
      <t>The focus of this document is on the different components of the MLS
architecture when used in a federated environment.</t>
    </section>
    <section anchor="federated-environments">
      <name>Federated environments</name>
      <t>Federated environments are environments where multiple entities are operating
independent MLS services. In particular, the assumption is that Delivery
Services and Authentication Services are not necessarily operated by the same
entity.</t>
      <t>Entities operating independent MLS services are commonly called domains. In most
cases these domains might correspond to the Domain Name System, but it is not
strictly required. Operating MLS services in a federated environment can
therefore be regarded as federation between different domains.</t>
      <t>Federation is however not limited to the MLS services themselves. For example, a
federated environment could also contain clients that are provided by different
entities. Specifically, different vendors could provide different applications
that differ in scope and functionality but are interoperable.</t>
      <section anchor="delivery-services">
        <name>Delivery Services</name>
        <t>Depending on the kind of federated environment, the two following types of
federated Delivery Services are possible:</t>
        <section anchor="different-client-applications">
          <name>Different client applications</name>
          <t>The diagram below shows an MLS group where all clients are provided by
potentially different vendors but operate on the same Delivery Service:</t>
          <artwork><![CDATA[
                       +------------+
                      + Delivery     +
                      + Service (DS) +
                       +-----+------+
                    /        +        \             Group
*********************************************************
*                 /          +          \               *
*                /           |           \              *
*      +--------+       +----+---+       +--------+     *
*     + Client 0 +     + Client 1 +     + Client 3 +    *
*      +--------+       +--------+       +--------+     *
*     .............................     ............    *
*     User 0                            User 1          *
*                                                       *
*********************************************************


]]></artwork>
        </section>
        <section anchor="different-delivery-services">
          <name>Different Delivery Services</name>
          <t>The diagram below shows a federated environment in which different or identical
clients applications operate on different Delivery Services:</t>
          <artwork><![CDATA[
           +-----------------+      +-----------------+
          + Deliver Service 1 +    + Deliver Service 2 +
          +                   +    +                   +
           +-----------------+      +--------+--------+
               |         |                   |
               |         |                   |      Group
***************|*********|*******************|***********
*              |         |                   |          *
*              |         |                   |          *
*      +--------+       +--------+       +--------+     *
*     + Client 0 +     + Client 1 +     + Client 3 +    *
*      +--------+       +--------+       +--------+     *
*     .............................     ............    *
*     User 0                            User 1          *
*                                                       *
*********************************************************

]]></artwork>
        </section>
      </section>
      <section anchor="authentication-service">
        <name>Authentication Service</name>
        <t>In a federated environment, authentication becomes more important. While the
sepcifics of an Authentication Service are out-of-scope for MLS in general, it
is important that strong authentication is accessible to all clients of a
federated environment. As an example, a shared transparency log like
<xref target="keytransparency"/> could be used.</t>
      </section>
    </section>
    <section anchor="further-considerations">
      <name>Further considerations</name>
      <t>The following aspects of federated communication are important for successful
federation but are not considered in scope of the MLS charter:</t>
      <t>## Common format for the content of application messages</t>
      <t>The MLS protocol does not impose any format on the content of application
messages. Instead, application messages are considered to be an opaque sequence
of bytes. Applications in a federated environment are expected to agree on a
common format. The negotiation can be done at the KeyPackage level, or through
the MLS extension mechanism.</t>
      <section anchor="network-protocol-between-different-domains">
        <name>Network protocol between different domains</name>
        <t>Cross-domain operations such as sending and receiving messages, fetching
KeyPackages, and querying the Authentication Services have to be part of a
common network protocol that is supported by all domains in a federated
environment.</t>
      </section>
    </section>
    <section anchor="discovery-service-for-clientsusers-on-a-specific-domain">
      <name>Discovery service for clients/users on a specific domain</name>
      <t>Searching for users and other discovery services are typically part of messaging
systems. In the context of MLS, this functionality might overlap with the
fetching of KeyPackages and message routing.</t>
    </section>
    <section anchor="use-cases">
      <name>Use cases</name>
      <section anchor="different-delivery-servers">
        <name>Different Delivery Servers</name>
        <t>Different applications operated by different entities can use MLS to exchange
end-to-end encrypted messages. For example, in a messaging applications, clients
of messaging1.tld can encrypt and decrypt end-to-end encrypted messages from
messaging2.tld.</t>
      </section>
      <section anchor="different-client-applications-1">
        <name>Different client applications</name>
        <t>Different client applications operating on the same server can use MLS to
exchange end-to-end encrypted handshake and application messages. For example,
different browsers can implement the MLS protocol, and web developers write web
applications that use the MLS implementation in the browser to encrypt and
decrypt the messages. This will require a new standard Web API to allow the
client applications to set the address of the delivery service in the browser. A
more concrete example is using MLS in the browser to negotiate SRTP keys for
multi-party conference calls.</t>
      </section>
    </section>
    <section anchor="functional-requirements">
      <name>Functional Requirements</name>
      <section anchor="delivery-service">
        <name>Delivery service</name>
        <t>While there is no strict requirement regarding the network topology, there are
practical advantages when clients only connect to their own Delivery Service
rather than to the whole federated environment. This routing strategy can
possibly make the design of a cross-domain network protocol easier in the
context of access control.</t>
        <t>In such a topology, the client's own Delivery Service relays messages to the
Delivery Service in charge for a specific group.</t>
        <t>When several Delivery Services are involved in relaying messages, it is
important that all of them agree on which one is responsible for ordering
handshake messages of a specific group at any given time in order to enforce the
total ordering of handshake messages required by the MLS protocol.</t>
        <t>Depending on the functional requirements (such high availability and
redundancy), the different Delivery Services can elect a dedicated Delivery
Service to be responsible for ordering handshake messages for a certain period
of time. The election process can be repeated when the availability of Delivery
Services change.</t>
        <t>The diagram below shows a federated environment where a client connects to its
own Delivery Service that in turn relays messages to other Delivery Services.</t>
        <artwork><![CDATA[
                               +-----------------+         +---------+
                         +--> + Deliver Service B + +---> + Client B1 +
                         |    +                   +        +---------+
                         |     +-----------------+
                         |
                     +---+-------------+                   +---------+
 +---------+        + Deliver Service A + +-------------> + Client A2 +
+ Client A1 + +---> +                   +                  +---------+
 +---------+         +------+----------+
                         |
                         |     +-----------------+         +---------+
                         +--> + Deliver Service C + +---> + Client C1 +
                              +                   +        +---------+
                               +-----------------+
                                                                                                                                      
]]></artwork>
      </section>
      <section anchor="authentication-service-1">
        <name>Authentication Service</name>
        <t>The MLS specification only describes how the signatures on the contents of the
leaf nodes of a given group can be verified and that clients have to support the
signature schemes of all other clients in each group.</t>
        <t>The credential (and thus the binding between identity of the group member and
its signature public key) in each (non-blank) leaf node has to be authenticated
by the AS. This becomes relevant in a federated setting, as the AS, and thus the
authentication process of each member in a given group might differ.</t>
        <t>This problem can be solved in a variety of ways, for example, by having all
applications and/or service providers involved in a federation agree on a shared
process, or by having clients advertise their authentication process in a
similar way as their ciphersuite, with the requirement that all members of a
group must support each others authentication processes.</t>
        <t>Depending on the design of the AS of a given client, other, federated clients
might have to trust that client's service provider to authenticate its
credential. Confidence in authentication provided by service providers in
general can be strengthened by using a scheme such as <xref target="keytransparency"/>, which
allows both local and federated clients to assert a shared view of the
authentication information provided by the service.</t>
        <t>In a federated environment, the AS should provide the same degree of
transparency as in a non-federated environment, i.e. end-to-end authentication
should be possible.</t>
      </section>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <section anchor="version-ciphersuite-negotiation">
        <name>Version &amp; ciphersuite negotiation</name>
        <t>In a federated environment, version &amp; ciphersuite negotiation is more critical,
to avoid forcing a downgrade attack by malicious third party Delivery Services.
This is due to the fact that the thread model is extended to include the following:</t>
        <ul spacing="normal">
          <li>Different entities might have diverging security policies, e.g. they don't
enforce validation of KeyPackages the same way.</li>
          <li>Entities might be malicious and act as a threat actor, e.g. might generate
fake clients controlled by them.</li>
        </ul>
        <t>The negotiation of version numbers &amp; ciphersuites can be done at the KeyPackage level.</t>
      </section>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>This document makes no requests of IANA.</t>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <reference anchor="I-D.ietf-mls-architecture">
          <front>
            <title>The Messaging Layer Security (MLS) Architecture</title>
            <author fullname="Benjamin Beurdouche" initials="B." surname="Beurdouche">
              <organization>Inria &amp; Mozilla</organization>
            </author>
            <author fullname="Eric Rescorla" initials="E." surname="Rescorla">
              <organization>Mozilla</organization>
            </author>
            <author fullname="Emad Omara" initials="E." surname="Omara">
              <organization>Google</organization>
            </author>
            <author fullname="Srinivas Inguva" initials="S." surname="Inguva">
              <organization>Twitter</organization>
            </author>
            <author fullname="Alan Duric" initials="A." surname="Duric">
              <organization>Wire</organization>
            </author>
            <date day="16" month="December" year="2022"/>
            <abstract>
              <t>   The Messaging Layer Security (MLS) protocol (I-D.ietf-mls-protocol)
   specification has the role of defining a Group Key Agreement
   protocol, including all the cryptographic operations and
   serialization/deserialization functions necessary for scalable and
   secure group messaging.  The MLS protocol is meant to protect against
   eavesdropping, tampering, message forgery, and provide further
   properties such as Forward Secrecy (FS) and Post-Compromise Security
   (PCS) in the case of past or future device compromises.

   This document describes a general secure group messaging
   infrastructure and its security goals.  It provides guidance on
   building a group messaging system and discusses security and privacy
   tradeoffs offered by multiple security mechanisms that are part of
   the MLS protocol (e.g., frequency of public encryption key rotation).

   The document also provides guidance for parts of the infrastructure
   that are not standardized by the MLS Protocol document and left to
   the application or the infrastructure architects to design.

   While the recommendations of this document are not mandatory to
   follow in order to interoperate at the protocol level, they affect
   the overall security guarantees that are achieved by a messaging
   application.  This is especially true in case of active adversaries
   that are able to compromise clients, the delivery service, or the
   authentication service.

              </t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-mls-architecture-10"/>
        </reference>
      </references>
      <references>
        <name>Informative References</name>
        <reference anchor="keytransparency" target="https://github.com/google/keytransparency">
          <front>
            <title>Key Transparency</title>
            <author>
              <organization/>
            </author>
            <date>n.d.</date>
          </front>
        </reference>
      </references>
    </references>
  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA+1a25Lbthm+x1Ogk5nEzkryoVfVRSYbr5Px5FCP120u2k4H
IiEJsyShAKTWqp1Ob/uafZJ+/w+ABCVKtpNMr8qb1ZIA/vPpI+fzuWhNW+ml
fL3V8nvtvdqYZiO/Uwft5K0uOmfag3zw/Xe3D+XXutROtcY2Qq1WTu+XEvfz
26UtGlXjtNKpdTs3ul3P68rP1/2S+eOnolCt3lh3WErTrK0QZueWsnWdb58+
fvwHLFBOq2VPXdzpw7115VK+aFrtGt3Ob+h4IXyrmvLvqrINSB60FzuzlH9p
bTGT3rrW6bXHr0NNP/4mhOrarXVLIedC4jKNX8rnC/nHWjnFdwLvz2tVZjet
26jG/IO5X8pvrN1Umh/oWplqSX9KS6u/3PCzRWHrEYlXC/nKrrRrMxqv1G6r
dJU/GNN5ubW6MW/kq09vcmKk0S9d2Ox4L5MTpEhXY+9eQz4JjbVONX4HTTbF
YclHREN/qw/ydfYwPFNuo9ul3Lbtzi8fPdqYdtut6OxHQapHR0cKMZ/PpVp5
3Cxgitdb4yXM39W6aWWpfeHMSnu5tfeyfb9r7ZyF2WwlC9XIlRad1yW0J5WM
roN/dbM3zjZEYBHI16YsYQzxCXmGs2VXsBcK8sprV2xNq4u2czq4o3z79ncv
5jeL3itVtuTnnzOmiWG7B9mqIg8X/uBbXct8/Uwq77uaBKLVR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