<?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.33 (Ruby 3.1.4) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-kohbrok-mimi-moh-00" category="info" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.17.1 -->
  <front>
    <title abbrev="MoH">MIMI over HTTPS</title>
    <seriesInfo name="Internet-Draft" value="draft-kohbrok-mimi-moh-00"/>
    <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="May" day="17"/>
    <area>Security</area>
    <keyword>Internet-Draft</keyword>
    <abstract>
      <?line 24?>

<t>This document an HTTPS based transport layer for use with the MIMI Delivery Service.</t>
    </abstract>
  </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 MoH 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:
H4sIAAAAAAAAA81Y224cuRF951cQMBBIgHqkbJ4yT+usDFtwhCiSsvtgLCRO
d800o+5mL8nWuPfB2N/I7+VLcopk3zRj2IGDJIYBj7tJVtWpU6eKnWWZ8NpX
tJbXV9dX0jyTle/u72/uhNpsLD3juXknCpM3qsaiwqqtz55MubHmKat1rbPa
lNnFhciVp52x/VrqZmuE0K1dS28757+7uPjjxXdCWVJreUd5Z7XvxRP1e2OL
tbxqPNmGfHbJZwvhvGqKB1WZBvZ6cqLVa/nBm/xMOmO9pa3Dr77mHz8LoTpf
GrsWMpOw7Nby/Uq+j/4JiT/R7/emsapYvDB2pxr9q/LaNGt5Uxpq9Ed5+7vL
8JZqpau1fAr7Ving7wvllSutbmhV0GTydiVvzYasn1m8VW2pqJq/+CqLmvz2
exs327B3lZtaiCzLpNo4b1UOkO5L7SSy0tXUeKmamDO5UY4KoK4a1wIrWake
+dwaKztHcq99KX1JMdWXVGlku0dK7LPOaRVt1LooKhLiFSfGmqLL2d2XFgty
udUbcoPt7Ljp1hpkzlQHPoiX5qelrqVcbzVO000iXAQi8q1IGzMXN55J5cSe
qgr/SoOjbYgvs1TRs4KvgK8FmRrvpOvykpflpvHAURba5Uz5HsG/eiXvR+8H
miK8Qr4GxbBd5ypC8Rq2OGb5S0dWA4MBjeCxXwB1/be7+xD4/Z/vYvAw53CM
/P3qD2CEKPWOXfYmAEA5+9tsdcEGVTW4oAYX+IHZhiy2qq+MKtxqTKUYsUyv
JIpO+r6F61XVT6egVgu56cMxjpqCHSit6XaRH+yv2Qqnd43ynQ1ZLiQAhe2B
anB4flzYZ5G4VuPRSt5zPPSM3wKp3ytb6GYnlQfsT6jfuf9DPAeM0E1edQXJ
DbI6uAlHxNxMGYjzrPmdK01XgYNlB4erveodg623HKfySw+BskVgIEbhBGLR
YIfZN9NhXMWRFW+aojUaWy4HtoACs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