<?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.37 (Ruby 3.0.5) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-kohbrok-mimi-transport-00" category="info" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.17.4 -->
  <front>
    <title abbrev="MT">MIMI Transport</title>
    <seriesInfo name="Internet-Draft" value="draft-kohbrok-mimi-transport-latest"/>
    <author initials="K." surname="Kohbrok" fullname="Konrad Kohbrok">
      <organization>Phoenix R&amp;D</organization>
      <address>
        <email>konrad.kohbrok@datashrine.de</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="August" day="09"/>
    <area>Security</area>
    <keyword>Internet-Draft</keyword>
    <abstract>
      <?line 24?>

<t>This document an HTTPS based transport layer for use with the MIMI Protocol.</t>
    </abstract>
    <note removeInRFC="true">
      <name>Discussion Venues</name>
      <t>Discussion of this document takes place on the
    More Instant Messaging Interoperability Working Group mailing list (mimi@ietf.org),
    which is archived at <eref target="https://mailarchive.ietf.org/arch/browse/mimi/"/>.</t>
      <t>Source for this draft and an issue tracker can be found at
    <eref target="https://github.com/kkohbrok/mimi-transport"/>.</t>
    </note>
  </front>
  <middle>
    <?line 28?>

<section anchor="introduction">
      <name>Introduction</name>
      <t>This document describes an HTTP-based transport layer protocol for use with the
Delivery Service protocol specified in draft-robert-mimi-delivery-service, as
well as other MIMI-relevant components such as contact discovery.</t>
      <section anchor="transport-security-and-authentication">
        <name>Transport Security and Authentication</name>
        <t>All HTTP queries described in this document MUST use TLS with version 1.3 or
higher to protect confidentiality and authenticity of the payloads. Delivery
Service payloads are typically authenticated by the sender through the use of
signatures and rely on HTTPS to authenticate the recipient. To prevent
forwarding attacks, the payloads of the Delivery Service include both sender and
recipient. The provider should thus always verify that the recipient corresponds
to its own provider name.</t>
      </section>
      <section anchor="endpoint-discovery">
        <name>Endpoint Discovery</name>
        <t>A messaging provider that wants to query the endpoint of another messaging
provider first has to discover the fully qualified domain name under which
Delivery Service of that provider can be reached. It does so by performing a GET
request to <tt>[provider.com](http://provider.com)/.well-known/mimi/ds-domain</tt>.
provider.com could for example answer by providing the domain
<tt>[ds.provider.com](http://ds.provider.com)</tt> (assuming that this is where it
responds to the REST endpoints defined below).</t>
      </section>
      <section anchor="rest-endpoints">
        <name>REST Endpoints</name>
        <t>The following REST endpoints can then be used to access the different
functionalities of the Delivery Service.</t>
        <t>As the Delivery Service relies on TLS encoded structs, all requests to endpoints
described below should be marked as <tt>Content-type: application/octet-stream</tt>.</t>
        <t>All structs and concepts referred to below are defined in
draft-robert-mimi-delivery-service, where their underlying functionality is
defined in more detail.</t>
        <section anchor="process-group-message">
          <name>Process Group Message</name>
          <artwork><![CDATA[
POST /group_operation
Content-type: application/octet-stream

Body
TLS serialized DSRequest

Response
TLS serialized DSResponse
]]></artwork>
          <t>This REST endpoint provides access to all operations associated with an existing
MLS group on the Delivery Service such as delivering application messages,
adding group members, removing group members, updating key material, etc. The
payloads for this endpoint are generally provided (and signed) by a member of
the corresponding group rather than the service provider of that member. The
exact operation, as well as the target group ID is determined by the payload
itself rather than an HTTP header, the path or any other query parameter.</t>
        </section>
        <section anchor="welcome-information">
          <name>Welcome Information</name>
          <artwork><![CDATA[
GET /welcome_information
Content-type: application/octet-stream

Body
TLS serialized DSRequest

Response
TLS serialized DSResponse
]]></artwork>
          <t>Through this endpoint, a provider can obtain information required to join the
group for clients that have already received a Welcome message. The DS responds
with the group’s RatchetTree, as well as authentication information of existing
group members.</t>
        </section>
        <section anchor="external-commit-information">
          <name>External Commit Information</name>
          <artwork><![CDATA[
GET /external_commit_information
Content-type: application/octet-stream

Body
TLS serialized DSRequest

Response
TLS serialized DSResponse
]]></artwork>
          <t>Guest providers can use this endpoint to obtain information that allows a client
to join a group without a Welcome message from an existing group member.</t>
        </section>
        <section anchor="verification-key">
          <name>Verification Key</name>
          <artwork><![CDATA[
GET /verification_key
Content-type: application/octet-stream

Body
TLS serialized VerificationKeyRequest

Response
TLS serialized VerificationKeyResponse
]]></artwork>
          <t>This allows guest providers to obtain the verification key of this provider.
This allows other providers to authenticate queries originating from this
provider.</t>
        </section>
        <section anchor="deliver-connection-request">
          <name>Deliver Connection Request</name>
          <artwork><![CDATA[
POST /connection_request
Content-type: application/octet-stream

Body
TLS serialized QueueingServiceRequest

Response
TLS serialized QueueingServiceResponse
]]></artwork>
          <t>This endpoint lets other providers deliver connection establishment request to
clients of this provider.</t>
        </section>
        <section anchor="deliver-message">
          <name>Deliver Message</name>
          <artwork><![CDATA[
POST /deliver_message
Content-type: application/octet-stream

Body
TLS serialized QueueingServiceRequest

Response
TLS serialized QueueingServiceResponse
]]></artwork>
          <t>An owning provider can deliver messages from one of its owned groups to this
endpoint, if one of the group’s clients is associated with this provider.</t>
        </section>
        <section anchor="connection-keypackage-retrieval">
          <name>Connection KeyPackage Retrieval</name>
          <artwork><![CDATA[
POST /connection_key_packages
Content-type: application/octet-stream

Body
TLS serialized ConnectionKeyPackageRequest

Response
TLS serialized ConnectionKeyPackageResponse
]]></artwork>
          <t>Allows another provider to retrieve KeyPackages for use during the connection
establishment process between two users.</t>
        </section>
        <section anchor="group-keypackage-retrieval">
          <name>Group KeyPackage Retrieval</name>
          <artwork><![CDATA[
POST /group_key_packages
Content-type: application/octet-stream

Body
TLS serialized GroupKeyPackageRequest

Response
TLS serialized GroupKeyPackageResponse
]]></artwork>
          <t>Allows another provider to retrieve KeyPackages that can be used to add another
user or one of its clients to an existing group.</t>
        </section>
      </section>
      <section anchor="rate-limiting">
        <name>Rate-limiting</name>
        <t>The MIMI transport protocol itself doesn’t include any rate-limiting measures.
However, traditional rate-limiting (e.g. based on sender IP) can be applied, as
well as rate-limiting based on information in the message body such as Group ID
(e.g. in the case of the <tt>/welcome_information</tt> endpoint) or group member (in
the case of the <tt>/group_operation</tt> endpoint). More fine-grained rate-limiting
can be applied through the use of the emerging Privacy Pass protocol
(draft-ietf-privacypass-auth-scheme).</t>
      </section>
    </section>
  </middle>
  <back>






  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA81YXW/cuhF9568gEKCIgWid3j51n256HeQaqVHX3rYPwYXN
lWZXrCVRl6R2o/sQ3L/Rv9df0jMk9eXdIClStA0C2JZIzsyZM2eGyrJMeO0r
Wsub65trubGqca2xXqjt1tIBjzeiMHmjaiwprNr57MmUW2ueslrXOvPDhqxS
npwXOX7sje3XUjc7I4Ru7Vp62zn/3evXv3/9nVCW1FreU95Z7XvxRP3R2GIt
rxtPtiGfXbEVIZxXTfGgKtPAck9OtHotP3iTv5IO9iztHH7ra/7lJyFU50tj
10JmEpbdWr5fyffRUyHxL0bw3jRWFYsXxu5Vo39RXptmLW9LQ43+KO9+cxXe
Uq10tZZPYd8qhf59obxypdUNrQqaTN6t5J3ZEtCbLN6ptlRUzV98lUVNfve9
jZtt2LvKTS1ElmVSbR1wzwHSptROIj9dTY2XqpE/bja393KrHBVyzI2sVE9W
7oyVnSN51L6UvqSY8ltrAKqpVvHsWhdFRUK84IRYU3Q5u/ncUkEut3pLbrCZ
nTfZpsNPbIsrqvSBbA8m2IPOaVrqWsr1TuM03STKRQAi44q0MXNx4yupnDhS
VeGnNDjahrgySxUdFHwFbC1I1HgnXZeXvCw3jQd+stAuN3wYgn/xYmL/SE+E
V8g3oBa261xFKN7AFscsf+7IamAwoBE89gugbv5yvwmBb/54H4OHOYdj5G9X
vwMTRKn37LI3AQDK2d9mpws2qKrBBTW4wA/MLmSvVX1lVOFWcsBSjFimVxLF
Jn3fwvWq6qdTUKOF3PbhGEdNwQ6U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