<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<?rfc symrefs="yes"?>
<?rfc comments="yes" ?>
<?rfc inline="yes" ?>
<?rfc sortrefs="yes"?> 


<!-- [rfced] There are a number of comments and potentially unresolved questions
within the XML file.  Please review and let us know if any updates are
needed.  Please note that these comments will be removed from the XML prior to
publication. 
-->

<rfc number="7912" ipr="trust200902" category="info" submissionType="independent">

  <front>
    <title abbrev="Message Authorizing Header Field">
      Message Authorizing Email Header Field and
      Its&nbsp;Use&nbsp;for&nbsp;the &nbsp;Draft&nbsp;and&nbsp;Release&nbsp;Procedure
    </title>
    <author initials="A." surname="Melnikov" fullname="Alexey Melnikov">
      <organization>Isode Ltd</organization>
      <address>
	    <postal>
        <street>14 Castle Mews</street>
        <city>Hampton</city>
        <region>Middlesex</region>
        <code>TW12 2NP</code>
        <country>United Kingdom</country>
	    </postal>
	    <email>Alexey.Melnikov@isode.com</email>
      </address>
    </author>
      
    <date month="June" year="2016" />
    
    <keyword>MMHS</keyword>
    <keyword>S/MIME</keyword>
    <keyword>MIXER</keyword>
    <keyword>email</keyword>

    <abstract>
	      
    <t>
      This document describes a procedure for when a Military Message Handling System (MMHS)
      message is composed by one user
      and is only released to the mail transfer system when one or more authorizing users
      authorize release of the message by adding the MMHS-Authorizing-Users header field.
      The resulting message can be optionally signed by the sender and/or reviewer,
      allowing recipients to verify both the original signature (if any) and
      the review signatures.
    </t>
	
    </abstract>
    
  </front>
  <middle>

    <section title="Introduction">

      <t>
      In some secure environments, email messages can't be released to
      the Message Transfer System (MTS); thus, they can't be delivered to recipients unless
      they are authorized by one or more authorizing users (e.g., Releasing Officers or Release Authorities).
      This document describes how this mechanism can be realized by
      an additional Internet Email <xref target="RFC5322"/> header field and optionally
      protected using S/MIME <xref target="RFC5750"/> <xref target="RFC5751"/>
      or DomainKeys Identified Mail (DKIM) <xref target="RFC6376"/>.
      </t>

      <t>
      This document describes a procedure for how an email message composed by one user
      can be released to the MTS when one or more authorizing users authorize and optionally
      countersign the message. The MMHS-Authorizing-Users header field (see <xref target="MMHS-Authorizing-Users"/>)
      communicates which user(s) authorized the message.
      If S/MIME signed, the resulting message allows recipients to verify both
      the original (if any) and counter signatures.
<!--////Is the following statement true? As long as S/MIME signature is not protecting
      all header fields (with tripple wrap)?-->

<!-- [rfced] The following reference is not cited in the text.  Please let
us know where it should be cited or if this reference should be deleted 
from the References section.

   [I-D.melnikov-smime-msa-to-mda]
              Ottaway, W. and A. Melnikov, "Domain-based signing and
              encryption using S/MIME", draft-melnikov-smime-msa-to-
              mda-04 (work in progress), March 2014.

Note that the following note also appears within the XML file: 

   ////Add a reference to DOMSEC draft? <xref target="I-D.melnikov-smime-msa-to-mda"/>

 -->
      The original S/MIME signature generated by
<!--////Add a reference to DOMSEC draft? <xref target="I-D.melnikov-smime-msa-to-mda"/>-->
      the sender (if any) is unaffected by additional S/MIME review signatures.
    </t>
      
    </section>
    
    <section title="Conventions Used in This Document">
      
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
	    "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in
	    this document are to be interpreted as described in
	    <xref target="RFC2119"/>.</t>
      
      <t>The formal syntax uses the <xref target="RFC5234">Augmented
	    Backus-Naur Form (ABNF)</xref> notation, including the core rules
	    defined in Appendix B of <xref target="RFC5234">RFC 5234</xref>.
      Terms not defined in this document are taken from <xref target="RFC5322"/>.
      </t>

    </section>


    <section title='Draft and Release Procedure'>
      
        <section title='Terminology'>

<!-- [rfced] The capitalization of the following terms appear to be
inconsistent.  Please review and let us now if updates are needed.

drafter vs. Drafter
authorizing user vs. Authorizing User

-->

          <t>
          Drafter: Any email user that composes a message (Draft Message) needing authorization before it is released to its intended recipients.
          </t>
          
          <t>
          Authorizing User (also Releaser or Authorizer): The mailbox of a user or a group of users that must inspect
          and authorize the release of a Draft Message before it can be sent. An organization may require more than one
          Authorizing User to authorize the release of a Draft Message.
          </t>

        </section>
      
        <section title='Handling of Initial Message Submission by the MSA'>
        
          <t>
          The original email message to be sent doesn't include the MMHS-Authorizing-Users header field.
<!--////Too S/MIME specific?-->
          It may or may not include the sender's S/MIME signature.
      
<!--For future study:
      <cref>Is this true? Is there
      any use for specifying a value for the MMHS-Authorizing-Users header field before the message
      is countersigned?</cref>
-->
          </t>

          <t>The message to be sent is first submitted over SMTP <xref target="RFC6409"/>.
          The specific mechanism for how it arrives to the authorizing user(s) is not specified
          in this document. One possibility is for the Message Submission Agent (MSA) to redirect all email
          messages not addressed to authorizing users and not submitted by authorizing users
          to a preconfigured mailbox(es) that can be accessed by authorizing
	  user(s).
          Another possibility is for the MSA to redirect all email
          messages without the MMHS-Authorizing-Users header field and/or corresponding S/MIME
          review signatures to a preconfigured mailbox(es) that can be accessed by authorizing user(s).
          </t>

          <t>
          In order to prevent a malicious sender from bypassing or altering
	  the Draft and Release procedure,
          the MSA MUST check that the MMHS-Authorizing-Users header field (if present) is syntactically
          valid, contains the email addresses of entities authorized to act as authorizing users,
          and, when review signatures are used, that every entity listed has one or more matching review signature
          (or signature) that is valid.
          </t>

        </section>

        <section title='Review by Authorizing User(s)'>
        
          <t>Each user agent (UA) that is used by an authorized user MUST perform the following steps
          (if there are multiple authorizing users, the whole sequence of steps below is repeated for each authorizing user):
          <list style='numbers'>

            <t>
            Verify the origination of the message (From/Sender header fields). The exact mechanism to do that is out of scope for
            this document, but one example is by verifying the S/MIME signature, making sure that the signature protects all header fields
            (i.e., wrapped by message/rfc822, as described in Section 3.1 of <xref target="RFC5751"/>) and
            that it matches the sender of the message, as described in <xref target="RFC5750"/>.
            Another example is by verifying a DKIM signature <xref
	    target="RFC6376"/> (added by the Drafter's Mail User Agent (MUA)
	    or MSA) that covers the From/Sender header fields.
            </t>

            <t>
            Check if the message already contains the MMHS-Authorizing-Users header field with the email address of
            the authorizing user. (This can happen, for example, if the email system is misconfigured and thus contains a loop, or
            if a malicious sender or attacker is trying to affect the authorization procedure.)
            If the message doesn't contain the email address of the authorizing user in the MMHS-Authorizing-Users
            header field, then go to the next step.
            If the MMHS-Authorizing-Users header field contains the email address of the authorizing user,
            verify the validity of the header field (for example, by checking
	    for the S/MIME
            signature/review signature or for the DKIM signature) and also verify that the email address associated with
            the signature matches the email address of the authorizing user. If the validity of the MMHS-Authorizing-Users header field
<!--////Make sure that the step reference is correct.-->
            <!--containing the email address of the authorizing user--> can be verified, go to step 5 below.
            <!--////Sean doesn't thinks that this is a good idea:
            "strip the MMHS-Authorizing-Users header field"-->
            Otherwise, return the message to the sender (bounce) or redirect the message to a designated abuse mailbox.
            </t>

            <t>
            Allow the authorizing user to review the content of the message. Some of the checks can be automated
            (for example, search for keywords). (See <xref target="encrypted-emails"/> for additional considerations.)
            If, based on the check, the authorizing user is happy to release
            the message to the MTS (or to the next authorizing user, if multiple authorizations are required),
            the UA SHOULD enable the authorizing user to protect additions to the MMHS-Authorizing-Users
            header field, for example, by allowing the addition of the S/MIME review signature (if S/MIME is used
            for protecting the MMHS-Authorizing-Users header field. See <xref target="smime-reviewsignatures"/>
            for more details).
            If the authorizing user wants to reject the message, it SHOULD be
	    returned to the drafter with an explanatory
            note or it MAY be discarded. The authorizing user can also choose to forward the message to another
            authorizing user for additional approval or become a new Drafter of the message. If the authorizing user becomes
            the new Drafter, its UA MUST strip any existing email addresses from the MMHS-Authorizing-Users header field.
            </t>

            <t>
            If there is an existing MMHS-Authorizing-Users header field containing the email address of
            the authorizing user, skip this step.
            Otherwise, insert a new MMHS-Authorizing-Users header field (if absent) containing the email address of
            the authorizing user or append the email address of the authorizing user to the end of the existing
            MMHS-Authorizing-Users header field.
            </t>
        
            <t>
            The (possibly) updated email message is either released to the MTS
            or to the next authorizing user, as per email system configuration.

            Note that if the authorizing user updates the message in a manner that invalidates existing
            S/MIME or DKIM signature(s), the authorizing user becomes the Drafter and needs to reapply any
            protections. <!--////Point to draft-andersen-arc as an option for DKIM?-->
            </t>

          </list>
          </t>

          <section title="Processing of Encrypted Messages" anchor="encrypted-emails">

            <t>
            Any encrypted message sent in an environment where the Draft and
	    Release procedure is in force also
            needs to be encrypted to all authorizing users,
            so that they can preforma review of the message. If a User Agent used by an authorizing user can't decrypt the
            message, it SHOULD notify the sender (which can be the drafter or a previous authorizing user)
            about the problem using a non-delivery Delivery Status
	    Notification (DSN) or through some other means.
<!-- [rfced] Please review the expansion of DSN.  It is not clear whether
"non-delivery Delivery Status Notification" is intended.  Please let us know
if any updates are needed.

Original:
   If a User
   Agent used by an authorizing user can't decrypt the message, it
   SHOULD notify the sender (which can be the drafter or a previous
   authorizing user) about the problem using a non delivery DSN or
   through some other means.

-->

            The ciphertext that cannot be decrypted by the Authorizing User MAY be included in the notification to aid debugging.
            
            <!--This can be a NDN, but as Russ pointed out,
            decrypted text should still be available to the sender. Also, there is no need to restart the process
            from the beginning if some authorizing users were able to review the message.-->
            A possible reason not to notify the sender is to avoid Denial-of-Service attacks, for example,
            if an attacker discovers a way to inject fake messages with encryption that doesn't validate in
            order to overflow the sender's INBOX.
            </t>

          </section>

          <section title='Authorizing S/MIME Signatures' anchor="smime-reviewsignatures">

            <t>
            If S/MIME were not used, the Authorizing User can become the original signer of the message.
            </t>

            <t>
            If a message is signed with multiple signatures (for example, using different cryptographic algorithms,
            as described in <xref target="RFC5752"/>),
       <!--////Change the SHOULD to a MUST?-->
            all of the signatures that can be verified by an authorizing user SHOULD be signed with a review signature (authorizing signatures).
            A recipient of the message can consider any chain of review signatures that matches
            MMHS-Authorizing-Users header field values as valid, only if all
	    signatures in the chain are verified.
            All of the signatures that cannot be verified MUST be stripped by the
            Authorizing User Agent.
            </t>

            <t>When triple wrapping <xref target="RFC2634"/> is used, authorizing signatures are applied to the outer
            level, so that it can be verified by Message Transfer Agents (MTAs) without the need to decrypt content.
<!--////As per Russ: a countersignature can only be applied to an existing signature. So the first Authorizing User
will generate a regular signature, unless the message already has one at the outer level.-->
            </t>

          </section>
          
      </section>

      <section title='Role of Other Messaging Agents at the Sender&apos;s Domain'>

        <section title='MDA at the Sender&apos;s Domain'>

          <t>
            If a message being sent is to be delivered within the sender's domain, Message Delivery Agents (MDAs)
            are responsible for ensuring that the message was properly authorized by authorizing user(s),
            as determined by the sender's domain email system configuration.
            They verify the presence and validity of the MMHS-Authorizing-Users header field in the message,
            as well as the validity of associated signatures on the message.
          </t>

          <t>Note that the above requirements don't apply to direct delivery to any user designated as an Authorizing User.</t>

        </section>

        <section title='Border MTA at the Sender&apos;s Domain'>

          <t>The sender's domain border MTAs are responsible for ensuring that all
	  messages that leave the sender's domain
          were properly authorized by the authorizing user(s), as determined by the sender's domain email system configuration.
          They verify the presence and validity of the MMHS-Authorizing-Users header field in outgoing messages,
          as well as the validity of associated signatures on the message.
          </t>

        </section>

      </section>

    </section>

    <section title='MMHS-Authorizing-Users Header Field' anchor="MMHS-Authorizing-Users">

      <t>The MMHS-Authorizing-Users header field specifies the list of authorizing users (or entities(*))
         that countersigned this email message (for example, using S/MIME) before it was authorized
         for release to the MTS. Each user/entity is described by the email
	 address.

<!-- [rfced] The use of "her/his/its" is clunky.  For simplicity, we updated
to use "the".  Please let us know objections.

Original: 
   Each user/entity is described by her/his/its email address.
-->
      </t>

      <t>
      (*) Note that in some environments, identities of authorizing users are required to be hidden from recipients
      of email messages; so, upon receipt, MMHS-Authorizing-Users might contain an email address associated with a group
      of possible users. Such email addresses need to have signatures that don't disclose group membership.
      </t>
	
	    <t>
        The MMHS-Authorizing-Users header field specified in this document MUST NOT appear more
        than once in message headers.
        An email message that contains multiple MMHS-Authorizing-Users is malformed.
        An agent processing such a malformed message SHOULD either return it to
	the sender (if possible)
        or fix the message so that it contains only one copy of the header field.
       <!--////Don't do this, unless there is a desire to change existing implementations:
        [[An alternative is to allow for multiple copies of the header field and treat them as additive.
        This might work better with DKIM!]]
       -->
      </t>

<figure><artwork type="ABNF">
  <![CDATA[
    MMHS-Authorizing-Users = "MMHS-Authorizing-Users:"
                       mailbox-list CRLF
    
    mailbox-list = <Defined in RFC 5322>
]]></artwork></figure>
	
    </section>

    <section title="Updated MIXER Mapping">

      <t>
        This section provides an updated version of the MIXER mapping
        specified in <xref target="RFC2156"/> for MMHS applications.</t>

      <section title="Mapping from RFC 5322/MIME to X.400">
        
          <t>In the absence of the MMHS-Authorizing-Users header field, the From and Sender
          header fields are mapped to their X.400 equivalents as specified in <xref target="RFC2156"/>.</t>

          <t>If the MMHS-Authorizing-Users header field is present:
          
              <list style='numbers'>

                <t>
                If the Sender header field is present, it is mapped to
                IPMS.Heading.originator; otherwise, the first From header field
                address is mapped to IPMS.Heading.originator.
                </t>

                <t>
                Map the From header field address(es) and the MMHS-Authorizing-Users
                header field address(es) to IPMS.Heading.authorizing-users,
                skipping the first From header field address if it was mapped to
                IPMS.Heading.originator.
                </t>

              </list>
            
          </t>
        
      </section>

      <section title="Mapping from X.400 to RFC 5322/MIME">

        <t>Mapping from X.400 to the Internet is controlled by whether or not a particular message
        is considered a military message. 
        A message is considered a military message (as defined by
        ACP 123 <xref target="ACP123"/> and also specified in STANAG 4406 <xref target="STANAG-4406"/>)
        if there are any MMHS heading extensions present.
        Alternatively, this MAY be done by configuration (i.e., all messages
	can be considered military messages).
        </t>
        
        <t>
        For non-military messages, mapping from X.400 as specified in <xref target="RFC2156"/> is used.
        </t>

        <t>For military messages, the following mapping is used:

          <list style='numbers'>

            <t>
            IPMS.Heading.originator is mapped to the From header field.
            </t>

            <t>
            The IPMS.Heading.authorizing-users is mapped to the MMHS-Authorizing-Users header field.
            </t>

          </list>

        </t>

      </section>
      
    </section>

    <section title="IANA Considerations">

      <t>
        IANA has added the MMHS-Authorizing-Users header field specified
        in <xref target="MMHS-Authorizing-Users"/> to the
        "Provisional Message Header Field Names" registry, defined by
        "Registration Procedures for Message Header Fields" <xref target="RFC3864"/>.
        The registration template is as follows:
      </t>

      <t>Header field name: MMHS-Authorizing-Users<vspace blankLines='1'/>
      Applicable protocol: mail (<xref target="RFC5322"/>)<vspace blankLines='1'/>
      Status: provisional<vspace blankLines='1'/>
      Author/Change controller: Alexey Melnikov &lt;alexey.melnikov@isode.com&gt;<vspace blankLines='1'/>
      Specification document(s): RFC 7912<vspace blankLines='1'/>
      Related information:</t>
	
    </section>

    <section title="Security Considerations" anchor="seccons">

      <t>
      In some military environments, the identities of authorizing users
      are required to be hidden from recipients of email messages.  This
      can be accomplished by using a group address for the MMHS-Authorizing-Users.
      In this way, the recipient will know that it was
      released by an Authorizing User in that group, but the recipient
      will not know which one of them took the action.
      </t>

      <t>For those organizations that do not wish to disclose the authorizing users' group membership,
      care must also be taken to ensure that the information included in the certificate
      used for signing email messages does not disclose individuals in the group.</t>

      <t>Further security considerations are described in subsections of this section.</t>

<!--////Also think about how changes to the MMHS-Authorizing-Users header field would interact
with any mechanism used to protect header fields of the message.
MMHS-Authorizing-Users should not be signed with DKIM/etc, unless it is done by the last authorizing user?
Actually this is not a problem, if the next authorizing user can verify DKIM review signature before destroying it
by modifying the MMHS-Authorizing-Users header field.
Is this a Security Consideration?-->

      <section title="Forged Header Fields">

          <t>
          A malicious sender may add/change an MMHS-Authorizing-Users header field to bypass
          or alter the message authorization procedure invoked for messages with no
          MMHS-Authorizing-Users header field. For this reason, it is important
          for agents and clients that rely on the validity of the MMHS-Authorizing-Users header field
          to also verify the review signature (or a similar protection mechanism)
          that confirms that a particular person or entity authorized release
          of a message.
<!--Similar to the above, but with slightly different emphasize:
          Agents or clients that don't verify review signatures can be tricked
          into believing that the release of the message was correctly authorized,
          which could lead to potentially making false conclusions based on
          forged header fields.
-->
          <!--
          For example if MMHS-Authorizing-Users header field is updated by a "trusted"
          machine and such machine is compromised, ...
          -->
          </t>

      </section>

      <section title="Intentionally Malformed Header Fields">

          <t>
          It is possible for an attacker to add an MMHS-Authorizing-Users
          header field that is extraordinarily large or otherwise malformed in
          an attempt to discover or exploit weaknesses in the header field parsing
          code.  Implementations MUST thoroughly verify all such header fields
          received from MTAs and be robust against intentionally as well as
          unintentionally malformed header fields.
          </t>

      </section>

<!--      
      <section title="Compromised Internal Hosts">

        <t>
        An internal MUA or MTA that has been compromised could generate mail
  ////Wouldn't that require compromise of a key used by an authorizing user, which is a bigger concern anyway?
        with a forged MMHS-Authorizing-Users header field.  Although it is clearly a larger
        concern to have compromised internal machines than it is to prove the
        value of this header field, this risk can be mitigated by arranging
        that internal MTAs will remove this header field if it claims to have
        been added by a trusted border MTA (as described above), yet the
        [SMTP] connection is not coming from an internal machine known to be
        running an authorized MTA.  However, in such a configuration,
        legitimate MTAs will have to add this header field when legitimate
        internal-only messages are generated.
        </t>

      </section>
-->

    </section>

<!--
    <section title="Open Issues">

      <t>Netnews Approved header field has the same syntax and semantics as the one described here.
      Should it be used (and be formally registered for email) instead?</t>

///Don't do that, possibly save this for a future revision. Use a different header field for this!
      <t>Allow use of MMHS-Authorized-Users/Approved for specifying
      who should authorize release of the message (as opposed to just for recording of
      who authorized release so far)?</t>

    </section>
-->

  </middle>
  <back>

    <references title="Normative References">
      <?rfc include="reference.RFC.2119"?> <!-- Keywords -->
      <?rfc include="reference.RFC.2156"?> <!-- MIXER -->
      <?rfc include="reference.RFC.5322"?> <!-- Email -->
      <?rfc include="reference.RFC.6409"?> <!-- Submission Service -->
      <?rfc include="reference.RFC.5234"?> <!-- ABNF -->
<!-- CMS
      <?rfc include="reference.RFC.5652"?>
-->
      <?rfc include="reference.RFC.2634"?> <!-- Tripple Wrapping, etc -->
      <?rfc include="reference.RFC.5750"?> <!-- S/MIME 3.2 - Certificate Handling -->
      <?rfc include="reference.RFC.5751"?> <!-- S/MIME 3.2 - Message Specification -->
      <?rfc include="reference.RFC.6376"?> <!-- DKIM -->

      <reference anchor="ACP123">
        <front>
          <title>Common Messaging strategy and procedures</title>
          <author>
	  <organization>CCEB</organization>
          </author>

          <date month="May" year="2009" />
        </front>

        <seriesInfo name="ACP" value="123 (B)" />

      </reference>

    </references>

    <references title="Informative References">
      
      <?rfc include="reference.RFC.3864"?>
      
      <reference anchor="STANAG-4406">
        <front>
          <title>STANAG 4406 Edition 2: Military Message Handling System</title>
          <author>
<organization>NATO</organization>
          </author>
          <date month="March" year="2005"/>
        </front>

        <seriesInfo name="STANAG" value="4406 Ed. 2"/>
      </reference>
      
<!--I-D.melnikov-smime-msa-to-mda IESG State: Waiting for Writeup -->

<reference anchor='MSA2MDA-SMIME'>
<front>
<title>Domain-based signing and encryption using S/MIME</title>

<author initials='W' surname='Ottaway' fullname='William Ottaway'>
    <organization />
</author>

<author initials='A' surname='Melnikov' fullname='Alexey Melnikov'>
    <organization />
</author>

<date month='March' day='5' year='2014' />

</front>

<seriesInfo name='Work in Progress,' value='draft-melnikov-smime-msa-to-mda-04' />
<format type='TXT'
        target='http://www.ietf.org/internet-drafts/draft-melnikov-smime-msa-to-mda-04.txt' />
</reference>

      <?rfc include="reference.RFC.5752"?> <!-- Multiple Signatures in CMS -->
      
    </references>

    <section title="Acknowledgements" numbered="no">

      <t>Many thanks for reviews and text provided by Steve Kille, Jim Schaad, Russ Housley, David Wilson, Chris Bonatti, and Sean Turner.</t>

      <t>Some text in this document was copied from RFC 7001.</t>

    </section>
  </back>
</rfc>
