draft-ietf-uta-smtp-tlsrpt-01.txt   draft-ietf-uta-smtp-tlsrpt-02.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: January 9, 2017 Comcast, Inc Expires: June 18, 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
July 8, 2016 December 15, 2016
SMTP TLS Reporting SMTP TLS Reporting
draft-ietf-uta-smtp-tlsrpt-01 draft-ietf-uta-smtp-tlsrpt-02
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 SMTP MTA STS (TODO: Add ref). These protocols can [RFC6698], and SMTP MTA STS (TODO: Add ref). These protocols can
fail due to misconfiguration or active attack, leading to undelivered fail due to misconfiguration or active attack, leading to undelivered
messages or delivery over unencrypted or unauthenticated channels. messages or delivery over unencrypted or unauthenticated channels.
This document describes a reporting mechanism and format by which This document describes a reporting mechanism and format by which
sending systems can share statistics and specific information about sending systems can share statistics and specific information about
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 January 9, 2017. This Internet-Draft will expire on June 18, 2017.
Copyright Notice Copyright Notice
Copyright (c) 2016 IETF Trust and the persons identified as the Copyright (c) 2016 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
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
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 . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3
2. Related Technologies . . . . . . . . . . . . . . . . . . . . 3 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 . . . . . . . . . . . . . . . . . 5
3.1.2. Report using HTTPS . . . . . . . . . . . . . . . . . 5 3.1.2. Report using HTTPS . . . . . . . . . . . . . . . . . 5
4. Reporting Schema . . . . . . . . . . . . . . . . . . . . . . 5 4. Reporting Schema . . . . . . . . . . . . . . . . . . . . . . 6
4.1. Result Types . . . . . . . . . . . . . . . . . . . . . . 6 4.1. Report Time-frame . . . . . . . . . . . . . . . . . . . . 6
4.1.1. Success Type . . . . . . . . . . . . . . . . . . . . 6 4.2. Delivery Summary . . . . . . . . . . . . . . . . . . . . 7
4.1.2. Routing Failures . . . . . . . . . . . . . . . . . . 6 4.2.1. Success Count . . . . . . . . . . . . . . . . . . . . 7
4.1.3. Negotiation Failures . . . . . . . . . . . . . . . . 6 4.2.2. Failure Count . . . . . . . . . . . . . . . . . . . . 7
4.1.4. Policy Failures . . . . . . . . . . . . . . . . . . . 7 4.3. Result Types . . . . . . . . . . . . . . . . . . . . . . 7
5. Report Delivery . . . . . . . . . . . . . . . . . . . . . . . 7 4.3.1. Routing Failures . . . . . . . . . . . . . . . . . . 7
6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 4.3.2. Negotiation Failures . . . . . . . . . . . . . . . . 7
7. Security Considerations . . . . . . . . . . . . . . . . . . . 7 4.3.3. Policy Failures . . . . . . . . . . . . . . . . . . . 8
8. Appendix 1: JSON Report Schema . . . . . . . . . . . . . . . 8 4.3.4. General Failures . . . . . . . . . . . . . . . . . . 8
9. Appendix 2: Example JSON Report . . . . . . . . . . . . . . . 10 4.3.5. Transient Failures . . . . . . . . . . . . . . . . . 8
10. Normative References . . . . . . . . . . . . . . . . . . . . 10 5. Report Delivery . . . . . . . . . . . . . . . . . . . . . . . 8
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 11 5.1. Report Filename . . . . . . . . . . . . . . . . . . . . . 9
5.2. Compression . . . . . . . . . . . . . . . . . . . . . . . 9
5.3. Email Transport . . . . . . . . . . . . . . . . . . . . . 10
5.4. HTTPS Transport . . . . . . . . . . . . . . . . . . . . . 10
5.5. Delivery Retry . . . . . . . . . . . . . . . . . . . . . 11
6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 11
7. Security Considerations . . . . . . . . . . . . . . . . . . . 11
8. Appendix 1: Example Reporting Policy . . . . . . . . . . . . 12
8.1. Report using MAILTO . . . . . . . . . . . . . . . . . . . 12
8.2. Report using HTTPS . . . . . . . . . . . . . . . . . . . 12
9. Appendix 2: JSON Report Schema . . . . . . . . . . . . . . . 12
10. Appendix 3: Example JSON Report . . . . . . . . . . . . . . . 15
11. Normative References . . . . . . . . . . . . . . . . . . . . 16
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 17
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
provides interoperability for clients that do not support STARTTLS provides interoperability for 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 3, line 18 skipping to change at page 3, line 31
conversation. conversation.
Recipient domains may also use the mechanisms defined by MTA-STS Recipient domains may also use the mechanisms defined by MTA-STS
(TODO: Add ref) or DANE [RFC6698] to publish additional encryption (TODO: Add ref) or DANE [RFC6698] to publish additional encryption
and authentication requirements; this document defines a mechanism and authentication requirements; this document defines a mechanism
for sending domains that are compatible with MTA-STS or DANE to share for sending domains that are compatible with MTA-STS or DANE to share
success and failure statistics with recipient domains. success and failure statistics with recipient domains.
Specifically, this document defines a reporting schema that covers Specifically, this document defines a reporting schema that covers
failures in routing, STARTTLS negotiation, and both DANE [RFC6698] failures in routing, STARTTLS negotiation, and both DANE [RFC6698]
and MTA-STS (TODO: Add ref) policy validation errors, and standard and MTA-STS (TODO: Add ref) policy validation errors, and a standard
TXT record that recipient domains can use to indicate where reports TXT record that recipient domains can use to indicate where reports
in this format should be sent. in this format should be sent.
This document is intended as a companion to the specification for 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 ref).
1.1. Terminology 1.1. Terminology
The keywords MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD, The keywords MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD,
SHOULD NOT, RECOMMENDED, MAY, and OPTIONAL, when they appear in this SHOULD NOT, RECOMMENDED, MAY, and OPTIONAL, when they appear in this
document, are to be interpreted as described in [RFC2119]. document, are to be interpreted as described in [RFC2119].
We also define the following terms for further use in this document: We also define the following terms for further use in this document:
o STS Policy: A definition of the expected TLS availability and o STS Policy: A definition of the expected TLS availability,
behavior, as well as the desired actions for a given domain when a behavior, and desired actions for a given domain when a sending
sending MTA encounters different results. MTA encounters problems in negotiating a secure channel. STS is
defined in [TODO]
o TLSRPT Policy: A policy detailing the endpoint to which sending o DANE Policy: A mechanism for enabling the administrators of domain
names to specify the keys used in that domain's TLS servers. DANE
is defined in [RFC6698]
o TLSRPT Policy: A policy specifying the endpoint to which sending
MTAs should deliver reports. MTAs should deliver reports.
o Policy Domain: The domain against which an STS Policy is defined. o Policy Domain: The domain against which an STS or DANE Policy 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 ref).
o The Public Key Pinning Extension for HTTP [RFC7469] contains a o The Public Key Pinning Extension for HTTP [RFC7469] contains a
JSON-based definition for reporting individual pin validation JSON-based definition for reporting individual pin validation
failures. failures.
o The Domain-based Message Authentication, Reporting, and o The Domain-based Message Authentication, Reporting, and
Conformance (DMARC) [RFC7489] contains an XML-based reporting Conformance (DMARC) [RFC7489] contains an XML-based reporting
format for aggregate and detailed email delivery errors. format for aggregate and detailed email delivery errors.
3. Reporting Policy 3. Reporting Policy
SMTP TLSRPT policies are distributed via DNS from the Policy Domain's A domain publishes a record to its DNS indicating that it wishes to
zone, as TXT records (similar to DMARC policies) under the name receive reports. These SMTP TLSRPT policies are distributed via DNS
"_smtp_tlsrpt". For example, for the Policy Domain "example.com", from the Policy Domain's zone, as TXT records (similar to DMARC
the recipient's SMTP STS policy can be retrieved from policies) under the name "_smtp-tlsrpt". For example, for the Policy
"_smtp_tlsrpt.example.com". Domain "example.com", the recipient's TLSRPT policy can be retrieved
from "_smtp-tlsrpt.example.com".
(Future implementations may move to alternate methods of policy
discovery or distribution. See the section _Future_ _Work_ for more
discussion.)
Policies consist of the following directives: Policies consist of the following directives:
o "v": This value MUST be equal to "TLSRPTv1". o "v": This value MUST be equal to "TLSRPTv1".
o "rua": A URI specifying the endpoint to which aggregate o "rua": A URI specifying the endpoint to which aggregate
information about policy failures should be sent (see the section information about policy failures should be sent (see the section
_Reporting_ _Schema_ for more information). Two URI schemes are _Reporting_ _Schema_ for more information). Two URI schemes are
supported: "mailto" and "https". supported: "mailto" and "https".
* In the case of `https`, reports should be submitted via POST * In the case of "https", reports should be submitted via POST
([@!RFC2818]) to the specified URI. ([RFC2818]) to the specified URI.
* In the case of `mailto`, reports should be submitted to the specified
email address. When sending failure reports via SMTP, sending MTAs * In the case of "mailto", reports should be submitted to the
MUST NOT honor SMTP STS or DANE TLSA failures. specified email address. When sending failure reports via
SMTP, sending MTAs MUST NOT honor SMTP STS or DANE TLSA
failures.
o "ruf": Future use. (There may also be a need for enabling more o "ruf": Future use. (There may also be a need for enabling more
detailed "forensic" reporting during initial stages of a detailed "forensic" reporting during initial stages of a
deployment. To address this, the authors consider the possibility deployment. To address this, the authors consider the possibility
of an optional additional "forensic reporting mode" in which more of an optional additional "forensic reporting mode" in which more
details--such as certificate chains and MTA banners--may be details--such as certificate chains and MTA banners--may be
reported. See the section _Future_ _Work_ for more details.) reported.)
The formal definition of the "_mta_sts" TXT record, defined using The formal definition of the "_smtp-tlsrpt" TXT record, defined using
[RFC5234], is as follows: [RFC5234], is as follows:
sts-text-record = sts-version *WSP %x3B *WSP sts-id tlsrpt-record = tlsrpt-version *WSP %x3B tlsrpt-rua
sts-version = "v" *WSP "=" *WSP %x54 %x4C %x53 tlsrpt-version = "v" *WSP "=" *WSP %x54 %x4C %x53
%x52 %x50 %x54 %x76 %x31 %x52 %x50 %x54 %x76 %x31
sts-id = "id" *WSP "=" *WSP 1*32(ALPHA / DIGIT) tlsrpt-rua = "rua" *WSP "=" *WSP tlsrpt-uri
tlsrpt-uri = URI
; "URI" is imported from [@!RFC3986]; commas (ASCII
; 0x2C) and exclamation points (ASCII 0x21)
; MUST be encoded; the numeric portion MUST fit
; within an unsigned 64-bit integer
If multiple TXT records for "_smtp-tlsrpt" are returned by the
resolver, records which do not begin with "v=TLSRPTv1;" are
discarded. If the number of resulting records is not one, senders
MUST assume the recipient domain does not implement TLSRPT.
3.1. Example Reporting Policy 3.1. Example Reporting Policy
3.1.1. Report using MAILTO 3.1.1. Report using MAILTO
_smtp_tlsrpt.mail.example.com. IN TXT \ _smtp-tlsrpt.example.com. IN TXT \
"v=TLSRPTv1;rua=mailto:reports@example.com" "v=TLSRPTv1;rua=mailto:reports@example.com"
3.1.2. Report using HTTPS 3.1.2. Report using HTTPS
_smtp_tlsrpt.mail.example.com. IN TXT \ _smtp-tlsrpt.example.com. IN TXT \
"v=TLSRPTv1; \ "v=TLSRPTv1; \
rua=https://reporting.example.com/v1/tlsrpt" rua=https://reporting.example.com/v1/tlsrpt"
4. Reporting Schema 4. Reporting Schema
The report is composed as a plain text file encoded in the JSON
format ([RFC7159]).
Aggregate reports contain the following fields: Aggregate reports contain the following fields:
o Report metadata: o Report metadata:
* The organization responsible for the report * The organization responsible for the report
+ Contact information for one or more responsible parties for * Contact information for one or more responsible parties for the
the contents of the report contents of the report
* A unique identifier for the report * A unique identifier for the report
* The reporting date range for the report * The reporting date range for the report
o Policy, consisting of: o Policy, consisting of:
* One of the following policy types: * One of the following policy types: (1) The SMTP MTA STS policy
applied (as a string) (2) The DANE TLSA record applied (as a
+ The SMTP MTA STS policy applied (as a string) string) (3) The literal string "no-policy-found", if neither a
TLSA nor MTA-STS policy could be found.
+ The DANE TLSA record applied (as a string) * The literal
string "no-policy-found", if neither a TLSA nor
MTA-STS policy could be found.
* The domain for which the policy is applied * The domain for which the policy is applied
* The MX host * The MX host
* An identifier for the policy (where applicable) * An identifier for the policy (where applicable)
o Aggregate counts, comprising result type, sending MTA IP, o Aggregate counts, comprising result type, sending MTA IP,
receiving MTA hostname, message count, and an optional additional receiving MTA hostname, session count, and an optional additional
information field containing a URI for recipients to review information field containing a URI for recipients to review
further information on a failure type. further information on a failure type.
Note that the failure types are non-exclusive; an aggregate report Note that the failure types are non-exclusive; an aggregate report
MAY contain overlapping "counts" of failure types where a single send may contain overlapping "counts" of failure types when a single send
attempt encountered multiple errors. attempt encountered multiple errors.
4.1. Result Types 4.1. Report Time-frame
The list of result types will start with the minimal set below, and The report SHOULD cover a full day, from 0000-2400 UTC. This should
is expected to grow over time based on real-world experience. The allow for easier correlation of failure events.
initial set is:
4.1.1. Success Type 4.2. Delivery Summary
o "success": This indicates that the sending MTA was able to 4.2.1. Success Count
o "success-count": This indicates that the sending MTA was able to
successfully negotiate a policy-compliant TLS connection, and successfully negotiate a policy-compliant TLS connection, and
serves to provide a "heartbeat" to receiving domains that serves to provide a "heartbeat" to receiving domains that
reporting is functional and tabulating correctly. reporting is functional and tabulating correctly. This field
contains an aggregate count of successful connections for the
reporting system.
4.1.2. Routing Failures 4.2.2. Failure Count
o "failure-count": This indicates that the sending MTA was unable to
successfully establish a connection with the receiving platform.
The "Result Types" section will elaborate on the failed
negotiation attempts. This field contains an aggregate count of
failed connections.
4.3. Result Types
The list of result types will start with the minimal set below, and
is expected to grow over time based on real-world experience. The
initial set is:
4.3.1. Routing Failures
o "mx-mismatch": This indicates that the MX resolved for the o "mx-mismatch": This indicates that the MX resolved for the
recipient domain did not match the MX constraint specified in the recipient domain did not match the MX constraint specified in the
policy. policy.
o "certificate-host-mismatch": This indicates that the certificate 4.3.2. Negotiation Failures
presented by the receiving MX did not match the MX hostname.
4.1.3. Negotiation Failures
o "starttls-not-supported": This indicates that the recipient MX did o "starttls-not-supported": This indicates that the recipient MX did
not support STARTTLS. not support STARTTLS.
o "invalid-certificate": This indicates that the certificate
presented by the receiving MX did not validate.
o "certificate-host-mismatch": This indicates that the certificate o "certificate-host-mismatch": This indicates that the certificate
presented did not adhere to the constraints specified in the STS presented did not adhere to the constraints specified in the STS
or DANE policy, e.g. if the CN field did not match the hostname or DANE policy, e.g. if the CN field did not match the hostname
of the MX. of the MX.
o "certificate-name-constraints-not-permitted": The certificate o "certificate-expired": This indicates that the certificate has
request contains a name that is not listed as permitted in the expired.
name constraints extension of the cert issuer.
o "certificate-name-constraints-excluded": The certificate request o "certificate-not-trusted": This a label that covers multiple
contains a name that is listed as excluded in the name constraints certificate related failures that include, but not limited to
extension of the issuer. errors such as untrusted/unknown CAs, certificate name contraints,
certificate chain errors etc. When using this declaration, the
reporting MTA SHOULD utilize the "failure-reason" to provide more
information to the receiving entity.
o "expired-certificate": This indicates that the certificate has o "validation-failure": This indicates a general failure for a
expired. reason not matching a category above. When using this
declaration, the reporting MTA SHOULD utilize the "failure-reason"
to provide more information to the receiving entity.
4.1.4. Policy Failures 4.3.3. Policy Failures
4.1.4.1. DANE-specific Policy Failures 4.3.3.1. DANE-specific Policy Failures
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. record associated with a DANE policy.
o "dnssec-invalid": This indicates a failure to authenticate DNS o "dnssec-invalid": This indicates a failure to authenticate DNS
records for a Policy Domain with a published TLSA record. records for a Policy Domain with a published TLSA record.
4.1.4.2. STS-specific Policy Failures 4.3.3.2. STS-specific Policy Failures
o "sts-invalid": This indicates a validation error for the overall o "sts-invalid": This indicates a validation error for the overall
MTA-STS policy. MTA-STS policy.
o "webpki-invalid": This indicates that the MTA-STS policy could not o "webpki-invalid": This indicates that the MTA-STS policy could not
be authenticated using PKIX validation. be authenticated using PKIX validation.
4.3.4. General Failures
When a negotiation failure can not be categorized into one of the
"Negotiation Failures" stated above, the reporter SHOULD use the
"validation-failure" category. As TLS grows and becomes more
complex, new mechanisms may not be easily categorized. This allows
for a generic feedback category. When this category is used, the
reporter SHOULD also use the "failure-reason-code" to give some
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
error text, such as "X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION".
4.3.5. Transient Failures
Transient errors due to too-busy network, TCP timeouts, etc. are not
required to be reported.
5. Report Delivery 5. Report Delivery
Reports can be delivered either as an email message via SMTP or via
HTTP POST.
5.1. Report Filename
The filename is typically constructed using the following ABNF:
filename = sender "!" policy-domain "!" begin-timestamp
"!" end-timestamp [ "!" unique-id ] "." extension
unique-id = 1*(ALPHA / DIGIT)
sender = domain ; imported from [@!RFC5322]
policy-domain = domain
begin-timestamp = 1*DIGIT
; seconds since 00:00:00 UTC January 1, 1970
; indicating start of the time range contained
; in the report
end-timestamp = 1*DIGIT
; seconds since 00:00:00 UTC January 1, 1970
; indicating end of the time range contained
; in the report
extension = "json" / "json.gz"
The extension MUST be "json" for a plain JSON file, or "json.gz" for
a JSON file compressed using GZIP.
"unique-id" allows an optional unique ID generated by the Sending MTA
to distinguish among multiple reports generated simultaneously by
different sources within the same Policy Domain. For example, this
is a possible filename for the gzip file of a report to the Policy
Domain "example.net" from the Sending MTA "mail.sender.example.com":
`mail.sender.example.com!example.net!1470013207!1470186007!001.json.gz`
5.2. Compression
The report SHOULD be subjected to GZIP compression for both email and
HTTPS transport. Declining to apply compression can cause the report
to be too large for a receiver to process (a commonly observed
receiver limit is ten megabytes); compressing the file increases the
chances of acceptance of the report at some compute cost.
5.3. Email Transport
The report MAY be delivered by email. No specific MIME message
structure is required. It is presumed that the aggregate reporting
address will be equipped to extract MIME parts with the prescribed
media type and filename and ignore the rest.
If compressed, the report should use the media type "application/
gzip" if compressed (see [RFC6713]), and "text/json" otherwise.
The [RFC5322].Subject field for individual report submissions SHOULD
conform to the following ABNF:
tlsrpt-subject = %x52.65.70.6f.72.74 1*FWS ; "Report"
%x44.6f.6d.61.69.6e.3a 1*FWS ; "Domain:"
domain-name 1*FWS ; from RFC 6376
%x53.75.62.6d.69.74.74.65.72.3a ; "Submitter:"
1*FWS domain-name 1*FWS
%x52.65.70.6f.72.74.2d.49.44.3a ; "Report-ID:"
msg-id ; from RFC 5322
The first domain-name indicates the DNS domain name about which the
report was generated. The second domain-name indicates the DNS
domain name representing the Sending MTA generating the report. The
purpose of the Report-ID: portion of the field is to enable the
Policy Domain to identify and ignore duplicate reports that might be
sent by a Sending MTA.
For instance, this is a possible Subject field for a report to the
Policy Domain "example.net" from the Sending MTA
"mail.sender.example.com". It is line-wrapped as allowed by
[RFC5322]:
Subject: Report Domain: example.net
Submitter: mail.sender.example.com
Report-ID: <735ff.e317+bf22029@mailexample.net>
Note that, when sending failure reports via SMTP, sending MTAs MUST Note that, when sending failure reports via SMTP, sending MTAs MUST
NOT honor SMTP STS or DANE TLSA failures. NOT honor SMTP STS or DANE TLSA failures.
5.4. HTTPS Transport
The report MAY be delivered by POST to HTTPS. If compressed, the
report should use the media type "application/gzip" (see [RFC6713]),
and "text/json" otherwise.
5.5. Delivery Retry
In the event of a delivery failure, regardless of the delivery
method, a sender SHOULD attempt redelivery for up to 24hrs after the
initial attempt. As previously stated the reports are optional, so
while it is ideal to attempt redelivery, it is not required. If
multiple retries are attempted, they should be on a logarithmic
scale.
6. IANA Considerations 6. IANA Considerations
There are no IANA considerations at this time. There are no IANA considerations at this time.
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:
skipping to change at page 8, line 14 skipping to change at page 11, line 40
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) today, this does not present a actual SMTP message payloads), this does not present a significant
significant new vulnerability. new vulnerability.
8. Appendix 1: JSON Report Schema o Reports as DDoS: TLSRPT allows specifying destinations for the
reports that are outside the authority of the Policy Domain, which
allows domains to delegate processing of reports to a partner
organization. However, an attacker who controls the Policy Domain
DNS could also use this mechanism to direct the reports to an
unwitting victim, flooding that victim with excessive reports.
DMARC [RFC7489] defines an elegant solution for verifying
delegation; however, since the attacker had less ability to
generate large reports than with DMARC failures, and since the
reports are generated by the sending MTA, such a delegation
mechanism is left for a future version of this specification.
8. Appendix 1: Example Reporting Policy
8.1. Report using MAILTO
_smtp-tlsrpt.mail.example.com. IN TXT \
"v=TLSRPTv1;rua=mailto:reports@example.com"
8.2. Report using HTTPS
_smtp-tlsrpt.mail.example.com. IN TXT \
"v=TLSRPTv1; \
rua=https://reporting.example.com/v1/tlsrpt"
9. Appendix 2: JSON Report Schema
The JSON schema is derived from the HPKP JSON schema [RFC7469] (cf. The JSON schema is derived from the HPKP JSON schema [RFC7469] (cf.
Section 3) Section 3)
{
{ "organization-name": organization-name,
"organization-name": organization-name, "date-range": {
"date-range": { "start-datetime": date-time,
"start-datetime": date-time, "end-datetime": date-time
"end-datetime": date-time },
}, "contact-info": email-address,
"contact-info": email-address, "report-id": report-id,
"report-id": report-id, "policy": {
"policy": { "policy-type": policy-type,
"policy-type": policy-type, "policy-string": policy-string,
"policy-string": policy-string, "policy-domain": domain,
"policy-domain": domain, "mx-host": mx-host-pattern
"mx-host": mx-host-pattern },
}, "summary": {
"report-items": [ "success-aggregate": total-successful-session-count,
{ "failure-aggregate:" total-failure-session-count
"result-type": result-type,
"sending-mta-ip": ip-address,
"receiving-mx-hostname": receiving-mx-hostname,
"message-count": message-count,
"additional-information": additional-info-uri
}
]
} }
"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 Figure: JSON Report Format
o "organization-name": The name of the organization responsible for o "organization-name": The name of the organization responsible for
the report. It is provided as a string. the report. It is provided as a string.
o "date-time": The date-time indicates the start- and end-times for o "date-time": The date-time indicates the start- and end-times for
the report range. It is provided as a string formatted according the report range. It is provided as a string formatted according
to Section 5.6, "Internet Date/Time Format", of [RFC3339]. 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 o "email-address": The contact information for a responsible party
of the report. It is provided as a string formatted according to of the report. It is provided as a string formatted according to
Section 3.4.1, "Addr-Spec", of [RFC5322]. Section 3.4.1, "Addr-Spec", of [RFC5322].
o "report-id": A unique identifier for the report. Report authors o "report-id": A unique identifier for the report. Report authors
may use whatever scheme they prefer to generate a unique may use whatever scheme they prefer to generate a unique
identifier. It is provided as a string. identifier. It is provided as a string.
o "policy-type": The type of policy that was applied by the sending o "policy-type": The type of policy that was applied by the sending
domain. Presently, the only two valid choices are "tlsa" and domain. Presently, the only three valid choices are "tlsa",
"sts". It is provided as a string. "sts", and the literal string "no-policy-found". It is provided
as a string.
o "policy-string": The string serialization of the policy, whether o "policy-string": The string serialization of the policy, whether
TLSA record or STS policy. Any linefeeds from the original policy TLSA record or STS policy. Any linefeeds from the original policy
MUST be replaced with [SP]. TODO: Help with specifics. MUST be replaced with [SP]. TODO: Help with specifics.
o "domain": The Policy Domain upon which the policy was applied. o "domain": The Policy Domain upon which the policy was applied.
For messages sent to "user@example.com" this field would contain For messages sent to "user@example.com" this field would contain
"example.com". It is provided as a string. "example.com". It is provided as a string.
o "mx-host-pattern": The pattern of MX hostnames from the applied o "mx-host-pattern": The pattern of MX hostnames from the applied
skipping to change at page 9, line 45 skipping to change at page 14, line 34
o "ip-address": The IP address of the sending MTA that attempted the o "ip-address": The IP address of the sending MTA that attempted the
STARTTLS connection. It is provided as a string representation of STARTTLS connection. It is provided as a string representation of
an IPv4 or IPv6 address in dot-decimal or colon-hexadecimal an IPv4 or IPv6 address in dot-decimal or colon-hexadecimal
notation. notation.
o "receiving-mx-hostname": The hostname of the receiving MTA MX o "receiving-mx-hostname": The hostname of the receiving MTA MX
record with which the sending MTA attempted to negotiate a record with which the sending MTA attempted to negotiate a
STARTTLS connection. STARTTLS connection.
o "message-count": The number of (attempted) messages that match the 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 SSL-enabled connections to the receiving
site.
o "failure-aggregate": The aggregate number (integer) of failures to
negotiate an SSL-enabled connection to the receiving site.
o "session-count": The number of (attempted) sessions that match the
relevant "result-type" for this section. relevant "result-type" for this section.
o "additional-info-uri": An optional URI pointing to additional o "additional-info-uri": An optional URI pointing to additional
information around the relevant "result-type". For example, this information around the relevant "result-type". For example, this
URI might host the complete certificate chain presented during an URI might host the complete certificate chain presented during an
attempted STARTTLS session. attempted STARTTLS session.
9. Appendix 2: Example JSON Report o "failure-reason-code": A text field to include an SSL-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",
"policy-string": "TODO: Add me", "policy-string": "{ \"version\": \"STSv1\",\"mode\": \"report\", \"mx\": [\"*.mail.company-y.com\"], \"max_age\": 86400 }",
"policy-domain": "company-y.com", "policy-domain": "company-y.com",
"mx-host": "*.mail.company-y.com" "mx-host": "*.mail.company-y.com"
}, },
"report-items": [{ "summary": {
"result-type": "ExpiredCertificate", "success-aggregate": 5326,
"sending-mta-ip": "98.136.216.25", "failure-aggregate": 303
"receiving-mx-hostname": "mx1.mail.company-y.com", }
"message-count": 100 "failure-details": [{
}, { "result-type": "certificate-expired",
"result-type": "StarttlsNotSupported", "sending-mta-ip": "98.136.216.25",
"sending-mta-ip": "98.22.33.99", "receiving-mx-hostname": "mx1.mail.company-y.com",
"receiving-mx-hostname": "mx2.mail.company-y.com", "session-count": 100
"message-count": 200, }, {
"additional-information": "hxxps://reports.company-x.com/ "result-type": "starttls-not-supported",
report_info?id=5065427c-23d3#StarttlsNotSupported" "sending-mta-ip": "98.22.33.99",
}] "receiving-mx-hostname": "mx2.mail.company-y.com",
"session-count": 200,
"additional-information": "hxxps://reports.company-x.com/
report_info?id=5065427c-23d3#StarttlsNotSupported"
}, {
"result-type: "validation-failure",
"sending-mta-ip": "47.97.15.2",
"receiving-mx-hostname: "mx-backup.mail.company-y.com",
"session-count": 3,
"failure-error-code": "X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED"
}]
} }
Example JSON report for a messages from Company-X to Company-Y, where Figure: Example JSON report for a messages from Company-X to
100 messages were attempted to Company Y servers with an expired Company-Y, where 100 sessions were attempted to Company Y servers
certificate and 200 messages were attempted to Company Y servers that with an expired certificate and 200 sessions were attempted to
did not successfully respond to the STARTTLS command. Company Y servers that did not successfully respond to the "STARTTLS"
command. Additionally 3 sessions failed due to
"X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED".
10. Normative References 11. 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, Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/
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, May 2000,
<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>.
[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, Specifications: ABNF", STD 68, RFC 5234, DOI 10.17487/
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, [RFC5322] Resnick, P., Ed., "Internet Message Format", RFC 5322, DOI
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>.
[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>.
[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
Interchange Format", RFC 7159, DOI 10.17487/RFC7159, March
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
2015, <http://www.rfc-editor.org/info/rfc7469>. 2015, <http://www.rfc-editor.org/info/rfc7469>.
[RFC7489] Kucherawy, M., Ed. and E. Zwicky, Ed., "Domain-based [RFC7489] Kucherawy, M., Ed. and E. Zwicky, Ed., "Domain-based
Message Authentication, Reporting, and Conformance Message Authentication, Reporting, and Conformance
skipping to change at page 12, line 4 skipping to change at page 17, line 28
Message Authentication, Reporting, and Conformance Message Authentication, Reporting, and Conformance
(DMARC)", RFC 7489, DOI 10.17487/RFC7489, March 2015, (DMARC)", RFC 7489, DOI 10.17487/RFC7489, March 2015,
<http://www.rfc-editor.org/info/rfc7489>. <http://www.rfc-editor.org/info/rfc7489>.
Authors' Addresses Authors' Addresses
Daniel Margolis Daniel Margolis
Google, Inc Google, Inc
Email: dmargolis (at) google.com Email: dmargolis (at) google.com
Alexander Brotman Alexander Brotman
Comcast, Inc Comcast, Inc
Email: alexander_brotman (at) cable.comcast (dot com) Email: alex_brotman (at) comcast.com
Binu Ramakrishnan Binu Ramakrishnan
Yahoo!, Inc Yahoo!, Inc
Email: rbinu (at) yahoo-inc (dot com) Email: rbinu (at) yahoo-inc (dot com)
Janet Jones Janet Jones
Microsoft, Inc Microsoft, Inc
Email: janet.jones (at) microsoft (dot com) Email: janet.jones (at) microsoft (dot com)
 End of changes. 61 change blocks. 
159 lines changed or deleted 388 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/