S/MIME signature verification extension to JMAP
Isode Ltd14 Castle MewsHamptonMiddlesexTW12 2NPUKAlexey.Melnikov@isode.comJMAPS/MIME
This document specifies an extension to JMAP for Mail (RFC 8621) for returning S/MIME signature verification status.
JMAP for Mail 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 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 (Section 3.2 of )
is used).
The use of the extension implies the client trusts the 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 the 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.
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 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 .
Data types defined in the core specification are also used in this document.
The capabilities object is returned as part of the standard JMAP
Session object; see Section 2 of . 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.
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.*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".)*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.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
and .
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.
S/MIME message, but it was neither signed nor encrypted.
This can also be returned for a multipart/signed message which
contains an unrecognized signing protocol (for example OpenPGP).
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 attempt signature verification
and return "signed/verified" or "signed/failed" instead of this signature
status.
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.
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". 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 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 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:
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 the 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.
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
Internationalization or Localization).
New smimeStatus response property values defined in extensions may affect behaviour of
properties such as smimeErrors response property of Email/get (see ) or
hasVerifiedSmime property of Email/query (see ). In particular
the new values can be treated similar to values defined in this document.
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
and another one specifying that a message is both encrypted and signed with an invalid S/MIME signature.
The former value can be treated as signed/verified (and would thus affect hasVerifiedSmime)
and the latter can be treated as signed/failed (and thus can be used with smimeErrors).
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.
(*) as well as "smimeStatus" values added by future extensions to this document
that are explicitly specified as having similar effect to "signed/verified" as far as
"hasVerifiedSmime" calculation is concerned.
IANA is requested to register the "smimeverify" 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,
Use of the server-side S/MIME signature verification JMAP extension requires
the client to trust the server signature verification code, server configuration and its 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 "signed/failed" status instead of
"signed/verified".)
A malicious or compromised server could
return false verification status to a client. A successful verification could
be conveyed to a client for a forged or altered message. A properly signed
message could be signaled as having a failed signature verification or no
signature at all. In the case of the latter attack, no new attack surface is
presented with this extension above what malicious or compromised server could
already do by stripping or tampering with the S/MIME information in the
message. In the case of the former attack, client software capable of
performing S/MIME signature verification could detect this attack. Local
configuration of the client should determine if this client-side verification
should occur. For clients without local verification capabilities, such an
attack would be difficult to detect.
Integrity protection of the channel between the client and the server is provided by use of TLS,
as required by JMAP specification (see Section 8.1 of ).
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.This document is a product of JMAP Working Group.
Special thank you to Bron Gondwana, Neil Jenkins, Murray Kucherawy,
Kirsty Paine, Roman Danyliw and Peter Yee for suggestions, comments and corrections
to this document.