RFC 9219: S/MIME Signature Verification Extension to the JSON Meta Application Protocol (JMAP)
- A. Melnikov
Abstract
This document specifies an extension to "The JSON Meta Application Protocol (JMAP) for Mail" (RFC 8621) for returning the S/MIME signature verification status.¶
Status of This Memo
This is an Internet Standards Track document.¶
This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 7841.¶
Information about the current status of this document, any
errata, and how to provide feedback on it may be obtained at
https://
Copyright Notice
Copyright (c) 2022 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://
1. Introduction
JMAP for Mail [RFC8621] is a JSON-based application protocol for synchronizing email data between a client and a server.¶
This document describes an extension to JMAP for returning the S/MIME
signature verification status [RFC8551], without requiring a JMAP client to download the
signature body part and all signed body parts (when the
multipart
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.¶
3. Addition to the Capabilities Object
The capabilities object is returned as part of the standard JMAP
Session object; see Section 2 of [RFC8620].
Servers supporting this
specification MUST add a property called
"urn
The value of this property is an empty object in both the JMAP
Session capabilities property and an account's
account
4. Extension for S/MIME Signature Verification
4.1. Extension to Email/get
[RFC8621] defines the Email/get method for retrieving message
- 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.¶
-
smime
Status :At Delivery - If "smime
Status At Delivery" is included in the list of requested properties, it MUST be interpreted by the server as a request to return the "smime Status At Delivery" response property. (It is effectively the same as the "smimeStatus" value calculated at the date/time of delivery, as specified by "receivedAt".)¶ - 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 "smime
Verified At" is included in the list of requested properties, it MUST be interpreted by the server as a request to return the "smime Verified At" response property.¶
The "smimeStatus" response property is defined as follows:¶
- smimeStatus:
-
"String|null" (server-set). 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], [RFC8550], and [RFC5280]. Possible string values of the property are listed below. Servers MAY return other values not defined below, as defined in extensions to this document. Clients MUST treat unrecognized values as "unknown" or "signed
/failed" . Note that the value of this property might change over time.¶ - unknown:
-
An S/MIME message, but it was neither signed nor encrypted.
This can also be returned for a multipart
/signed message that contains an unrecognized signing protocol (for example, OpenPGP).¶ - signed:
-
An 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.
(This is a useful optimization for a JMAP server to avoid doing work until exact
information is needed.
A JMAP client that only needs to display an icon that signifies presence of an
S/MIME signature can still use this value.)
JMAP servers compliant with this document SHOULD attempt signature
verification
and return "signed
/verified" or "signed/failed" instead of this signature status.¶ - signed/verified:
- An S/MIME signed message, and the sender's signature was successfully verified according to [RFC8551] and [RFC8550]. Additionally, the signer email address extracted from the S/MIME certificate matches the From header field value, and the signer certificate SHOULD be checked for revocation.¶
- signed/failed:
- S/MIME signed message, but the signature failed to verify according to [RFC8551] and [RFC8550]. This might be because of a policy-related decision (e.g., the message signer email address doesn't match the From header field value), the message was modified, the signer's certificate has expired or was revoked, etc.¶
- encrypted+signed
/verified : -
This value is reserved for future use. It is typically handled in the same way as "signed
/verified" .¶ - encrypted+signed
/failed : -
This value is reserved for future use. It is typically handled in the same way as "signed
/failed" .¶
The "smime
Note that the "smime
The "smimeErrors" response property is defined as follows:¶
- smimeErrors:
- "String[]|null" (server-set). null signifies that the message doesn't
contain any signature or that there were no errors when verifying
the S/MIME signature. (That is, this property is non-null only
when the corresponding "smimeStatus" response property value
is "signed/failed" or "encrypted+sign
ed /failed" . Note that future extensions to this document can specify other "smimeStatus" values that can be used with "smimeErrors".) 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.) In one 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. In another example, the certificate might be expired and the JMAP server might be unable to retrieve a Certificate Revocation List (CRL) for the certificate. In both of these cases, there would be 2 elements in the array.¶
The "smime
- 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.
(Retrieval of the "smimeStatus" value can be used to distinguish these 2 cases).
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", "smime
Status At Delivery", and/or "smimeErrors" would force this response property to be set to a non-null value if an S/MIME signature exists.¶
The "smimeStatus" and "smimeErrors" values are calculated at the time the
corresponding JMAP
request is processed (but see below about the effect of result caching),
not at the time when the message is generated (according to its
Date header field value). In all cases, "smime
Example 1: Retrieval of minimal information about a message, including its From, Subject, and Date header fields, as well as the S/MIME signature verification status at delivery and date/time when the message was received.¶
This might result in the following response:¶
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 the S/MIME signature status was last verified. The response contains 2 S/MIME errors related to S/MIME signature verification.¶
This might result in the following response:¶
4.1.1. "smimeStatus" Response Property Extensibility
Future extensions to this document can specify extra allowed values for the "smimeStatus" response property.
All values (defined in this document or in extensions to this document) MUST be in ASCII.
(Note that this response property contains tokens; thus, it is not subject to
internationaliz
New "smimeStatus" response property values defined in extensions may affect the behavior of
properties, such as the "smimeErrors" response property of Email/get (see Section 4.1) or the
"has
For example, a putative JMAP extension for automatically decrypting S/MIME messages can specify
two additional values, one specifying that a message is both encrypted and signed with a valid S/MIME signature
(e.g. "encrypted+sign
4.2. Extension to Email/query
[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 "has
Verified Smime" has the value true, only messages with "smimeStatus" equal to "signed /verified" or "encrypted+sign ed /verified" (*) match the condition. If "has Verified Smime" has the value false, only messages with "smimeStatus" not equal to "signed /verified" and not equal to "encrypted+sign ed /verified" (*) (including the value null) match the condition. Note that use of this attribute is potentially expensive for a JMAP server, as it forces calculation of the "smimeStatus" property value for each message. However, caching of the "smimeStatus" values should ameliorate this cost somewhat.¶ (*) as well as the "smimeStatus" values added by future extensions to this document that are explicitly specified as having similar effect to "signed
/verified" as far as "has Verified Smime" calculation is concerned.¶ -
has
Verified :Smime At Delivery - "Boolean". The "has
Verified Smime At Delivery" property is handled similarly to the "has Verified Smime" property, but the value of "smime Status At Delivery" is used instead of "smimeStatus" to assess whether a particular message matches the condition.¶
4.3. Interaction with Email/changes
Changes to the "smime
5. IANA Considerations
5.1. JMAP Capability Registration for "smimeverify"
IANA has registered the "smimeverify" JMAP capability as follows:¶
6. Security Considerations
Use of the server-side S/MIME signature verification JMAP extension requires
the client to trust the server signature verification code, the server configuration, and
the server's operational practices
to perform S/MIME signature verification, as well as to trust that the channel between
the client and the server is integrity protected.
(For example, if the server is not configured
with some trust anchors, some messages will have the "signed/failed" status
instead of "signed
Integrity protection of the channel between the client and the server is provided by use of TLS, as required by the JMAP specification (see Section 8.1 of [RFC8620]).¶
Constant recalculation of the S/MIME signature status can result in a denial
7. References
7.1. Normative References
- [RFC2119]
-
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10
.17487 , , <https:///RFC2119 www >..rfc -editor .org /info /rfc2119 - [RFC5280]
-
Cooper, D., Santesson, S., Farrell, S., Boeyen, S., Housley, R., and W. Polk, "Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile", RFC 5280, DOI 10
.17487 , , <https:///RFC5280 www >..rfc -editor .org /info /rfc5280 - [RFC8174]
-
Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10
.17487 , , <https:///RFC8174 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 , , <https:///RFC8550 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 , , <https:///RFC8551 www >..rfc -editor .org /info /rfc8551 - [RFC8620]
-
Jenkins, N. and C. Newman, "The JSON Meta Application Protocol (JMAP)", RFC 8620, DOI 10
.17487 , , <https:///RFC8620 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 , , <https:///RFC8621 www >..rfc -editor .org /info /rfc8621
7.2. Informative References
- [RFC1847]
-
Galvin, J., Murphy, S., Crocker, S., and N. Freed, "Security Multiparts for MIME: Multipart
/Signed and Multipart , RFC 1847, DOI 10/Encrypted" .17487 , , <https:///RFC1847 www >..rfc -editor .org /info /rfc1847
Acknowledgements
This document is a product of the JMAP Working Group. Special thank you to Bron Gondwana, Neil Jenkins, Murray Kucherawy, Kirsty Paine, Benjamin Kaduk, Roman Danyliw, Peter Yee, Robert Wilton, Erik Kline, and Menachem Dodge for suggestions, comments, and corrections to this document.¶