Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ProtoXEP: GRE Formatter: MIME #1416

Merged
merged 1 commit into from
Jan 13, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 113 additions & 0 deletions inbox/gre-formatter-mime.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE xep SYSTEM 'xep.dtd' [
<!ENTITY % ents SYSTEM 'xep.ent'>
%ents;
]>
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<xep>
<header>
<title>GRE Formatter: MIME</title>
<abstract>This GRE Formatter uses Multipurpose Internet Mail Extensions (MIME) to format payload.</abstract>

&LEGALNOTICE;
<number>xxxx</number>
<status>ProtoXEP</status>
<type>Standards Track</type>
<sig>Standards</sig>
<approver>Council</approver>
<dependencies>
<spec>XMPP Core</spec>
<spec>XEP-0001</spec>
</dependencies>
<supersedes/>
<supersededby/>
<shortname>gre-formatter-mime</shortname>
<tags>
<tag>gre</tag>
<tag>formatter</tag>
</tags>
<author>
<firstname>Jérôme</firstname>
<surname>Poisson</surname>
<email>[email protected]</email>
<jid>[email protected]</jid>
</author>
<revision>
<version>0.0.1</version>
<date>2025-01-12</date>
<initials>jp</initials>
<remark><p>First draft.</p></remark>
</revision>
</header>

<section1 topic='Introduction' anchor='intro'>
<p>This XEP defines a GRE Formatter that uses Multipurpose Internet Mail Extensions (MIME) as specified in RFC 2045, RFC 2046, RFC 2047, RFC 2183, and RFC 2231. This formatter will ensure that payloads are structured according to the MIME standards, allowing for proper formatting before encryption.</p>
</section1>

<section1 topic="Requirements" anchor="reqs">
<p>The design goals of this GRE Formatter are:</p>
<ul>
<li>Be usable with email gateways to send and receive end-to-end encrypted emails.</li>
<li>The formatter should be capable of handling attachments by creating appropriate MIME parts.</li>
<li>Compliance with RFC 2045, RFC 2046, RFC 2047, RFC 2183, and RFC 2231.</li>
</ul>
</section1>

<section1 topic="MIME Payload Structure" anchor='mime-structure'>
<p>MIME payloads must conform to the following structure:</p>
<ul>
<li><strong>Text Content</strong>: For text/plain and other text-based MIME types, the payload SHOULD be encoded in UTF-8.</li>
<li><strong>Attachments</strong>: Attachments should be enclosed within a multipart/mixed container. Each attachment should have its own MIME part with appropriate headers like Content-Type and Content-Disposition.</li>
</ul>
<p>Formatted payload MUST be constructed according to the rules defined in RFCs 2045 through 2231.</p>
</section1>

<section1 topic="Business Rules" anchor="rules">
<p>The following business rules apply to the MIME GRE Formatter:</p>
<ul>
<li>The use of &xep0247; is recommended to avoid reaching stanza limits, especially when attachments are used.</li>
<li>The use of Content-Disposition headers for attachments is recommended to facilitate proper handling by legacy systems.</li>
</ul>
</section1>

<section1 topic="Discovering Support" anchor="disco">
<p>If an entity supports the MIME GRE Formatter, it MUST advertise it by including the "urn:xmpp:gre:formatter:mime:0" discovery feature in response to a &xep0030; information request.</p>
<example caption="Service Discovery Information Request"><![CDATA[
<iq type='get'
from='[email protected]/balcony'
to='some_gateway.example.org'
id='disco1'>
<query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>]]></example>
<example caption="Service Discovery Information Response"><![CDATA[
<iq type='result'
from='some_gateway.example.org'
to='[email protected]/balcony'
id='disco1'>
<query xmlns='http://jabber.org/protocol/disco#info'>
...
<feature var='urn:xmpp:gre:0'/>
<feature var='urn:xmpp:gre:formatter:mime:0'/>
...
</query>
</iq>]]></example>

</section1>

<section1 topic="Security Considerations" anchor="security">
<p>This document introduces no security considerations above and beyond those already defined in XEP-0XXX Gateway Relayed Encryption.</p>
</section1>

<section1 topic="IANA Considerations" anchor="iana">
<p>This document does not require interaction with &IANA;.</p>
</section1>

<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
<p>TODO</p>
</section1>

<section1 topic="Acknowledgements" anchor="acks">
<p>Thanks to NLNet foundation/NGI Zero Core for funding the work on this specification.</p>
</section1>

</xep>
Loading