draft-ietf-uta-smtp-tlsrpt-05.txt   draft-ietf-uta-smtp-tlsrpt-06.txt 
Using TLS in Applications D. Margolis Using TLS in Applications D. Margolis
Internet-Draft Google, Inc Internet-Draft Google, Inc
Intended status: Standards Track A. Brotman Intended status: Standards Track A. Brotman
Expires: November 4, 2017 Comcast, Inc Expires: December 01, 2017 Comcast, Inc
B. Ramakrishnan B. Ramakrishnan
Yahoo!, Inc Yahoo!, Inc
J. Jones J. Jones
Microsoft, Inc Microsoft, Inc
M. Risher M. Risher
Google, Inc Google, Inc
May 3, 2017 May 31, 2017
SMTP TLS Reporting SMTP TLS Reporting
draft-ietf-uta-smtp-tlsrpt-05 draft-ietf-uta-smtp-tlsrpt-06
Abstract Abstract
A number of protocols exist for establishing encrypted channels A number of protocols exist for establishing encrypted channels
between SMTP Mail Transfer Agents, including STARTTLS [RFC3207], DANE between SMTP Mail Transfer Agents, including STARTTLS [RFC3207], DANE
[RFC6698], and MTA-STS (TODO: Add ref). These protocols can fail due [RFC6698], and MTA-STS (TODO: Add ref). These protocols can fail due
to misconfiguration or active attack, leading to undelivered messages to misconfiguration or active attack, leading to undelivered messages
or delivery over unencrypted or unauthenticated channels. This or delivery over unencrypted or unauthenticated channels. This
document describes a reporting mechanism and format by which sending document describes a reporting mechanism and format by which sending
systems can share statistics and specific information about potential systems can share statistics and specific information about potential
skipping to change at page 1, line 46 skipping to change at page 1, line 46
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on November 4, 2017. This Internet-Draft will expire on November 26, 2017.
Copyright Notice Copyright Notice
Copyright (c) 2017 IETF Trust and the persons identified as the Copyright (c) 2017 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 27 skipping to change at page 2, line 27
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3
2. Related Technologies . . . . . . . . . . . . . . . . . . . . 4 2. Related Technologies . . . . . . . . . . . . . . . . . . . . 4
3. Reporting Policy . . . . . . . . . . . . . . . . . . . . . . 4 3. Reporting Policy . . . . . . . . . . . . . . . . . . . . . . 4
3.1. Example Reporting Policy . . . . . . . . . . . . . . . . 5 3.1. Example Reporting Policy . . . . . . . . . . . . . . . . 5
3.1.1. Report using MAILTO . . . . . . . . . . . . . . . . . 5 3.1.1. Report using MAILTO . . . . . . . . . . . . . . . . . 6
3.1.2. Report using HTTPS . . . . . . . . . . . . . . . . . 6 3.1.2. Report using HTTPS . . . . . . . . . . . . . . . . . 6
4. Reporting Schema . . . . . . . . . . . . . . . . . . . . . . 6 4. Reporting Schema . . . . . . . . . . . . . . . . . . . . . . 6
4.1. Report Time-frame . . . . . . . . . . . . . . . . . . . . 7 4.1. Report Time-frame . . . . . . . . . . . . . . . . . . . . 7
4.2. Delivery Summary . . . . . . . . . . . . . . . . . . . . 7 4.2. Delivery Summary . . . . . . . . . . . . . . . . . . . . 7
4.2.1. Success Count . . . . . . . . . . . . . . . . . . . . 7 4.2.1. Success Count . . . . . . . . . . . . . . . . . . . . 7
4.2.2. Failure Count . . . . . . . . . . . . . . . . . . . . 7 4.2.2. Failure Count . . . . . . . . . . . . . . . . . . . . 7
4.3. Result Types . . . . . . . . . . . . . . . . . . . . . . 7 4.3. Result Types . . . . . . . . . . . . . . . . . . . . . . 7
4.3.1. Negotiation Failures . . . . . . . . . . . . . . . . 7 4.3.1. Negotiation Failures . . . . . . . . . . . . . . . . 7
4.3.2. Policy Failures . . . . . . . . . . . . . . . . . . . 8 4.3.2. Policy Failures . . . . . . . . . . . . . . . . . . . 8
4.3.3. General Failures . . . . . . . . . . . . . . . . . . 8 4.3.3. General Failures . . . . . . . . . . . . . . . . . . 8
4.3.4. Transient Failures . . . . . . . . . . . . . . . . . 8 4.3.4. Transient Failures . . . . . . . . . . . . . . . . . 9
5. Report Delivery . . . . . . . . . . . . . . . . . . . . . . . 9 4.4. JSON Report Schema . . . . . . . . . . . . . . . . . . . 9
5.1. Report Filename . . . . . . . . . . . . . . . . . . . . . 9 5. Report Delivery . . . . . . . . . . . . . . . . . . . . . . . 11
5.2. Compression . . . . . . . . . . . . . . . . . . . . . . . 9 5.1. Report Filename . . . . . . . . . . . . . . . . . . . . . 11
5.3. Email Transport . . . . . . . . . . . . . . . . . . . . . 10 5.2. Compression . . . . . . . . . . . . . . . . . . . . . . . 12
5.4. HTTPS Transport . . . . . . . . . . . . . . . . . . . . . 10 5.3. Email Transport . . . . . . . . . . . . . . . . . . . . . 12
5.5. Delivery Retry . . . . . . . . . . . . . . . . . . . . . 11 5.3.1. Example Report . . . . . . . . . . . . . . . . . . . 13
6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 11 5.4. HTTPS Transport . . . . . . . . . . . . . . . . . . . . . 14
7. Security Considerations . . . . . . . . . . . . . . . . . . . 11 5.5. Delivery Retry . . . . . . . . . . . . . . . . . . . . . 14
8. Appendix 1: Example Reporting Policy . . . . . . . . . . . . 12 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 15
8.1. Report using MAILTO . . . . . . . . . . . . . . . . . . . 12 6.1. Message headers . . . . . . . . . . . . . . . . . . . . . 15
8.2. Report using HTTPS . . . . . . . . . . . . . . . . . . . 12 6.2. Report Type . . . . . . . . . . . . . . . . . . . . . . . 15
9. Appendix 2: JSON Report Schema . . . . . . . . . . . . . . . 12 6.3. application/tlsrpt+* Media Types . . . . . . . . . . . . 15
10. Appendix 3: Example JSON Report . . . . . . . . . . . . . . . 15 6.4. STARTTLS Validation Result Types . . . . . . . . . . . . 16
11. Normative References . . . . . . . . . . . . . . . . . . . . 16 7. Security Considerations . . . . . . . . . . . . . . . . . . . 17
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 17 8. Appendix 1: Example Reporting Policy . . . . . . . . . . . . 18
8.1. Report using MAILTO . . . . . . . . . . . . . . . . . . . 18
8.2. Report using HTTPS . . . . . . . . . . . . . . . . . . . 18
9. Appendix 2: Example JSON Report . . . . . . . . . . . . . . . 18
10. Normative References . . . . . . . . . . . . . . . . . . . . 20
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 21
1. Introduction 1. Introduction
The STARTTLS extension to SMTP [RFC3207] allows SMTP clients and The STARTTLS extension to SMTP [RFC3207] allows SMTP clients and
hosts to establish secure SMTP sessions over TLS. The protocol hosts to establish secure SMTP sessions over TLS. The protocol
design is based on "Opportunistic Security" (OS) [RFC7435], which design is based on "Opportunistic Security" (OS) [RFC7435], which
maintains interoperability with clients that do not support STARTTLS maintains interoperability with clients that do not support STARTTLS
but means that any attacker who can delete parts of the SMTP session but means that any attacker who can delete parts of the SMTP session
(such as the "250 STARTTLS" response) or redirect the entire SMTP (such as the "250 STARTTLS" response) or redirect the entire SMTP
session (perhaps by overwriting the resolved MX record of the session (perhaps by overwriting the resolved MX record of the
skipping to change at page 4, line 20 skipping to change at page 4, line 22
MTAs should deliver reports. MTAs should deliver reports.
o Policy Domain: The domain against which an MTA-STS or DANE Policy o Policy Domain: The domain against which an MTA-STS or DANE Policy
is defined. is defined.
o Sending MTA: The MTA initiating the delivery of an email message. o Sending MTA: The MTA initiating the delivery of an email message.
2. Related Technologies 2. Related Technologies
o This document is intended as a companion to the specification for o This document is intended as a companion to the specification for
SMTP MTA Strict Transport Security (MTA-STS, TODO: Add ref). SMTP MTA Strict Transport Security (MTA-STS, TODO: Add RFC ref).
o SMTP-TLSRPT defines a mechanism for sending domains that are o SMTP-TLSRPT defines a mechanism for sending domains that are
compatible with MTA-STS or DANE to share success and failure compatible with MTA-STS or DANE to share success and failure
statistics with recipient domains. DANE is defined in [RFC6698] statistics with recipient domains. DANE is defined in [RFC6698]
and MTA-STS is defined in [TODO] and MTA-STS is defined in [TODO : Add RFC ref]
3. Reporting Policy 3. Reporting Policy
A domain publishes a record to its DNS indicating that it wishes to A domain publishes a record to its DNS indicating that it wishes to
receive reports. These SMTP TLSRPT policies are distributed via DNS receive reports. These SMTP TLSRPT policies are distributed via DNS
from the Policy Domain's zone, as TXT records (similar to DMARC from the Policy Domain's zone, as TXT records (similar to DMARC
policies) under the name "_smtp-tlsrpt". For example, for the Policy policies) under the name "_smtp-tlsrpt". For example, for the Policy
Domain "example.com", the recipient's TLSRPT policy can be retrieved Domain "example.com", the recipient's TLSRPT policy can be retrieved
from "_smtp-tlsrpt.example.com". from "_smtp-tlsrpt.example.com".
skipping to change at page 8, line 26 skipping to change at page 8, line 31
o "tlsa-invalid": This indicates a validation error in the TLSA o "tlsa-invalid": This indicates a validation error in the TLSA
record associated with a DANE policy. None of the records in the record associated with a DANE policy. None of the records in the
RRset were found to be valid. RRset were found to be valid.
o "dnssec-invalid": This would indicate that no valid records were o "dnssec-invalid": This would indicate that no valid records were
returned from the recursive resolver. The request returned with returned from the recursive resolver. The request returned with
SERVFAIL for the requested TLSA record. SERVFAIL for the requested TLSA record.
4.3.2.2. MTA-STS-specific Policy Failures 4.3.2.2. MTA-STS-specific Policy Failures
o "sts-invalid": This indicates a validation error for the overall o "sts-policy-invalid": This indicates a validation error for the
MTA-STS policy. overall MTA-STS policy.
o "webpki-invalid": This indicates that the MTA-STS policy could not o "sts-webpki-invalid": This indicates that the MTA-STS policy could
be authenticated using PKIX validation. not be authenticated using PKIX validation.
4.3.3. General Failures 4.3.3. General Failures
When a negotiation failure can not be categorized into one of the When a negotiation failure can not be categorized into one of the
"Negotiation Failures" stated above, the reporter SHOULD use the "Negotiation Failures" stated above, the reporter SHOULD use the
"validation-failure" category. As TLS grows and becomes more "validation-failure" category. As TLS grows and becomes more
complex, new mechanisms may not be easily categorized. This allows complex, new mechanisms may not be easily categorized. This allows
for a generic feedback category. When this category is used, the for a generic feedback category. When this category is used, the
reporter SHOULD also use the "failure-reason-code" to give some reporter SHOULD also use the "failure-reason-code" to give some
feedback to the receiving entity. This is intended to be a short feedback to the receiving entity. This is intended to be a short
text field, and the contents of the field should be an error code or text field, and the contents of the field should be an error code or
error text, such as "X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION". error text, such as "X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION".
4.3.4. Transient Failures 4.3.4. Transient Failures
Transient errors due to too-busy network, TCP timeouts, etc. are not Transient errors due to too-busy network, TCP timeouts, etc. are not
required to be reported. required to be reported.
4.4. JSON Report Schema
The JSON schema is derived from the HPKP JSON schema [RFC7469] (cf.
Section 3)
{
"organization-name": organization-name,
"date-range": {
"start-datetime": date-time,
"end-datetime": date-time
},
"contact-info": email-address,
"report-id": report-id,
"policy": {
"policy-type": policy-type,
"policy-string": policy-string,
"policy-domain": domain,
"mx-host": mx-host-pattern
},
"summary": {
"success-aggregate": total-successful-session-count,
"failure-aggregate:" total-failure-session-count
}
"failure-details": [
{
"result-type": result-type,
"sending-mta-ip": ip-address,
"receiving-mx-hostname": receiving-mx-hostname,
"receiving-mx-helo": receiving-mx-helo,
"session-count": failed-session-count,
"additional-information": additional-info-uri,
"failure-reason-code": "Text body"
}
]
}
JSON Report Format
o "organization-name": The name of the organization responsible for
the report. It is provided as a string.
o "date-time": The date-time indicates the start- and end-times for
the report range. It is provided as a string formatted according
to Section 5.6, "Internet Date/Time Format", of [RFC3339]. The
report should be for a full UTC day, 0000-2400.
o "email-address": The contact information for a responsible party
of the report. It is provided as a string formatted according to
Section 3.4.1, "Addr-Spec", of [RFC5322].
o "report-id": A unique identifier for the report. Report authors
may use whatever scheme they prefer to generate a unique
identifier. It is provided as a string.
o "policy-type": The type of policy that was applied by the sending
domain. Presently, the only three valid choices are "tlsa",
"sts", and the literal string "no-policy-found". It is provided
as a string.
o "policy-string": The JSON string serialization ([RFC7159] section
7) of the policy, whether TLSA record ([RFC6698] section 2.3) or
MTA-STS policy.
o "domain": The Policy Domain is the domain against which the MTA-
STS or DANE policy is defined.
o "mx-host-pattern": The pattern of MX hostnames from the applied
policy. It is provided as a string, and is interpreted in the
same manner as the "Checking of Wildcard Certificates" rules in
Section 6.4.3 of [RFC6125].
o "result-type": A value from Section 4.3, "Result Types", above.
o "ip-address": The IP address of the sending MTA that attempted the
STARTTLS connection. It is provided as a string representation of
an IPv4 or IPv6 address in dot-decimal or colon-hexadecimal
notation.
o "receiving-mx-hostname": The hostname of the receiving MTA MX
record with which the sending MTA attempted to negotiate a
STARTTLS connection.
o "receiving-mx-helo": (optional) The HELO or EHLO string from the
banner announced during the reported session.
o "success-aggregate": The aggregate number (integer) of
successfully negotiated TLS-enabled connections to the receiving
site.
o "failure-aggregate": The aggregate number (integer) of failures to
negotiate an TLS-enabled connection to the receiving site.
o "session-count": The number of (attempted) sessions that match the
relevant "result-type" for this section.
o "additional-info-uri": An optional URI pointing to additional
information around the relevant "result-type". For example, this
URI might host the complete certificate chain presented during an
attempted STARTTLS session.
o "failure-reason-code": A text field to include an TLS-related
error code or error message.
5. Report Delivery 5. Report Delivery
Reports can be delivered either as an email message via SMTP or via Reports can be delivered either as an email message via SMTP or via
HTTP POST. HTTP POST.
5.1. Report Filename 5.1. Report Filename
The filename is typically constructed using the following ABNF: The filename is typically constructed using the following ABNF:
filename = sender "!" policy-domain "!" begin-timestamp filename = sender "!" policy-domain "!" begin-timestamp
skipping to change at page 10, line 7 skipping to change at page 12, line 19
5.2. Compression 5.2. Compression
The report SHOULD be subjected to GZIP compression for both email and The report SHOULD be subjected to GZIP compression for both email and
HTTPS transport. Declining to apply compression can cause the report HTTPS transport. Declining to apply compression can cause the report
to be too large for a receiver to process (a commonly observed to be too large for a receiver to process (a commonly observed
receiver limit is ten megabytes); compressing the file increases the receiver limit is ten megabytes); compressing the file increases the
chances of acceptance of the report at some compute cost. chances of acceptance of the report at some compute cost.
5.3. Email Transport 5.3. Email Transport
The report MAY be delivered by email. No specific MIME message The report MAY be delivered by email. To make the reports machine-
structure is required. It is presumed that the aggregate reporting parsable for the receivers, we define a top-level media type
address will be equipped to extract MIME parts with the prescribed "multipart/report" with a new parameter "report-type="tlsrpt"".
media type and filename and ignore the rest. Inside it, there are two parts: The first part is human readable,
typically "text/plain", and the second part is machine readable with
a new media type defined called "application/tlsrpt+json". If
compressed, the report should use the media type "application/
tlsrpt+gzip".
If compressed, the report should use the media type "application/ In addition, the following two new top level message header fields
gzip" if compressed (see [RFC6713]), and "application/json" are defined:
otherwise.
TLS-Report-Domain: Receiver-Domain
TLS-Report-Submitter: Sender-Domain
These message headers would allow for easy searching for all reports
submitted by a report domain or a particular submitter, for example
in IMAP:
"s SEARCH HEADER "TLS-Report-Domain" "example.com""
It is presumed that the aggregate reporting address will be equipped
to process new message header fields and extract MIME parts with the
prescribed media type and filename, and ignore the rest.
The [RFC5322].Subject field for individual report submissions SHOULD The [RFC5322].Subject field for individual report submissions SHOULD
conform to the following ABNF: conform to the following ABNF:
tlsrpt-subject = %x52.65.70.6f.72.74 1*FWS ; "Report" tlsrpt-subject = %x52.65.70.6f.72.74 1*FWS ; "Report"
%x44.6f.6d.61.69.6e.3a 1*FWS ; "Domain:" %x44.6f.6d.61.69.6e.3a 1*FWS ; "Domain:"
domain-name 1*FWS ; from RFC 6376 domain-name 1*FWS ; from RFC 6376
%x53.75.62.6d.69.74.74.65.72.3a ; "Submitter:" %x53.75.62.6d.69.74.74.65.72.3a ; "Submitter:"
1*FWS domain-name 1*FWS 1*FWS domain-name 1*FWS
%x52.65.70.6f.72.74.2d.49.44.3a ; "Report-ID:" %x52.65.70.6f.72.74.2d.49.44.3a ; "Report-ID:"
skipping to change at page 10, line 43 skipping to change at page 13, line 29
For instance, this is a possible Subject field for a report to the For instance, this is a possible Subject field for a report to the
Policy Domain "example.net" from the Sending MTA Policy Domain "example.net" from the Sending MTA
"mail.sender.example.com". It is line-wrapped as allowed by "mail.sender.example.com". It is line-wrapped as allowed by
[RFC5322]: [RFC5322]:
Subject: Report Domain: example.net Subject: Report Domain: example.net
Submitter: mail.sender.example.com Submitter: mail.sender.example.com
Report-ID: <735ff.e317+bf22029@mailexample.net> Report-ID: <735ff.e317+bf22029@mailexample.net>
5.3.1. Example Report
From: tlsrpt@mail.sender.example.com
Date: Fri, May 09 2017 16:54:30 -0800
To: mts-sts-tlsrpt@example.net
Subject: Report Domain: example.net
Submitter: mail.sender.example.com
Report-ID: <735ff.e317+bf22029@example.net>
TLS-Report-Domain: example.net
TLS-Report-Submitter: mail.sender.example.com
MIME-Version: 1.0
Content-Type: multipart/report; report-type="tlsrpt";
boundary="----=_NextPart_000_024E_01CC9B0A.AFE54C00"
Content-Language: en-us
This is a multipart message in MIME format.
------=_NextPart_000_024E_01CC9B0A.AFE54C00
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
This is an aggregate TLS report from mail.sender.example.com
------=_NextPart_000_024E_01CC9B0A.AFE54C00
Content-Type: application/tlsrpt+gzip
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="mail.sender.example!example.com!
1013662812!1013749130.gz"
<gzipped content of report>
------=_NextPart_000_024E_01CC9B0A.AFE54C00--
...
Note that, when sending failure reports via SMTP, sending MTAs MUST Note that, when sending failure reports via SMTP, sending MTAs MUST
NOT honor MTA-STS or DANE TLSA failures. NOT honor MTA-STS or DANE TLSA failures.
5.4. HTTPS Transport 5.4. HTTPS Transport
The report MAY be delivered by POST to HTTPS. If compressed, the The report MAY be delivered by POST to HTTPS. If compressed, the
report should use the media type "application/gzip" (see [RFC6713]), report should use the media type "application/tlsrpt+gzip", and
and "application/json" otherwise. "application/tlsrpt+json" otherwise (see section Section 6, "IANA
Considerations").
5.5. Delivery Retry 5.5. Delivery Retry
In the event of a delivery failure, regardless of the delivery In the event of a delivery failure, regardless of the delivery
method, a sender SHOULD attempt redelivery for up to 24hrs after the method, a sender SHOULD attempt redelivery for up to 24hrs after the
initial attempt. As previously stated the reports are optional, so initial attempt. As previously stated the reports are optional, so
while it is ideal to attempt redelivery, it is not required. If while it is ideal to attempt redelivery, it is not required. If
multiple retries are attempted, they should be on a logarithmic multiple retries are attempted, they should be on a logarithmic
scale. scale.
6. IANA Considerations 6. IANA Considerations
There are no IANA considerations at this time. The following are the IANA considerations discussed in this document.
6.1. Message headers
Below is the Internet Assigned Numbers Authority (IANA) Permanent
Message Header Field registration information per [RFC3864].
Header field name: TLS-Report-Domain
Applicable protocol: smtp
Status: standard
Author/Change controller: IETF
Specification document(s): this one
Header field name: TLS-Report-Submitter
Applicable protocol: smtp
Status: standard
Author/Change controller: IETF
Specification document(s): this one
6.2. Report Type
This document registers a new parameter "report-type="tlsrpt"" under
"multipart/report" top-level media type for use with [RFC6522].
The media type suitable for use as a report-type is defined in the
following section.
6.3. application/tlsrpt+* Media Types
This document registers multiple media types, listed in Table 1
below.
+-------------+----------------+-------------+-------------------+
| Type | Subtype | File extn | Specification |
+-------------+----------------+-------------+-------------------+
| application | tlsrpt+json | .json | Section 5.3 |
| application | tlsrpt+gzip | .gz | Section 5.3 |
+-------------+----------------+-------------+-------------------+
Table 1: SMTP TLS Reporting Media Types
Type name: application
Subtype name: This documents registers multiple subtypes, as listed
in Table 1.
Required parameters: n/a
Optional parameters: n/a
Encoding considerations: Encoding considerations are identical to
those specified for the "application/json" media type. See
[RFC7159].
Security considerations: Security considerations relating to SMTP TLS
Reporting are discussed in Section 7.
Interoperability considerations: This document specifies format of
conforming messages and the interpretation thereof.
Published specification: This document is the specification for these
media types; see Table 1 for the section documenting each media type.
Applications that use this media type: Mail User Agents (MUA) and
Mail Transfer Agents.
Additional information:
Magic number(s): n/a
File extension(s): As listed in Table 1.
Macintosh file type code(s): n/a
Person & email address to contact for further information: See
Authors' Addresses section.
Intended usage: COMMON
Restrictions on usage: n/a
Author: See Authors' Addresses section.
Change controller: Internet Engineering Task Force
(mailto:iesg@ietf.org).
6.4. STARTTLS Validation Result Types
This document creates a new registry, "STARTTLS Validation Result
Types". The initial entries in the registry are:
+-------------------------------+
| Result Type |
+-------------------------------+
| "starttls-not-supported" |
| "certificate-host-mismatch" |
| "certificate-expired" |
| "tlsa-invalid" |
| "dnssec-invalid" |
| "sts-policy-invalid" |
| "sts-webpki-invalid" |
| "validation-failure" |
+-------------------------------+
The above entries are described in section Section 4.3, "Result
Types." New result types can be added to this registry without the
need to update this document.
7. Security Considerations 7. Security Considerations
SMTP TLS Reporting provides transparency into misconfigurations or SMTP TLS Reporting provides transparency into misconfigurations or
attempts to intercept or tamper with mail between hosts who support attempts to intercept or tamper with mail between hosts who support
STARTTLS. There are several security risks presented by the STARTTLS. There are several security risks presented by the
existence of this reporting channel: existence of this reporting channel:
o Flooding of the Aggregate report URI (rua) endpoint: An attacker o Flooding of the Aggregate report URI (rua) endpoint: An attacker
could flood the endpoint and prevent the receiving domain from could flood the endpoint with excessive reporting traffic and
accepting additional reports. This type of Denial-of-Service prevent the receiving domain from accepting additional reports.
attack would limit visibility into STARTTLS failures, leaving the This type of Denial-of-Service attack would limit visibility into
receiving domain blind to an ongoing attack. STARTTLS failures, leaving the receiving domain blind to an
ongoing attack.
o Untrusted content: An attacker could inject malicious code into o Untrusted content: An attacker could inject malicious code into
the report, opening a vulnerability in the receiving domain. the report, opening a vulnerability in the receiving domain.
Implementers are advised to take precautions against evaluating Implementers are advised to take precautions against evaluating
the contents of the report. the contents of the report.
o Report snooping: An attacker could create a bogus TLSRPT record to o Report snooping: An attacker could create a bogus TLSRPT record to
receive statistics about a domain the attacker does not own. receive statistics about a domain the attacker does not own.
Since an attacker able to poison DNS is already able to receive Since an attacker able to poison DNS is already able to receive
counts of SMTP connections (and, absent DANE or MTA-STS policies, counts of SMTP connections (and, absent DANE or MTA-STS policies,
actual SMTP message payloads), this does not present a significant actual SMTP message payloads), this does not present a significant
new vulnerability. new vulnerability.
o Reports as DDoS: TLSRPT allows specifying destinations for the o Reports as DDoS: TLSRPT allows specifying destinations for the
reports that are outside the authority of the Policy Domain, which reports that are outside the authority of the Policy Domain, which
allows domains to delegate processing of reports to a partner allows domains to delegate processing of reports to a partner
organization. However, an attacker who controls the Policy Domain organization. However, an attacker who controls the Policy Domain
DNS could also use this mechanism to direct the reports to an DNS could also use this mechanism to direct the reports to an
unwitting victim, flooding that victim with excessive reports. unwitting victim, flooding that victim with excessive reports.
DMARC [RFC7489] defines an elegant solution for verifying DMARC [RFC7489] defines a solution for verifying delegation to
delegation; however, since the attacker had less ability to avoid such attacks; the need for this is greater with DMARC,
generate large reports than with DMARC failures, and since the however, because DMARC allows an attacker to trigger reports to a
reports are generated by the sending MTA, such a delegation target from an innocent third party by sending that third party
mechanism is left for a future version of this specification. mail (which triggers a report from the third party to the target).
In the case of TLSRPT, the attacker would have to induce the third
party to send the attacker mail in order to trigger reports from
the third party to the victim; this reduces the risk of such an
attack and the need for a verification mechanism.
8. Appendix 1: Example Reporting Policy 8. Appendix 1: Example Reporting Policy
8.1. Report using MAILTO 8.1. Report using MAILTO
_smtp-tlsrpt.mail.example.com. IN TXT \ _smtp-tlsrpt.mail.example.com. IN TXT \
"v=TLSRPTv1;rua=mailto:reports@example.com" "v=TLSRPTv1;rua=mailto:reports@example.com"
8.2. Report using HTTPS 8.2. Report using HTTPS
_smtp-tlsrpt.mail.example.com. IN TXT \ _smtp-tlsrpt.mail.example.com. IN TXT \
"v=TLSRPTv1; \ "v=TLSRPTv1; \
rua=https://reporting.example.com/v1/tlsrpt" rua=https://reporting.example.com/v1/tlsrpt"
9. Appendix 2: JSON Report Schema 9. Appendix 2: Example JSON Report
The JSON schema is derived from the HPKP JSON schema [RFC7469] (cf.
Section 3)
{
"organization-name": organization-name,
"date-range": {
"start-datetime": date-time,
"end-datetime": date-time
},
"contact-info": email-address,
"report-id": report-id,
"policy": {
"policy-type": policy-type,
"policy-string": policy-string,
"policy-domain": domain,
"mx-host": mx-host-pattern
},
"summary": {
"success-aggregate": total-successful-session-count,
"failure-aggregate:" total-failure-session-count
}
"failure-details": [
{
"result-type": result-type,
"sending-mta-ip": ip-address,
"receiving-mx-hostname": receiving-mx-hostname,
"receiving-mx-helo": receiving-mx-helo,
"session-count": failed-session-count,
"additional-information": additional-info-uri,
"failure-reason-code": "Text body"
}
]
}
Figure: JSON Report Format
o "organization-name": The name of the organization responsible for
the report. It is provided as a string.
o "date-time": The date-time indicates the start- and end-times for
the report range. It is provided as a string formatted according
to Section 5.6, "Internet Date/Time Format", of [RFC3339]. The
report should be for a full UTC day, 0000-2400.
o "email-address": The contact information for a responsible party
of the report. It is provided as a string formatted according to
Section 3.4.1, "Addr-Spec", of [RFC5322].
o "report-id": A unique identifier for the report. Report authors
may use whatever scheme they prefer to generate a unique
identifier. It is provided as a string.
o "policy-type": The type of policy that was applied by the sending
domain. Presently, the only three valid choices are "tlsa",
"sts", and the literal string "no-policy-found". It is provided
as a string.
o "policy-string": The JSON string serialization ([RFC7159] section
7) of the policy, whether TLSA record ([RFC6698] section 2.3) or
MTA-STS policy.
o "domain": The Policy Domain is the domain against which the MTA-
STS or DANE policy is defined.
o "mx-host-pattern": The pattern of MX hostnames from the applied
policy. It is provided as a string, and is interpreted in the
same manner as the "Checking of Wildcard Certificates" rules in
Section 6.4.3 of [RFC6125].
o "result-type": A value from Section 4.3, "Result Types", above.
o "ip-address": The IP address of the sending MTA that attempted the
STARTTLS connection. It is provided as a string representation of
an IPv4 or IPv6 address in dot-decimal or colon-hexadecimal
notation.
o "receiving-mx-hostname": The hostname of the receiving MTA MX
record with which the sending MTA attempted to negotiate a
STARTTLS connection.
o "receiving-mx-helo": (optional) The HELO or EHLO string from the
banner announced during the reported session.
o "success-aggregate": The aggregate number (integer) of
successfully negotiated TLS-enabled connections to the receiving
site.
o "failure-aggregate": The aggregate number (integer) of failures to
negotiate an TLS-enabled connection to the receiving site.
o "session-count": The number of (attempted) sessions that match the
relevant "result-type" for this section.
o "additional-info-uri": An optional URI pointing to additional
information around the relevant "result-type". For example, this
URI might host the complete certificate chain presented during an
attempted STARTTLS session.
o "failure-reason-code": A text field to include an TLS-related
error code or error message.
10. Appendix 3: Example JSON Report
{ {
"organization-name": "Company-X", "organization-name": "Company-X",
"date-range": { "date-range": {
"start-datetime": "2016-04-01T00:00:00Z", "start-datetime": "2016-04-01T00:00:00Z",
"end-datetime": "2016-04-01T23:59:59Z" "end-datetime": "2016-04-01T23:59:59Z"
}, },
"contact-info": "sts-reporting@company-x.com", "contact-info": "sts-reporting@company-x.com",
"report-id": "5065427c-23d3-47ca-b6e0-946ea0e8c4be", "report-id": "5065427c-23d3-47ca-b6e0-946ea0e8c4be",
"policy": { "policy": {
"policy-type": "sts", "policy-type": "sts",
skipping to change at page 16, line 5 skipping to change at page 20, line 5
}] }]
} }
Figure: Example JSON report for a messages from Company-X to Figure: Example JSON report for a messages from Company-X to
Company-Y, where 100 sessions were attempted to Company Y servers Company-Y, where 100 sessions were attempted to Company Y servers
with an expired certificate and 200 sessions were attempted to with an expired certificate and 200 sessions were attempted to
Company Y servers that did not successfully respond to the "STARTTLS" Company Y servers that did not successfully respond to the "STARTTLS"
command. Additionally 3 sessions failed due to command. Additionally 3 sessions failed due to
"X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED". "X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED".
11. Normative References 10. Normative References
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/ Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/
RFC2119, March 1997, RFC2119, March 1997,
<http://www.rfc-editor.org/info/rfc2119>. <http://www.rfc-editor.org/info/rfc2119>.
[RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, DOI 10.17487/ [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, DOI 10.17487/
RFC2818, May 2000, RFC2818, May 2000,
<http://www.rfc-editor.org/info/rfc2818>. <http://www.rfc-editor.org/info/rfc2818>.
[RFC3207] Hoffman, P., "SMTP Service Extension for Secure SMTP over [RFC3207] Hoffman, P., "SMTP Service Extension for Secure SMTP over
Transport Layer Security", RFC 3207, DOI 10.17487/RFC3207, Transport Layer Security", RFC 3207, DOI 10.17487/RFC3207,
February 2002, <http://www.rfc-editor.org/info/rfc3207>. February 2002, <http://www.rfc-editor.org/info/rfc3207>.
[RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet: [RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet:
Timestamps", RFC 3339, DOI 10.17487/RFC3339, July 2002, Timestamps", RFC 3339, DOI 10.17487/RFC3339, July 2002,
<http://www.rfc-editor.org/info/rfc3339>. <http://www.rfc-editor.org/info/rfc3339>.
[RFC3864] Klyne, G., Nottingham, M., and J. Mogul, "Registration
Procedures for Message Header Fields", BCP 90, RFC 3864,
DOI 10.17487/RFC3864, September 2004,
<http://www.rfc-editor.org/info/rfc3864>.
[RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax
Specifications: ABNF", STD 68, RFC 5234, DOI 10.17487/ Specifications: ABNF", STD 68, RFC 5234, DOI 10.17487/
RFC5234, January 2008, RFC5234, January 2008,
<http://www.rfc-editor.org/info/rfc5234>. <http://www.rfc-editor.org/info/rfc5234>.
[RFC5322] Resnick, P., Ed., "Internet Message Format", RFC 5322, DOI [RFC5322] Resnick, P., Ed., "Internet Message Format", RFC 5322, DOI
10.17487/RFC5322, October 2008, 10.17487/RFC5322, October 2008,
<http://www.rfc-editor.org/info/rfc5322>. <http://www.rfc-editor.org/info/rfc5322>.
[RFC6068] Duerst, M., Masinter, L., and J. Zawinski, "The 'mailto' [RFC6068] Duerst, M., Masinter, L., and J. Zawinski, "The 'mailto'
URI Scheme", RFC 6068, DOI 10.17487/RFC6068, October 2010, URI Scheme", RFC 6068, DOI 10.17487/RFC6068, October 2010,
<http://www.rfc-editor.org/info/rfc6068>. <http://www.rfc-editor.org/info/rfc6068>.
[RFC6125] Saint-Andre, P. and J. Hodges, "Representation and [RFC6125] Saint-Andre, P. and J. Hodges, "Representation and
Verification of Domain-Based Application Service Identity Verification of Domain-Based Application Service Identity
within Internet Public Key Infrastructure Using X.509 within Internet Public Key Infrastructure Using X.509
(PKIX) Certificates in the Context of Transport Layer (PKIX) Certificates in the Context of Transport Layer
Security (TLS)", RFC 6125, DOI 10.17487/RFC6125, March Security (TLS)", RFC 6125, DOI 10.17487/RFC6125, March
2011, <http://www.rfc-editor.org/info/rfc6125>. 2011, <http://www.rfc-editor.org/info/rfc6125>.
[RFC6522] Kucherawy, M., Ed., "The Multipart/Report Media Type for
the Reporting of Mail System Administrative Messages", STD
73, RFC 6522, DOI 10.17487/RFC6522, January 2012,
<http://www.rfc-editor.org/info/rfc6522>.
[RFC6698] Hoffman, P. and J. Schlyter, "The DNS-Based Authentication [RFC6698] Hoffman, P. and J. Schlyter, "The DNS-Based Authentication
of Named Entities (DANE) Transport Layer Security (TLS) of Named Entities (DANE) Transport Layer Security (TLS)
Protocol: TLSA", RFC 6698, DOI 10.17487/RFC6698, August Protocol: TLSA", RFC 6698, DOI 10.17487/RFC6698, August
2012, <http://www.rfc-editor.org/info/rfc6698>. 2012, <http://www.rfc-editor.org/info/rfc6698>.
[RFC6713] Levine, J., "The 'application/zlib' and 'application/gzip'
Media Types", RFC 6713, DOI 10.17487/RFC6713, August 2012,
<http://www.rfc-editor.org/info/rfc6713>.
[RFC7159] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data [RFC7159] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data
Interchange Format", RFC 7159, DOI 10.17487/RFC7159, March Interchange Format", RFC 7159, DOI 10.17487/RFC7159, March
2014, <http://www.rfc-editor.org/info/rfc7159>. 2014, <http://www.rfc-editor.org/info/rfc7159>.
[RFC7435] Dukhovni, V., "Opportunistic Security: Some Protection [RFC7435] Dukhovni, V., "Opportunistic Security: Some Protection
Most of the Time", RFC 7435, DOI 10.17487/RFC7435, Most of the Time", RFC 7435, DOI 10.17487/RFC7435,
December 2014, <http://www.rfc-editor.org/info/rfc7435>. December 2014, <http://www.rfc-editor.org/info/rfc7435>.
[RFC7469] Evans, C., Palmer, C., and R. Sleevi, "Public Key Pinning [RFC7469] Evans, C., Palmer, C., and R. Sleevi, "Public Key Pinning
Extension for HTTP", RFC 7469, DOI 10.17487/RFC7469, April Extension for HTTP", RFC 7469, DOI 10.17487/RFC7469, April
 End of changes. 23 change blocks. 
155 lines changed or deleted 326 lines changed or added

This html diff was produced by rfcdiff 1.45. The latest version is available from http://tools.ietf.org/tools/rfcdiff/