[Search] [txt|html|xml|pdf|bibtex] [Tracker] [WG] [Email] [Diff1] [Diff2] [Nits]

Versions: 00 01 02 03 04 05 06 07 08 09 10 11            Standards Track
Network Working Group                                        A. Melnikov
Internet-Draft                                                 Isode Ltd
Intended status: Standards Track                       10 September 2021
Expires: 14 March 2022


            S/MIME signature verification extension to JMAP
                        draft-ietf-jmap-smime-08

Abstract

   This document specifies an extension to JMAP for returning S/MIME
   signature verification status.

Status of This Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at https://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on 14 March 2022.

Copyright Notice

   Copyright (c) 2021 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents (https://trustee.ietf.org/
   license-info) in effect on the date of publication of this document.
   Please review these documents carefully, as they describe your rights
   and restrictions with respect to this document.  Code Components
   extracted from this document must include Simplified BSD License text
   as described in Section 4.e of the Trust Legal Provisions and are
   provided without warranty as described in the Simplified BSD License.







Melnikov                  Expires 14 March 2022                 [Page 1]


Internet-Draft          JMAP extension for S/MIME         September 2021


Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
   2.  Conventions Used in This Document . . . . . . . . . . . . . .   2
   3.  Addition to the capabilities object . . . . . . . . . . . . .   3
   4.  Extension to Email/get for S/MIME signature verification  . .   3
   5.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   7
     5.1.  JMAP capability registration for "smimeverify"  . . . . .   8
   6.  Security Considerations . . . . . . . . . . . . . . . . . . .   8
   7.  Normative References  . . . . . . . . . . . . . . . . . . . .   8
   Appendix A.  Acknowledgements . . . . . . . . . . . . . . . . . .   9
   Author's Address  . . . . . . . . . . . . . . . . . . . . . . . .   9

1.  Introduction

   JMAP [RFC8621] is a JSON based application protocol for synchronising
   email data between a client and a server.

   This document describes an extension to JMAP for returning S/MIME
   [RFC8551] signature verification status, without requiring a JMAP
   client to download the signature body part and all signed body parts
   (when the multipart/signed media type is used) or to download and
   decode CMS (when the application/pkcs7-mime media type is used).
   This JMAP extension assumes that JMAP client trusts JMAP server's S/
   MIME signature verification code and configuration.  This extension
   is suitable for cases where reduction in network bandwidth and client
   side code complexity outweigh security concerns about trusting JMAP
   server to perform S/MIME signature verifications.  One possible use
   case is when the same organization controls both the JMAP server and
   the JMAP client.

2.  Conventions Used in This Document

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
   "OPTIONAL" in this document are to be interpreted as described in BCP
   14 [RFC2119] [RFC8174] when, and only when, they appear in all
   capitals, as shown here.

   Type signatures, examples, and property descriptions in this document
   follow the conventions established in Section 1.1 of [RFC8620].  Data
   types defined in the core specification are also used in this
   document.








Melnikov                  Expires 14 March 2022                 [Page 2]


Internet-Draft          JMAP extension for S/MIME         September 2021


3.  Addition to the capabilities object

   The capabilities object is returned as part of the standard JMAP
   Session object; see [RFC8620].  Servers supporting _this_
   specification MUST add a property called
   "urn:ietf:params:jmap:smimeverify" to the capabilities object.

   The value of this property is an empty object in both the JMAP
   session _capabilities_ property and an account's
   _accountCapabilities_ property.

4.  Extension to Email/get for S/MIME signature verification

   [RFC8621] defines the Email/get method for retrieving message
   specific information.  This document defines the following pseudo
   values in the _properties_ argument:

   *  *smimeStatus*: If "smimeStatus" is included in the list of
      requested properties, it MUST be interpreted by the server as a
      request to return the "smimeStatus" response property.

   *  *smimeErrors*: If "smimeErrors" is included in the list of
      requested properties, it MUST be interpreted by the server as a
      request to return the "smimeErrors" response property.

   *  *smimeVerifiedAt*: If "smimeVerifiedAt" is included in the list of
      requested properties, it MUST be interpreted by the server as a
      request to return the "smimeVerifiedAt" response property.

   *  *smimeStatusAtDelivery*: If "smimeStatusAtDelivery" is included in
      the list of requested properties, it MUST be interpreted by the
      server as a request to return the "smimeStatusAtDelivery" response
      property.  (It is effectively the same as the "smimeStatus" value
      calculated at the date/time of delivery, as specified by
      "receivedAt".)

   The "smimeStatus" response property is defined as follows:

   smimeStatus: "String|null". null signifies that the message doesn't
   contain any signature.  Otherwise, this property contains the S/MIME
   signature and certificate verification status calculated according to
   [RFC8551] and [RFC8550].  Possible string values of the property are
   listed below.  Servers MAY return other values not defined below.
   Clients MUST treat unrecognized values as "unknown" or "signed/
   failed".  Note that the value of this property might change over
   time.

   unknown  S/MIME message, but it is neither signed nor encrypted.



Melnikov                  Expires 14 March 2022                 [Page 3]


Internet-Draft          JMAP extension for S/MIME         September 2021


      This can also be returned for a multipart/signed message which
      contains an unrecognized signing protocol (for example OpenPGP).

   signed  S/MIME signed message, but the signature was not yet
      verified.  Some servers might not attempt to verify a signature
      until a particular message is requested by the client.  JMAP
      servers compliant with this document SHOULD return "signed/
      verified" or "signed/failed" instead of this signature status.

   signed/verified  S/MIME signed message and the sender's signature was
      successfully verified, the sender matches the From header field,
      and the sender's certificate (and the certificate chain) is
      trusted for signing.

   signed/failed  S/MIME signed message, but the signature failed to
      verify.  This might be a policy related decision (message signer
      doesn't match the From header field), message was modified, the
      signer's certificate has expired or was revoked, etc.

   The "smimeStatusAtDelivery" response property has the same syntax as
   "smimeStatus" but is calculated at the "receivedAt" date/time.
   Unlike "smimeStatus", the "smimeStatusAtDelivery" response property
   value is immutable. "smimeStatusAtDelivery" allows clients to compare
   the S/MIME signature verification status at delivery with the current
   status as returned by "smimeStatus", for example to help to answer
   questions like "was the signature valid at the time of delivery?".

   The "smimeErrors" response property is defined as follows:

   smimeErrors: "String[]|null". null signifies that the message doesn't
   contain any signature or that there were no errors when verifying the
   S/MIME signature.  (I.e., this property is non null only when the
   corresponding "smimeStatus" response property value is "signed/
   failed".)  Each string in the array is a human readable description
   (in the language specified in the Content-Language header field, if
   any) of a problem with the signature, the signing certificate or the
   signing certificate chain.  (See Section 3.8 of [RFC8620] in regards
   to how this is affected by the language selection.)  For example, the
   signing certificate might be expired and the message From email
   address might not correspond to any of the email addresses in the
   signing certificate.  Or the certificate might be expired and the
   JMAP server might be unable to retrieve a CRL for the certificate.
   In both of these cases there would be 2 elements in the array.

   The "smimeVerifiedAt" response property is defined as follows:






Melnikov                  Expires 14 March 2022                 [Page 4]


Internet-Draft          JMAP extension for S/MIME         September 2021


   smimeVerifiedAt: "UTCDate|null" (server-set). null signifies that the
   message doesn't contain any S/MIME signature or that there is a
   signature, but there was no attempt to verify it.  In all other cases
   it is set to the date and time of when the S/MIME signature was most
   recently verified.  Note that a request to fetch "smimeStatus" and/or
   "smimeErrors" would force this response property to be set to a non
   null value, if an S/MIME signature exists.

   "smimeStatus" and "smimeErrors" values are calculated at the time the
   corresponding JMAP request was processed (but see below about result
   caching), not at the time when the message was generated (according
   to its Date header field value).  In all cases "smimeVerifiedAt" is
   set to time when "smimeStatus" and "smimeErrors" were last updated.
   As recalculating these values is expensive for the server, they MAY
   be cached for up to 10 minutes from the moment when they were
   calculated.

   Example 1: Retrieval of minimal information about a message,
   including its From, Subject and Date header fields, as well as S/MIME
   signature verification status at delivery and date/time when the
   message was received.






























Melnikov                  Expires 14 March 2022                 [Page 5]


Internet-Draft          JMAP extension for S/MIME         September 2021


      ["Email/get", {
      "ids": [ "f123u987" ],
      "properties": [ "mailboxIds", "from", "subject", "date",
       "smimeStatusAtDelivery", "receivedAt" ]
      }, "#1"]

This will result in the following response:

      [["Email/get", {
         "accountId": "abc",
         "state": "41234123231",
         "list": [
           {
             "id": "f123u457",
             "mailboxIds": { "f123": true },
             "from": [{"name": "Joe Bloggs", "email": "joe@bloggs.example.net"}],
             "subject": "Dinner tonight?",
             "date": "2020-07-07T14:12:00Z",
             "smimeStatusAtDelivery": "signed/verified",
             "receivedAt": "2020-07-07T14:15:18Z"
           }
         ]
      }, "#1"]]


   Example 2: Retrieval of minimal information about a message,
   including its From, Subject and Date header fields, as well as the
   latest S/MIME signature verification status, S/MIME verification
   errors (if any) and when was the S/MIME signature status last
   verified.





















Melnikov                  Expires 14 March 2022                 [Page 6]


Internet-Draft          JMAP extension for S/MIME         September 2021


         ["Email/get", {
         "ids": [ "af123u123" ],
         "properties": [ "mailboxIds", "from", "subject", "date",
          "smimeStatus", "smimeErrors", "smimeVerifiedAt" ]
         }, "#1"]

   This will result in the following response:

         [["Email/get", {
            "accountId": "abc",
            "state": "41234123231",
            "list": [
              {
                "id": "af123u123",
                "mailboxIds": { "f123": true },
                "from": [{"name": "Jane Doe",
                        "email": "jdoe@example.com"}],
                "subject": "Company takeover",
                "date": "2020-01-31T23:00:00Z",
                "smimeStatus": "signed/failed",
                "smimeErrors": [
                  "From email address doesn't match the certificate",
                  "Can't retrieve CRL from the CRL URL"],
                "smimeVerifiedAt": "2020-03-01T12:11:19Z"
              }
            ]
         }, "#1"]]


   [RFC8621] defines the Email/query method for searching for messages
   with specific properties.  This document defines the following
   properties of the *FilterCondition* object:

   *  *hasSmime*: "Boolean".  If "hasSmime" has the value true, only
      messages with "smimeStatus" other than null match the condition.
      If "hasSmime" has the value false, only messages with
      "smimeStatus" equal to null match the condition.

   *  *hasVerifiedSmime*: "Boolean".  If "hasVerifiedSmime" has the
      value true, only messages with "smimeStatus" equal to "signed/
      verified" match the condition.  If "hasVerifiedSmime" has the
      value false, only messages with "smimeStatus" not equal to
      "signed/verified" (including the value null) match the condition.

5.  IANA Considerations






Melnikov                  Expires 14 March 2022                 [Page 7]


Internet-Draft          JMAP extension for S/MIME         September 2021


5.1.  JMAP capability registration for "smimeverify"

   IANA is requested to register the "smime" JMAP Capability as follows:

   Capability Name: "urn:ietf:params:jmap:smimeverify"

   Specification document: this document

   Intended use: common

   Change Controller: IETF

   Security and privacy considerations: this document, Section 6

6.  Security Considerations

   Use of server-side S/MIME signature verification JMAP extension
   requires the client to trust the server verification code and
   configuration to perform S/MIME signature verification.  For example,
   if the server is not configured with some Trust Anchors, some
   messages will have "signed/failed" status instead of "signed/
   verified".

   Constant recalculation of S/MIME signature status can result in a
   Denial-of-Service condition.  For that reason, it is RECOMMENDED to
   cache results of signature verification for 10 minutes.

7.  Normative References

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119,
              DOI 10.17487/RFC2119, March 1997,
              <https://www.rfc-editor.org/info/rfc2119>.

   [RFC8174]  Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
              2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
              May 2017, <https://www.rfc-editor.org/info/rfc8174>.

   [RFC8550]  Schaad, J., Ramsdell, B., and S. Turner, "Secure/
              Multipurpose Internet Mail Extensions (S/MIME) Version 4.0
              Certificate Handling", RFC 8550, DOI 10.17487/RFC8550,
              April 2019, <https://www.rfc-editor.org/info/rfc8550>.

   [RFC8551]  Schaad, J., Ramsdell, B., and S. Turner, "Secure/
              Multipurpose Internet Mail Extensions (S/MIME) Version 4.0
              Message Specification", RFC 8551, DOI 10.17487/RFC8551,
              April 2019, <https://www.rfc-editor.org/info/rfc8551>.




Melnikov                  Expires 14 March 2022                 [Page 8]


Internet-Draft          JMAP extension for S/MIME         September 2021


   [RFC8620]  Jenkins, N. and C. Newman, "The JSON Meta Application
              Protocol (JMAP)", RFC 8620, DOI 10.17487/RFC8620, July
              2019, <https://www.rfc-editor.org/info/rfc8620>.

   [RFC8621]  Jenkins, N. and C. Newman, "The JSON Meta Application
              Protocol (JMAP) for Mail", RFC 8621, DOI 10.17487/RFC8621,
              August 2019, <https://www.rfc-editor.org/info/rfc8621>.

Appendix A.  Acknowledgements

   This document is a product of JMAP Working Group.  Special thank you
   to Bron Gondwana, Neil Jenkins, Murray Kucherawy and Peter Yee for
   suggestions, comments and corrections on this document.

Author's Address

   Alexey Melnikov
   Isode Ltd
   14 Castle Mews
   Hampton
   TW12 2NP
   United Kingdom

   Email: Alexey.Melnikov@isode.com



























Melnikov                  Expires 14 March 2022                 [Page 9]