idnits 2.17.1 draft-ietf-uta-smtp-tlsrpt-21.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** There are 2 instances of too long lines in the document, the longest one being 36 characters in excess of 72. == There are 1 instance of lines with non-RFC2606-compliant FQDNs in the document. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year ** The document contains RFC2119-like boilerplate, but doesn't seem to mention RFC 2119. The boilerplate contains a reference [BCP 14], but that reference does not seem to mention RFC 2119 either. -- The document date (May 20, 2018) is 2160 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Missing Reference: 'BCP 14' is mentioned on line 153, but not defined == Missing Reference: 'RFC7671' is mentioned on line 165, but not defined -- Looks like a reference, but probably isn't: '1' on line 1314 -- Looks like a reference, but probably isn't: '2' on line 1316 == Missing Reference: 'CFWS' is mentioned on line 747, but not defined == Missing Reference: 'RFCXXXX' is mentioned on line 879, but not defined == Outdated reference: A later version (-21) exists of draft-ietf-uta-mta-sts-17 ** Downref: Normative reference to an Informational RFC: RFC 1952 ** Obsolete normative reference: RFC 4408 (Obsoleted by RFC 7208) ** Obsolete normative reference: RFC 6125 (Obsoleted by RFC 9525) ** Downref: Normative reference to an Informational RFC: RFC 6713 ** Obsolete normative reference: RFC 7231 (Obsoleted by RFC 9110) -- Obsolete informational reference (is this intentional?): RFC 3501 (Obsoleted by RFC 9051) -- Obsolete informational reference (is this intentional?): RFC 7321 (Obsoleted by RFC 8221) Summary: 7 errors (**), 0 flaws (~~), 7 warnings (==), 5 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Using TLS in Applications D. Margolis 3 Internet-Draft Google, Inc 4 Intended status: Standards Track A. Brotman 5 Expires: November 21, 2018 Comcast, Inc 6 B. Ramakrishnan 7 Yahoo!, Inc 8 J. Jones 9 Microsoft, Inc 10 M. Risher 11 Google, Inc 12 May 20, 2018 14 SMTP TLS Reporting 15 draft-ietf-uta-smtp-tlsrpt-21 17 Abstract 19 A number of protocols exist for establishing encrypted channels 20 between SMTP Mail Transfer Agents, including STARTTLS, DANE TLSA, and 21 MTA-STS. These protocols can fail due to misconfiguration or active 22 attack, leading to undelivered messages or delivery over unencrypted 23 or unauthenticated channels. This document describes a reporting 24 mechanism and format by which sending systems can share statistics 25 and specific information about potential failures with recipient 26 domains. Recipient domains can then use this information to both 27 detect potential attacks and diagnose unintentional 28 misconfigurations. 30 Status of This Memo 32 This Internet-Draft is submitted in full conformance with the 33 provisions of BCP 78 and BCP 79. 35 Internet-Drafts are working documents of the Internet Engineering 36 Task Force (IETF). Note that other groups may also distribute 37 working documents as Internet-Drafts. The list of current Internet- 38 Drafts is at http://datatracker.ietf.org/drafts/current/. 40 Internet-Drafts are draft documents valid for a maximum of six months 41 and may be updated, replaced, or obsoleted by other documents at any 42 time. It is inappropriate to use Internet-Drafts as reference 43 material or to cite them other than as "work in progress." 45 This Internet-Draft will expire on November 21, 2018. 47 Copyright Notice 49 Copyright (c) 2018 IETF Trust and the persons identified as the 50 document authors. All rights reserved. 52 This document is subject to BCP 78 and the IETF Trust's Legal 53 Provisions Relating to IETF Documents 54 (http://trustee.ietf.org/license-info) in effect on the date of 55 publication of this document. Please review these documents 56 carefully, as they describe your rights and restrictions with respect 57 to this document. Code Components extracted from this document must 58 include Simplified BSD License text as described in Section 4.e of 59 the Trust Legal Provisions and are provided without warranty as 60 described in the Simplified BSD License. 62 Table of Contents 64 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 65 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4 66 2. Related Technologies . . . . . . . . . . . . . . . . . . . . 4 67 3. Reporting Policy . . . . . . . . . . . . . . . . . . . . . . 5 68 3.1. Example Reporting Policy . . . . . . . . . . . . . . . . 7 69 3.1.1. Report using MAILTO . . . . . . . . . . . . . . . . . 7 70 3.1.2. Report using HTTPS . . . . . . . . . . . . . . . . . 7 71 4. Reporting Schema . . . . . . . . . . . . . . . . . . . . . . 7 72 4.1. Report Time-frame . . . . . . . . . . . . . . . . . . . . 8 73 4.2. Delivery Summary . . . . . . . . . . . . . . . . . . . . 9 74 4.2.1. Success Count . . . . . . . . . . . . . . . . . . . . 9 75 4.2.2. Failure Count . . . . . . . . . . . . . . . . . . . . 9 76 4.3. Result Types . . . . . . . . . . . . . . . . . . . . . . 9 77 4.3.1. Negotiation Failures . . . . . . . . . . . . . . . . 10 78 4.3.2. Policy Failures . . . . . . . . . . . . . . . . . . . 10 79 4.3.3. General Failures . . . . . . . . . . . . . . . . . . 11 80 4.3.4. Transient Failures . . . . . . . . . . . . . . . . . 11 81 4.4. JSON Report Schema . . . . . . . . . . . . . . . . . . . 11 82 4.5. Policy Samples . . . . . . . . . . . . . . . . . . . . . 14 83 5. Report Delivery . . . . . . . . . . . . . . . . . . . . . . . 15 84 5.1. Report Filename . . . . . . . . . . . . . . . . . . . . . 15 85 5.2. Compression . . . . . . . . . . . . . . . . . . . . . . . 16 86 5.3. Email Transport . . . . . . . . . . . . . . . . . . . . . 16 87 5.3.1. Example Report . . . . . . . . . . . . . . . . . . . 17 88 5.4. HTTPS Transport . . . . . . . . . . . . . . . . . . . . . 18 89 5.5. Delivery Retry . . . . . . . . . . . . . . . . . . . . . 19 90 5.6. Metadata Variances . . . . . . . . . . . . . . . . . . . 19 91 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 19 92 6.1. Message headers . . . . . . . . . . . . . . . . . . . . . 19 93 6.2. Report Type . . . . . . . . . . . . . . . . . . . . . . . 19 94 6.3. +gzip Media Type Suffix . . . . . . . . . . . . . . . . . 20 95 6.4. application/tlsrpt+json Media Type . . . . . . . . . . . 21 96 6.5. application/tlsrpt+gzip Media Type . . . . . . . . . . . 23 97 6.6. STARTTLS Validation Result Types . . . . . . . . . . . . 24 98 7. Security Considerations . . . . . . . . . . . . . . . . . . . 24 99 8. Privacy Considerations . . . . . . . . . . . . . . . . . . . 26 100 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 26 101 9.1. Normative References . . . . . . . . . . . . . . . . . . 26 102 9.2. Informative References . . . . . . . . . . . . . . . . . 28 103 9.3. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 29 104 Appendix A. Example Reporting Policy . . . . . . . . . . . . . . 29 105 A.1. Report using MAILTO . . . . . . . . . . . . . . . . . . . 29 106 A.2. Report using HTTPS . . . . . . . . . . . . . . . . . . . 29 107 Appendix B. Example JSON Report . . . . . . . . . . . . . . . . 30 108 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 32 110 1. Introduction 112 The STARTTLS extension to SMTP [RFC3207] allows SMTP clients and 113 hosts to establish secure SMTP sessions over TLS. The protocol 114 design uses an approach that has come to be known as "Opportunistic 115 Security" (OS) [RFC7435]. This method maintains interoperability 116 with clients that do not support STARTTLS, but means that any 117 attacker could potentially eavesdrop on a session. An attacker could 118 perform a downgrade or interception attack by deleting parts of the 119 SMTP session (such as the "250 STARTTLS" response) or redirect the 120 entire SMTP session (perhaps by overwriting the resolved MX record of 121 the delivery domain). 123 Because such "downgrade attacks" are not necessarily apparent to the 124 receiving MTA, this document defines a mechanism for sending domains 125 to report on failures at multiple stages of the MTA-to-MTA 126 conversation. 128 Recipient domains may also use the mechanisms defined by MTA-STS 129 [I-D.ietf-uta-mta-sts] or DANE [RFC6698] to publish additional 130 encryption and authentication requirements; this document defines a 131 mechanism for sending domains that are compatible with MTA-STS or 132 DANE to share success and failure statistics with recipient domains. 134 Specifically, this document defines a reporting schema that covers 135 failures in routing, DNS resolution, STARTTLS negotiation, and both 136 DANE [RFC6698] and MTA-STS [I-D.ietf-uta-mta-sts] policy validation 137 errors, and a standard TXT record that recipient domains can use to 138 indicate where reports in this format should be sent. The report can 139 also serve as a heartbeat that systems are successfully negotiating 140 TLS during sessions as expected. 142 This document is intended as a companion to the specification for 143 SMTP MTA Strict Transport Security [I-D.ietf-uta-mta-sts], as well as 144 adds reporting abilities for those implementing DANE [RFC7672]. 146 1.1. Terminology 148 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 149 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 150 "OPTIONAL" in this document are to be interpreted as described in 151 [BCP 14] [RFC2119] [RFC8174] when, and only when, they appear in all 152 capitals, as shown here. 154 We also define the following terms for further use in this document: 156 o MTA-STS Policy: A mechanism by which administrators can specify 157 the expected TLS availability, presented identity, and desired 158 actions for a given email recipient domain. MTA-STS is defined in 159 [I-D.ietf-uta-mta-sts]. 161 o DANE Policy: A mechanism by which administrators can use DNSSEC to 162 commit an MTA to support STARTTLS and to publish criteria to be 163 used to validate its presented certificates. DANE for SMTP is 164 defined in [RFC7672], with the base specification in [RFC6698] 165 (updated in [RFC7671]. 167 o TLSRPT Policy: A policy specifying the endpoint to which sending 168 MTAs should deliver reports. 170 o Policy Domain: The domain against which an MTA-STS or DANE Policy 171 is defined. For MTA-STS this is typically the same as the 172 envelope recipient domain [RFC5321], but when mail is routed to a 173 "smarthost" gateway by local policy, the "smarthost" domain name 174 is used instead. For DANE the Policy Domain is the "TLSA base 175 domain" of the receiving SMTP server as described in RFC7672 [1] 176 and RFC6698 [2]. 178 o Sending MTA: The MTA initiating the relay of an email message. 180 o Aggregate Report URI (rua): A comma-separated list of locations 181 where the report is to be submitted. 183 2. Related Technologies 185 o This document is intended as a companion to the specification for 186 SMTP MTA Strict Transport Security [I-D.ietf-uta-mta-sts]. 188 o SMTP-TLSRPT defines a mechanism for sending domains that are 189 compatible with MTA-STS or DANE to share success and failure 190 statistics with recipient domains. DANE is defined in [RFC6698] 191 and MTA-STS is defined in [I-D.ietf-uta-mta-sts]. 193 3. Reporting Policy 195 A domain publishes a record to its DNS indicating that it wishes to 196 receive reports. These SMTP TLSRPT policies are distributed via DNS 197 from the Policy Domain's zone, as TXT records (similar to DMARC 198 policies) under the name "_smtp._tls". For example, for the Policy 199 Domain "example.com", the recipient's TLSRPT policy can be retrieved 200 from "_smtp._tls.example.com". 202 Policies consist of the following directives: 204 o "v": This document defines version 1 of TLSRPT, for which this 205 value MUST be equal to "TLSRPTv1". Other versions may be defined 206 in later documents. 208 o "rua": A URI specifying the endpoint to which aggregate 209 information about policy validation results should be sent (see 210 Section 4, "Reporting Schema", for more information). Two URI 211 schemes are supported: "mailto" and "https". As with DMARC 212 [RFC7489], the policy domain can specify a comma-separated list of 213 URIs. 215 o In the case of "https", reports should be submitted via POST 216 ([RFC7231]) to the specified URI. Report submitters MAY ignore 217 certificate validation errors when submitting reports via https. 219 o In the case of "mailto", reports should be submitted to the 220 specified email address ([RFC6068]). When sending failure reports 221 via SMTP, sending MTAs MUST deliver reports despite any TLS- 222 related failures and SHOULD NOT include this SMTP session in the 223 next report. When sending failure reports via HTTPS, sending MTAs 224 MAY deliver reports despite any TLS-related faliures. This may 225 mean that the reports are delivered in the clear. Reports sent 226 via SMTP MUST contain a valid DKIM [RFC6376] signature by the 227 reporting domain. Reports lacking such a signature MUST be 228 ignored by the recipient. DKIM signatures must not use the "l=" 229 attribute to limit the body length used in the signature. The 230 DKIM TXT record must contain the appropriate service type 231 declaration, "s=tlsrpt", and if not present the receiving system 232 SHOULD ignore reports signed using this record. 234 The formal definition of the "_smtp._tls" TXT record, defined using 235 [RFC5234] & [RFC7405], is as follows: 237 tlsrpt-record = tlsrpt-version 1*(field-delim tlsrpt-field) 238 [field-delim] 240 field-delim = *WSP ";" *WSP 242 tlsrpt-field = tlsrpt-rua / ; Note that the 243 tlsrpt-extension ; tlsrpt-rua record is 244 ; required. 246 tlsrpt-version = %s"v=TLSRPTv1" 248 tlsrpt-rua = %s"rua=" 249 tlsrpt-uri *(*WSP "," *WSP tlsrpt-uri) 251 tlsrpt-uri = URI 252 ; "URI" is imported from [RFC3986]; 253 ; commas (ASCII 0x2C), exclamation 254 ; points (ASCII 0x21), and semicolons 255 ; (ASCII 0x3B) MUST be encoded 257 tlsrpt-extension = tlsrpt-ext-name "=" tlsrpt-ext-value 259 tlsrpt-ext-name = (ALPHA / DIGIT) *31(ALPHA / 260 DIGIT / "_" / "-" / ".") 262 tlsrpt-ext-value = 1*(%x21-3A / %x3C / %x3E-7E) 263 ; chars excluding "=", ";", SP, and control 264 ; chars 266 If multiple TXT records for "_smtp._tls" are returned by the 267 resolver, records which do not begin with "v=TLSRPTv1;" are 268 discarded. If the number of resulting records is not one, senders 269 MUST assume the recipient domain does not implement TLSRPT. If the 270 resulting TXT record contains multiple strings (as described in 271 Section 3.1.3 of [RFC4408]), then the record MUST be treated as if 272 those strings are concatenated together without adding spaces. 274 The record supports the abillity to declare more than one rua, and if 275 there exists more than one, the reporter MAY attempt to deliver to 276 each of the supported rua destinations. A receiver MAY opt to only 277 attempt delivery to one of the endpoints, however the report SHOULD 278 NOT be considered successfully delivered until one of the endpoints 279 accepts delivery of the report. 281 Parsers MUST accept TXT records which are syntactically valid (i.e. 282 valid key-value pairs separated by semi-colons) and implementing a 283 superset of this specification, in which case unknown fields SHALL be 284 ignored. 286 3.1. Example Reporting Policy 288 3.1.1. Report using MAILTO 290 _smtp._tls.example.com. IN TXT \ 291 "v=TLSRPTv1;rua=mailto:reports@example.com" 293 3.1.2. Report using HTTPS 295 _smtp._tls.example.com. IN TXT \ 296 "v=TLSRPTv1; \ 297 rua=https://reporting.example.com/v1/tlsrpt" 299 4. Reporting Schema 301 The report is composed as a plain text file encoded in the I-JSON 302 format ([RFC7493]). 304 Aggregate reports contain the following fields: 306 o Report metadata: 308 * The organization responsible for the report 310 * Contact information for one or more responsible parties for the 311 contents of the report 313 * A unique identifier for the report 315 * The reporting date range for the report 317 o Policy, consisting of: 319 * One of the following policy types: (1) The MTA-STS policy 320 applied (as a string) (2) The DANE TLSA record applied (as a 321 string, with each RR entry of the RRset listed and separated by 322 a semicolon) (3) The literal string "no-policy-found", if 323 neither a DANE nor MTA-STS policy could be found. 325 * The domain for which the policy is applied 327 * The MX host 329 o Aggregate counts, comprising result type, sending MTA IP, 330 receiving MTA hostname, session count, and an optional additional 331 information field containing a URI for recipients to review 332 further information on a failure type. 334 Note that the failure types are non-exclusive; an aggregate report 335 may contain overlapping "counts" of failure types when a single send 336 attempt encountered multiple errors. Reporters may report multiple 337 applied policies (for example, an MTA-STS policy and a DANE TLSA 338 record for the same domain and MX). Because of this, even in the 339 case where only a single policy was applied, the "policies" field of 340 the report body MUST be an array and not a singular value. 342 In the case of multiple failure types, the "failure-details" array 343 would contain multiple entries. Each entry would have its own set of 344 infomation pertaining to that failure type. 346 4.1. Report Time-frame 348 The report SHOULD cover a full day, from 0000-2400 UTC. This should 349 allow for easier correlation of failure events. To avoid a Denial of 350 Service against the system processing the reports, the reports should 351 be delivered after some delay, perhaps several hours. 353 As an example, a sending site might want to introduce a random delay 354 of up to four hours: 356 func generate_sleep_delay() { 357 min_delay = 1 358 max_delay = 14400 359 rand = random(min_delay,max_delay) 360 return rand 361 } 363 func generate_report(policy_domain) { 364 do_rpt_work(policy_domain) 365 send_rpt(policy_domain) 366 } 368 func generate_tlsrpt() { 369 sleep(generate_sleep_delay()) 370 for policy_domain in list_of_tlsrpt_enabled_domains { 371 generate_report(policy_domain) 372 } 373 } 375 A sending site might wish to introduce a random delay per destination 376 site, up to four hours: 378 func generate_sleep_delay() { 379 min_delay = 1 380 max_delay = 14400 381 rand = random(min_delay,max_delay) 382 return rand 383 } 385 func generate_report(policy_domain) { 386 sleep(generate_sleep_delay()) 387 do_rpt_work(policy_domain) 388 send_rpt(policy_domain) 389 } 391 func generate_tlsrpt() { 392 for policy_domain in list_of_tlsrpt_enabled_domains { 393 generate_report(policy_domain) 394 } 395 } 397 4.2. Delivery Summary 399 4.2.1. Success Count 401 o "total-successful-session-count": This indicates that the sending 402 MTA was able to successfully negotiate a policy-compliant TLS 403 connection, and serves to provide a "heartbeat" to receiving 404 domains that reporting is functional and tabulating correctly. 405 This field contains an aggregate count of successful connections 406 for the reporting system. 408 4.2.2. Failure Count 410 o "total-failure-session-count": This indicates that the sending MTA 411 was unable to successfully establish a connection with the 412 receiving platform. Section 4.3, "Result Types", will elaborate 413 on the failed negotiation attempts. This field contains an 414 aggregate count of failed connections. 416 4.3. Result Types 418 The list of result types will start with the minimal set below, and 419 is expected to grow over time based on real-world experience. The 420 initial set is: 422 4.3.1. Negotiation Failures 424 o "starttls-not-supported": This indicates that the recipient MX did 425 not support STARTTLS. 427 o "certificate-host-mismatch": This indicates that the certificate 428 presented did not adhere to the constraints specified in the MTA- 429 STS or DANE policy, e.g. if the MX hostname does not match any 430 identities listed in the Subject Alternate Name (SAN) [RFC5280]. 432 o "certificate-expired": This indicates that the certificate has 433 expired. 435 o "certificate-not-trusted": This a label that covers multiple 436 certificate related failures that include, but not limited to 437 errors such as untrusted/unknown CAs, certificate name 438 constraints, certificate chain errors etc. When using this 439 declaration, the reporting MTA SHOULD utilize the "failure-reason- 440 code" to provide more information to the receiving entity. 442 o "validation-failure": This indicates a general failure for a 443 reason not matching a category above. When using this 444 declaration, the reporting MTA SHOULD utilize the "failure-reason- 445 code" to provide more information to the receiving entity. 447 4.3.2. Policy Failures 449 4.3.2.1. DANE-specific Policy Failures 451 o "tlsa-invalid": This indicates a validation error in the TLSA 452 record associated with a DANE policy. None of the records in the 453 RRset were found to be valid. 455 o "dnssec-invalid": This would indicate that no valid records were 456 returned from the recursive resolver. The request returned with 457 SERVFAIL for the requested TLSA record. 459 o "dane-required": This indicates that the sending system is 460 configured to require DANE TLSA records for all the MX hosts of 461 the destination domain, but no DNSSEC-validated TLSA records were 462 present for the MX host that is the subject of the report. 463 Mandatory DANE for SMTP is described in section 6 of [RFC7672]. 464 Such policies may be created by mutual agreement between two 465 organizations that frequently exchange sensitive content via 466 email. 468 4.3.2.2. MTA-STS-specific Policy Failures 470 o "sts-policy-invalid": This indicates a validation error for the 471 overall MTA-STS policy. 473 o "sts-webpki-invalid": This indicates that the MTA-STS policy could 474 not be authenticated using PKIX validation. 476 4.3.3. General Failures 478 When a negotiation failure can not be categorized into one of the 479 "Negotiation Failures" stated above, the reporter SHOULD use the 480 "validation-failure" category. As TLS grows and becomes more 481 complex, new mechanisms may not be easily categorized. This allows 482 for a generic feedback category. When this category is used, the 483 reporter SHOULD also use the "failure-reason-code" to give some 484 feedback to the receiving entity. This is intended to be a short 485 text field, and the contents of the field should be an error code or 486 error text, such as "X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION". 488 4.3.4. Transient Failures 490 Transient errors due to too-busy network, TCP timeouts, etc. are not 491 required to be reported. 493 4.4. JSON Report Schema 495 The JSON schema is derived from the HPKP JSON schema [RFC7469] (cf. 496 Section 3) 498 { 499 "organization-name": organization-name, 500 "date-range": { 501 "start-datetime": date-time, 502 "end-datetime": date-time 503 }, 504 "contact-info": email-address, 505 "report-id": report-id, 506 "policies": [{ 507 "policy": { 508 "policy-type": policy-type, 509 "policy-string": policy-string, 510 "policy-domain": domain, 511 "mx-host": mx-host-pattern 512 }, 513 "summary": { 514 "total-successful-session-count": total-successful-session-count, 515 "total-failure-session-count": total-failure-session-count 516 }, 517 "failure-details": [ 518 { 519 "result-type": result-type, 520 "sending-mta-ip": ip-address, 521 "receiving-mx-hostname": receiving-mx-hostname, 522 "receiving-mx-helo": receiving-mx-helo, 523 "receiving-ip": receiving-ip, 524 "failed-session-count": failed-session-count, 525 "additional-information": additional-info-uri, 526 "failure-reason-code": failure-reason-code 527 } 528 ] 529 } 530 ] 531 } 533 JSON Report Format 535 o "organization-name": The name of the organization responsible for 536 the report. It is provided as a string. 538 o "date-time": The date-time indicates the start- and end-times for 539 the report range. It is provided as a string formatted according 540 to Section 5.6, "Internet Date/Time Format", of [RFC3339]. The 541 report should be for a full UTC day, 0000-2400. 543 o "email-address": The contact information for a responsible party 544 of the report. It is provided as a string formatted according to 545 Section 3.4.1, "Addr-Spec", of [RFC5321]. 547 o "report-id": A unique identifier for the report. Report authors 548 may use whatever scheme they prefer to generate a unique 549 identifier. It is provided as a string. 551 o "policy-type": The type of policy that was applied by the sending 552 domain. Presently, the only three valid choices are "tlsa", 553 "sts", and the literal string "no-policy-found". It is provided 554 as a string. 556 o "policy-string": An encoding of the applied policy as a JSON array 557 of strings, whether TLSA record ([RFC6698] section 2.3) or MTA-STS 558 policy. Examples follow in the next section. 560 o "domain": The Policy Domain is the domain against which the MTA- 561 STS or DANE policy is defined. In the case of Internationalized 562 Domain Names ([RFC5891]), the domain MUST consist of the Punycode- 563 encoded A-labels ([RFC3492]) and not the U-labels. 565 o "mx-host-pattern": The pattern of MX hostnames from the applied 566 policy. It is provided as a string, and is interpreted in the 567 same manner as the "Checking of Wildcard Certificates" rules in 568 Section 6.4.3 of [RFC6125]. In the case of Internationalized 569 Domain Names ([RFC5891]), the domain MUST consist of the Punycode- 570 encoded A-labels ([RFC3492]) and not the U-labels. 572 o "result-type": A value from Section 4.3, "Result Types", above. 574 o "ip-address": The IP address of the sending MTA that attempted the 575 STARTTLS connection. It is provided as a string representation of 576 an IPv4 (see below) or IPv6 ([RFC5952]) address in dot-decimal or 577 colon-hexadecimal notation. 579 o "receiving-mx-hostname": The hostname of the receiving MTA MX 580 record with which the sending MTA attempted to negotiate a 581 STARTTLS connection. 583 o "receiving-mx-helo": (optional) The HELO or EHLO string from the 584 banner announced during the reported session. 586 o "receiving-ip": The destination IP address that was using when 587 creating the outbound session. It is provided as a string 588 representation of an IPv4 (see below) or IPv6 ([RFC5952]) address 589 in dot-decimal or colon-hexadecimal notation. 591 o "total-successful-session-count": The aggregate count (integer, 592 encoded as a JSON number) of successfully negotiated TLS-enabled 593 connections to the receiving site. 595 o "total-failure-session-count": The aggregate count (integer, 596 encoded as a JSON number) of failures to negotiate a TLS-enabled 597 connection to the receiving site. 599 o "failed-session-count": The number of (attempted) sessions that 600 match the relevant "result-type" for this section (integer, 601 encoded as a JSON number). 603 o "additional-info-uri": An optional URI [RFC3986] pointing to 604 additional information around the relevant "result-type". For 605 example, this URI might host the complete certificate chain 606 presented during an attempted STARTTLS session. 608 o "failure-reason-code": A text field to include a TLS-related error 609 code or error message. 611 For report purposes, an IPv4 Address is defined via the following 612 ABNF: 614 IPv4address = dec-octet "." dec-octet "." dec-octet "." dec-octet 615 dec-octet = DIGIT ; 0-9 616 / %x31-39 DIGIT ; 10-99 617 / "1" 2DIGIT ; 100-199 618 / "2" %x30-34 DIGIT ; 200-249 619 / "25" %x30-35 ; 250-255 621 4.5. Policy Samples 623 Part of the report body includes the policy that is applied when 624 attemping relay to the destination. 626 For DANE TLSA policies, this is a JSON array of strings each 627 representing the RDATA of a single TLSA resource record as a space- 628 separated list of its four TLSA fields; the fields are in 629 presentation format (defined in [RFC6698] Section 2.2) with no 630 internal spaces or grouping parentheses: 632 [ 633 "3 0 1 1F850A337E6DB9C609C522D136A475638CC43E1ED424F8EEC8513D747D1D085D", 634 "3 0 1 12350A337E6DB9C6123522D136A475638CC43E1ED424F8EEC8513D747D1D1234" 635 ] 637 For MTA-STS policies, this is an array of JSON strings that 638 represents the policy that is declared by the receiving site, 639 including any errors that may be present. Note that where there are 640 multiple "mx" values, they must be listed as separate "mx" elements 641 in the policy array, rather as a single nested "mx" sub-array. 643 [ 644 "version: STSv1", 645 "mode: testing", 646 "mx: mx1.example.com", 647 "mx: mx2.example.com", 648 "mx: mx.backup-example.com", 649 "max_age: 604800" 650 ] 652 5. Report Delivery 654 Reports can be delivered either as an email message via SMTP or via 655 HTTP POST. 657 5.1. Report Filename 659 The filename is RECOMMENDED to be constructed using the following 660 ABNF: 662 filename = sender "!" policy-domain "!" begin-timestamp 663 "!" end-timestamp [ "!" unique-id ] "." extension 665 unique-id = 1*(ALPHA / DIGIT) 667 sender = domain ; From the [RFC5321] that is used 668 ; as the domain for the `contact-info` 669 ; address in the report body 671 policy-domain = domain 673 begin-timestamp = 1*DIGIT 674 ; seconds since 00:00:00 UTC January 1, 1970 675 ; indicating start of the time range contained 676 ; in the report 678 end-timestamp = 1*DIGIT 679 ; seconds since 00:00:00 UTC January 1, 1970 680 ; indicating end of the time range contained 681 ; in the report 683 extension = "json" / "json.gz" 685 The extension MUST be "json" for a plain JSON file, or "json.gz" for 686 a JSON file compressed using GZIP. 688 "unique-id" allows an optional unique ID generated by the Sending MTA 689 to distinguish among multiple reports generated simultaneously by 690 different sources within the same Policy Domain. For example, this 691 is a possible filename for a compressed report to the Policy Domain 692 "example.net" from the Sending MTA "mail.sndr.example.com": 694 "mail.sndr.example.com!example.net!1470013207!1470186007!001.json.gz" 696 5.2. Compression 698 The report SHOULD be subjected to GZIP [RFC1952] compression for both 699 email and HTTPS transport. Declining to apply compression can cause 700 the report to be too large for a receiver to process (a commonly 701 observed receiver limit is ten megabytes); compressing the file 702 increases the chances of acceptance of the report at some compute 703 cost. 705 5.3. Email Transport 707 The report MAY be delivered by email. To make the reports machine- 708 parsable for the receivers, we define a top-level media type 709 "multipart/report" with a new parameter "report-type="tlsrpt"". 710 Inside it, there are two parts: The first part is human readable, 711 typically "text/plain", and the second part is machine readable with 712 a new media type defined called "application/tlsrpt+json". If 713 compressed, the report should use the media type "application/ 714 tlsrpt+gzip". 716 In addition, the following two new top level message header fields 717 are defined: 719 "TLS-Report-Domain: Receiver-Domain" 721 "TLS-Report-Submitter: Sender-Domain" 723 The "TLS-Report-Submitter" value MUST match the value found in the 724 [RFC5321] domain from the "contact-info" from the report body. These 725 message headers MUST be included and should allow for easy searching 726 for all reports submitted by a report domain or a particular 727 submitter, for example in IMAP [RFC3501]: 729 "s SEARCH HEADER "TLS-Report-Domain" "example.com"" 731 It is presumed that the aggregate reporting address will be equipped 732 to process new message header fields and extract MIME parts with the 733 prescribed media type and filename, and ignore the rest. These 734 additional headers SHOULD be included in the DKIM [RFC6376] signature 735 for the message. 737 The [RFC5322].Subject field for report submissions SHOULD conform to 738 the following ABNF: 740 tlsrpt-subject = %s"Report" FWS ; "Report" 741 %s"Domain:" FWS ; "Domain:" 742 domain-name FWS ; per [RFC6376] 743 %s"Submitter:" FWS ; "Submitter:" 744 domain-name FWS ; per [RFC6376] 745 %s"Report-ID:" FWS ; "Report-ID: 746 "<" id-left "@" id-right ">" ; per [RFC5322] 747 [CFWS] ; per [RFC5322] 748 ; (as with FWS) 750 The first domain-name indicates the DNS domain name about which the 751 report was generated. The second domain-name indicates the DNS 752 domain name representing the Sending MTA generating the report. The 753 purpose of the Report-ID: portion of the field is to enable the 754 Policy Domain to identify and ignore duplicate reports that might be 755 sent by a Sending MTA. 757 For instance, this is a possible Subject field for a report to the 758 Policy Domain "example.net" from the Sending MTA 759 "mail.sender.example.com". It is line-wrapped as allowed by 760 [RFC5322]: 762 Subject: Report Domain: example.net 763 Submitter: mail.sender.example.com 764 Report-ID: <735ff.e317+bf22029@mailexample.net> 766 5.3.1. Example Report 767 From: tlsrpt@mail.sender.example.com 768 Date: Fri, May 09 2017 16:54:30 -0800 769 To: mts-sts-tlsrpt@example.net 770 Subject: Report Domain: example.net 771 Submitter: mail.sender.example.com 772 Report-ID: <735ff.e317+bf22029@example.net> 773 TLS-Report-Domain: example.net 774 TLS-Report-Submitter: mail.sender.example.com 775 MIME-Version: 1.0 776 Content-Type: multipart/report; report-type="tlsrpt"; 777 boundary="----=_NextPart_000_024E_01CC9B0A.AFE54C00" 778 Content-Language: en-us 780 This is a multipart message in MIME format. 782 ------=_NextPart_000_024E_01CC9B0A.AFE54C00 783 Content-Type: text/plain; charset="us-ascii" 784 Content-Transfer-Encoding: 7bit 786 This is an aggregate TLS report from mail.sender.example.com 788 ------=_NextPart_000_024E_01CC9B0A.AFE54C00 789 Content-Type: application/tlsrpt+gzip 790 Content-Transfer-Encoding: base64 791 Content-Disposition: attachment; 792 filename="mail.sender.example!example.com! 793 1013662812!1013749130.json.gz" 795 797 ------=_NextPart_000_024E_01CC9B0A.AFE54C00-- 798 ... 800 Note that, when sending failure reports via SMTP, sending MTAs MUST 801 NOT honor MTA-STS or DANE TLSA failures. 803 5.4. HTTPS Transport 805 The report MAY be delivered by POST to HTTPS. If compressed, the 806 report SHOULD use the media type "application/tlsrpt+gzip", and 807 "application/tlsrpt+json" otherwise (see section Section 6, "IANA 808 Considerations"). 810 The receiving system MUST return a "successful" response from its 811 HTTPS server, typically a 200 or 201 HTTP code [RFC7321]. Other 812 codes could indicate a delivery failure, and may be retried as per 813 local sender policy. The receiving system is not expected to process 814 reports at receipt time, and MAY store them for processing at a later 815 time. 817 5.5. Delivery Retry 819 In the event of a delivery failure, regardless of the delivery 820 method, a sender SHOULD attempt redelivery for up to 24hrs after the 821 initial attempt. As previously stated the reports are optional, so 822 while it is ideal to attempt redelivery, it is not required. If 823 multiple retries are attempted, ideally they SHOULD be done with 824 exponential backoff. 826 5.6. Metadata Variances 828 As stated above, there are a variable number of ways to declare 829 information about the data therein. If any of items declared via 830 subject or filename disagree with the report, the report MUST be 831 considered the authoritative source. 833 6. IANA Considerations 835 The following are the IANA considerations discussed in this document. 837 6.1. Message headers 839 Below is the Internet Assigned Numbers Authority (IANA) Permanent 840 Message Header Field registration information per [RFC3864]. 842 Header field name: TLS-Report-Domain 843 Applicable protocol: mail 844 Status: standard 845 Author/Change controller: IETF 846 Specification document(s): this one 848 Header field name: TLS-Report-Submitter 849 Applicable protocol: mail 850 Status: standard 851 Author/Change controller: IETF 852 Specification document(s): this one 854 6.2. Report Type 856 This document creates a new registry for "report-type" parameter to 857 the Content-Type header field for the "multipart/report" top-level 858 media type defined in [RFC6522]. 860 The registry name is "Report Type Registry", and the procedure for 861 updating the registry will be "Specification Required". 863 An entry in this registry should contain: 865 o the report-type being registered 867 o one or more registered media-types that can be used with this 868 report-type 870 o the document containing the registration action 872 o an optional comment 874 The initial entries are: 876 Report-Type: tlsrpt 877 Media Type: application/tlsrpt+gzip, application/tlsrpt+json 878 Registered By: [RFCXXXX] 879 Comment: Media types suitable for use with this report-type are defined in Sections 6.4 and 6.5 of [RFCXXXX] 881 Report-Type: disposition-notification 882 Media Type: message/disposition-notification 883 Registered By: [@?RFC8098] 885 Report-Type: disposition-notification 886 Media Type: message/global-disposition-notification 887 Registered By: [@?RFC6533] 889 Report-Type: delivery-status 890 Media Type: message/delivery-status 891 Registered By: [@?RFC3464] 893 Report-Type: delivery-status 894 Media Type: message/global-delivery-status 895 Registered By: [@?RFC6533] 897 6.3. +gzip Media Type Suffix 899 This document registers a new media type suffix "+gzip". The GZIP 900 format is a public domain, cross-platform, interoperable file storage 901 and transfer format, specified in [RFC1952]; it supports compression 902 and is used as the underlying representation by a variety of file 903 formats. The media type "application/gzip" has been registered for 904 such files. The suffix "+gzip" MAY be used with any media type whose 905 representation follows that established for "application/gzip". The 906 media type structured syntax suffix registration form follows: 908 Type name: GZIP file storage and transfer format 910 +suffix: +gzip 912 References: [RFC1952][RFC6713] 914 Encoding considerations: GZIP is a binary encoding. 916 Fragment identifier considerations: The syntax and semantics of 917 fragment identifiers specified for +gzip SHOULD be as specified for 918 "application/gzip". (At publication of this document, there is no 919 fragment identification syntax defined for "application/gzip".) The 920 syntax and semantics for fragment identifiers for a specific "xxx/ 921 yyy+gzip" SHOULD be processed as follows: 923 For cases defined in +gzip, where the fragment identifier 924 resolves per the +gzip rules, then process as specified in 925 +gzip. 927 For cases defined in +gzip, where the fragment identifier does 928 not resolve per the +gzip rules, then process as specified in 929 "xxx/yyy+gzip". 931 For cases not defined in +gzip, then process as specified in 932 "xxx/yyy+gzip". 934 Interoperability considerations: n/a 936 Security considerations: GZIP format doesn't provide encryption. See 937 also security considerations of [RFC6713]. Each individual media 938 type registered with a +gzip suffix can have additional security 939 considerations 941 Contact: art@ietf.org 943 Author/Change controller: Internet Engineering Task Force 944 (mailto:iesg@ietf.org). 946 6.4. application/tlsrpt+json Media Type 948 This document registers multiple media types, beginning with Table 1 949 below. 951 +-------------+----------------+-------------+-------------------+ 952 | Type | Subtype | File extn | Specification | 953 +-------------+----------------+-------------+-------------------+ 954 | application | tlsrpt+json | .json | Section 5.3 | 955 +-------------+----------------+-------------+-------------------+ 956 Table 1: SMTP TLS Reporting Media Type 958 Type name: application 960 Subtype name: tlsrpt+json 962 Required parameters: n/a 964 Optional parameters: n/a 966 Encoding considerations: Encoding considerations are identical to 967 those specified for the "application/json" media type. See 968 [RFC7493]. 970 Security considerations: Security considerations relating to SMTP TLS 971 Reporting are discussed in Section 7. Security considerations 972 related to zlib compression are discussed in [RFC6713]. 974 Interoperability considerations: This document specifies format of 975 conforming messages and the interpretation thereof. 977 Published specification: Section 5.3 of this document. 979 Applications that use this media type: Mail User Agents (MUA) and 980 Mail Transfer Agents. 982 Additional information: 984 Magic number(s): The first two bytes are 0x1f, 0x8b. 986 File extension(s): ".json" 988 Macintosh file type code(s): n/a 990 Person & email address to contact for further information: See 991 Authors' Addresses section. 993 Intended usage: COMMON 995 Restrictions on usage: n/a 997 Author: See Authors' Addresses section. 999 Change controller: Internet Engineering Task Force 1000 (mailto:iesg@ietf.org). 1002 6.5. application/tlsrpt+gzip Media Type 1004 +-------------+----------------+-------------+-------------------+ 1005 | Type | Subtype | File extn | Specification | 1006 +-------------+----------------+-------------+-------------------+ 1007 | application | tlsrpt+gzip | .gz | Section 5.3 | 1008 +-------------+----------------+-------------+-------------------+ 1009 Table 2: SMTP TLS Reporting Media Type 1011 Type name: application 1013 Subtype name: tlsrpt+gzip 1015 Required parameters: n/a 1017 Optional parameters: n/a 1019 Encoding considerations: Binary 1021 Security considerations: Security considerations relating to SMTP TLS 1022 Reporting are discussed in Section 7. 1024 Interoperability considerations: This document specifies format of 1025 conforming messages and the interpretation thereof. 1027 Published specification: Section 5.3 of this document. 1029 Applications that use this media type: Mail User Agents (MUA) and 1030 Mail Transfer Agents. 1032 Additional information: 1034 Magic number(s): n/a 1036 File extension(s): ".gz" 1038 Macintosh file type code(s): n/a 1040 Person & email address to contact for further information: See 1041 Authors' Addresses section. 1043 Intended usage: COMMON 1045 Restrictions on usage: n/a 1046 Author: See Authors' Addresses section. 1048 Change controller: Internet Engineering Task Force 1049 (mailto:iesg@ietf.org). 1051 6.6. STARTTLS Validation Result Types 1053 This document creates a new registry, "STARTTLS Validation Result 1054 Types". The initial entries in the registry are: 1056 +-------------------------------+-----------+ 1057 | Result Type | Desc | 1058 +-------------------------------+-----------+ 1059 | "starttls-not-supported" | 4.3 | 1060 | "certificate-host-mismatch" | 4.3 | 1061 | "certificate-expired" | 4.3 | 1062 | "tlsa-invalid" | 4.3 | 1063 | "dnssec-invalid" | 4.3 | 1064 | "dane-required" | 4.3 | 1065 | "certificate-not-trusted" | 4.3 | 1066 | "sts-policy-invalid" | 4.3 | 1067 | "sts-webpki-invalid" | 4.3 | 1068 | "validation-failure" | 4.3 | 1069 +-------------------------------+-----------+ 1071 The above entries are described in section Section 4.3, "Result 1072 Types." New result types can be added to this registry using "Expert 1073 Review" IANA registration policy. 1075 7. Security Considerations 1077 SMTP TLS Reporting provides transparency into misconfigurations or 1078 attempts to intercept or tamper with mail between hosts who support 1079 STARTTLS. There are several security risks presented by the 1080 existence of this reporting channel: 1082 o Flooding of the Aggregate report URI (rua) endpoint: An attacker 1083 could flood the endpoint with excessive reporting traffic and 1084 prevent the receiving domain from accepting additional reports. 1085 This type of Denial-of-Service attack would limit visibility into 1086 STARTTLS failures, leaving the receiving domain blind to an 1087 ongoing attack. 1089 o Untrusted content: An attacker could inject malicious code into 1090 the report, opening a vulnerability in the receiving domain. 1091 Implementers are advised to take precautions against evaluating 1092 the contents of the report. 1094 o Report snooping: An attacker could create a bogus TLSRPT record to 1095 receive statistics about a domain the attacker does not own. 1096 Since an attacker able to poison DNS is already able to receive 1097 counts of SMTP connections (and, absent DANE or MTA-STS policies, 1098 actual SMTP message payloads), this does not present a significant 1099 new vulnerability. 1101 o Ignoring HTTPS validation when submitting reports: When reporting 1102 benign misconfigurations, it is likely that a misconfigured SMTP 1103 server may also mean a misconfigured HTTPS server; as a result, 1104 reporters who required HTTPS validity on the reporting endpoint 1105 may fail to alert administrators about such misconfigurations. 1106 Conversely, in the event of an actual attack, an attacker who 1107 wished to create a gap in reporting and could intercept HTTPS 1108 reports could, just as easily, simply thwart the resolution of the 1109 TLSRPT TXT record or establishment of the TCP session to the HTTPS 1110 endpoint. Furthermore, such a man-in-the-middle attacker could 1111 discover most or all of the metadata exposed in a report merely 1112 through passive observation. As a result, we consider the risks 1113 of failure to deliver reports on misconfigurations to outweigh 1114 those of attackers intercepting reports. 1116 o Reports as DDoS: TLSRPT allows specifying destinations for the 1117 reports that are outside the authority of the Policy Domain, which 1118 allows domains to delegate processing of reports to a partner 1119 organization. However, an attacker who controls the Policy Domain 1120 DNS could also use this mechanism to direct the reports to an 1121 unwitting victim, flooding that victim with excessive reports. 1122 DMARC [RFC7489] defines a solution for verifying delegation to 1123 avoid such attacks; the need for this is greater with DMARC, 1124 however, because DMARC allows an attacker to trigger reports to a 1125 target from an innocent third party by sending that third party 1126 mail (which triggers a report from the third party to the target). 1127 In the case of TLSRPT, the attacker would have to induce the third 1128 party to send the attacker mail in order to trigger reports from 1129 the third party to the victim; this reduces the risk of such an 1130 attack and the need for a verification mechanism. 1132 Finally, because TLSRPT is intended to help administrators discover 1133 man-in-the-middle attacks against transport-layer encryption, 1134 including attacks designed to thwart negotiation of encrypted 1135 connections (by downgrading opportunistic encryption or, in the case 1136 of MTA-STS, preventing discovery of a new MTA-STS policy), we must 1137 also consider the risk that an adversary who can induce such a 1138 downgrade attack can also prevent discovery of the TLSRPT TXT record 1139 (and thus prevent discovery of the successful downgrade attack). 1140 Administrators are thus encouraged to deploy TLSRPT TXT records with 1141 a large TTL (reducing the window for successful application of 1142 transient attacks against DNS resolution of the record) or to deploy 1143 DNSSEC on the deploying zone. 1145 8. Privacy Considerations 1147 MTAs are generally considered public knowledge, however, the 1148 internals of how those MTAs are configured and the users of those 1149 MTAs may not be as public. It should be noted that when providing a 1150 receiving site with information, it may reveal information about the 1151 sender's configuration, or even information about the senders 1152 themselves. Consider that by sending a report, it might disclose 1153 your SSL library version as the inability to negotiate a session may 1154 be a known incompatbility between two library versions, or perhaps 1155 commonly used in a operating system release that is centered in a 1156 certain region. The risk may be minimal, but should be considered. 1158 9. References 1160 9.1. Normative References 1162 [I-D.ietf-uta-mta-sts] 1163 Margolis, D., Risher, M., Ramakrishnan, B., Brotman, A., 1164 and J. Jones, "SMTP MTA Strict Transport Security (MTA- 1165 STS)", draft-ietf-uta-mta-sts-17 (work in progress), May 1166 2018. 1168 [RFC1952] Deutsch, P., "GZIP file format specification version 4.3", 1169 RFC 1952, DOI 10.17487/RFC1952, May 1996, 1170 . 1172 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1173 Requirement Levels", BCP 14, RFC 2119, 1174 DOI 10.17487/RFC2119, March 1997, . 1177 [RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet: 1178 Timestamps", RFC 3339, DOI 10.17487/RFC3339, July 2002, 1179 . 1181 [RFC3492] Costello, A., "Punycode: A Bootstring encoding of Unicode 1182 for Internationalized Domain Names in Applications 1183 (IDNA)", RFC 3492, DOI 10.17487/RFC3492, March 2003, 1184 . 1186 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 1187 Resource Identifier (URI): Generic Syntax", STD 66, 1188 RFC 3986, DOI 10.17487/RFC3986, January 2005, 1189 . 1191 [RFC4408] Wong, M. and W. Schlitt, "Sender Policy Framework (SPF) 1192 for Authorizing Use of Domains in E-Mail, Version 1", 1193 RFC 4408, DOI 10.17487/RFC4408, April 2006, 1194 . 1196 [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 1197 Specifications: ABNF", STD 68, RFC 5234, 1198 DOI 10.17487/RFC5234, January 2008, . 1201 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 1202 Housley, R., and W. Polk, "Internet X.509 Public Key 1203 Infrastructure Certificate and Certificate Revocation List 1204 (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008, 1205 . 1207 [RFC5321] Klensin, J., "Simple Mail Transfer Protocol", RFC 5321, 1208 DOI 10.17487/RFC5321, October 2008, . 1211 [RFC5322] Resnick, P., Ed., "Internet Message Format", RFC 5322, 1212 DOI 10.17487/RFC5322, October 2008, . 1215 [RFC5891] Klensin, J., "Internationalized Domain Names in 1216 Applications (IDNA): Protocol", RFC 5891, 1217 DOI 10.17487/RFC5891, August 2010, . 1220 [RFC5952] Kawamura, S. and M. Kawashima, "A Recommendation for IPv6 1221 Address Text Representation", RFC 5952, 1222 DOI 10.17487/RFC5952, August 2010, . 1225 [RFC6068] Duerst, M., Masinter, L., and J. Zawinski, "The 'mailto' 1226 URI Scheme", RFC 6068, DOI 10.17487/RFC6068, October 2010, 1227 . 1229 [RFC6125] Saint-Andre, P. and J. Hodges, "Representation and 1230 Verification of Domain-Based Application Service Identity 1231 within Internet Public Key Infrastructure Using X.509 1232 (PKIX) Certificates in the Context of Transport Layer 1233 Security (TLS)", RFC 6125, DOI 10.17487/RFC6125, March 1234 2011, . 1236 [RFC6376] Crocker, D., Ed., Hansen, T., Ed., and M. Kucherawy, Ed., 1237 "DomainKeys Identified Mail (DKIM) Signatures", STD 76, 1238 RFC 6376, DOI 10.17487/RFC6376, September 2011, 1239 . 1241 [RFC6522] Kucherawy, M., Ed., "The Multipart/Report Media Type for 1242 the Reporting of Mail System Administrative Messages", 1243 STD 73, RFC 6522, DOI 10.17487/RFC6522, January 2012, 1244 . 1246 [RFC6698] Hoffman, P. and J. Schlyter, "The DNS-Based Authentication 1247 of Named Entities (DANE) Transport Layer Security (TLS) 1248 Protocol: TLSA", RFC 6698, DOI 10.17487/RFC6698, August 1249 2012, . 1251 [RFC6713] Levine, J., "The 'application/zlib' and 'application/gzip' 1252 Media Types", RFC 6713, DOI 10.17487/RFC6713, August 2012, 1253 . 1255 [RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 1256 Protocol (HTTP/1.1): Semantics and Content", RFC 7231, 1257 DOI 10.17487/RFC7231, June 2014, . 1260 [RFC7405] Kyzivat, P., "Case-Sensitive String Support in ABNF", 1261 RFC 7405, DOI 10.17487/RFC7405, December 2014, 1262 . 1264 [RFC7493] Bray, T., Ed., "The I-JSON Message Format", RFC 7493, 1265 DOI 10.17487/RFC7493, March 2015, . 1268 [RFC7672] Dukhovni, V. and W. Hardaker, "SMTP Security via 1269 Opportunistic DNS-Based Authentication of Named Entities 1270 (DANE) Transport Layer Security (TLS)", RFC 7672, 1271 DOI 10.17487/RFC7672, October 2015, . 1274 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 1275 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 1276 May 2017, . 1278 9.2. Informative References 1280 [RFC3207] Hoffman, P., "SMTP Service Extension for Secure SMTP over 1281 Transport Layer Security", RFC 3207, DOI 10.17487/RFC3207, 1282 February 2002, . 1284 [RFC3501] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION 1285 4rev1", RFC 3501, DOI 10.17487/RFC3501, March 2003, 1286 . 1288 [RFC3864] Klyne, G., Nottingham, M., and J. Mogul, "Registration 1289 Procedures for Message Header Fields", BCP 90, RFC 3864, 1290 DOI 10.17487/RFC3864, September 2004, . 1293 [RFC7321] McGrew, D. and P. Hoffman, "Cryptographic Algorithm 1294 Implementation Requirements and Usage Guidance for 1295 Encapsulating Security Payload (ESP) and Authentication 1296 Header (AH)", RFC 7321, DOI 10.17487/RFC7321, August 2014, 1297 . 1299 [RFC7435] Dukhovni, V., "Opportunistic Security: Some Protection 1300 Most of the Time", RFC 7435, DOI 10.17487/RFC7435, 1301 December 2014, . 1303 [RFC7469] Evans, C., Palmer, C., and R. Sleevi, "Public Key Pinning 1304 Extension for HTTP", RFC 7469, DOI 10.17487/RFC7469, April 1305 2015, . 1307 [RFC7489] Kucherawy, M., Ed. and E. Zwicky, Ed., "Domain-based 1308 Message Authentication, Reporting, and Conformance 1309 (DMARC)", RFC 7489, DOI 10.17487/RFC7489, March 2015, 1310 . 1312 9.3. URIs 1314 [1] Section 2.2.3 1316 [2] Section 3 1318 Appendix A. Example Reporting Policy 1320 A.1. Report using MAILTO 1322 _smtp._tls.mail.example.com. IN TXT \ 1323 "v=TLSRPTv1;rua=mailto:reports@example.com" 1325 A.2. Report using HTTPS 1327 _smtp._tls.mail.example.com. IN TXT \ 1328 "v=TLSRPTv1; \ 1329 rua=https://reporting.example.com/v1/tlsrpt" 1331 Appendix B. Example JSON Report 1333 Below is an example JSON report for messages from Company-X to 1334 Company-Y, where 100 sessions were attempted to Company Y servers 1335 with an expired certificate and 200 sessions were attempted to 1336 Company Y servers that did not successfully respond to the "STARTTLS" 1337 command. Additionally 3 sessions failed due to 1338 "X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED". 1340 { 1341 "organization-name": "Company-X", 1342 "date-range": { 1343 "start-datetime": "2016-04-01T00:00:00Z", 1344 "end-datetime": "2016-04-01T23:59:59Z" 1345 }, 1346 "contact-info": "sts-reporting@company-x.example", 1347 "report-id": "5065427c-23d3-47ca-b6e0-946ea0e8c4be", 1348 "policies": [{ 1349 "policy": { 1350 "policy-type": "sts", 1351 "policy-string": ["version: STSv1","mode: testing", 1352 "mx: *.mail.company-y.example","max_age: 86400"], 1353 "policy-domain": "company-y.example", 1354 "mx-host": "*.mail.company-y.example" 1355 }, 1356 "summary": { 1357 "total-successful-session-count": 5326, 1358 "total-failure-session-count": 303 1359 }, 1360 "failure-details": [{ 1361 "result-type": "certificate-expired", 1362 "sending-mta-ip": "2001:db8:abcd:0012::1", 1363 "receiving-mx-hostname": "mx1.mail.company-y.example", 1364 "failed-session-count": 100 1365 }, { 1366 "result-type": "starttls-not-supported", 1367 "sending-mta-ip": "2001:db8:abcd:0013::1", 1368 "receiving-mx-hostname": "mx2.mail.company-y.example", 1369 "receiving-ip": "203.0.113.56", 1370 "failed-session-count": 200, 1371 "additional-information": "https://reports.company-x.example/ 1372 report_info ? id = 5065427 c - 23 d3# StarttlsNotSupported " 1373 }, { 1374 "result-type": "validation-failure", 1375 "sending-mta-ip": "198.51.100.62", 1376 "receiving-ip": "203.0.113.58", 1377 "receiving-mx-hostname": "mx-backup.mail.company-y.example", 1378 "failed-session-count": 3, 1379 "failure-error-code": "X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED" 1380 }] 1381 }] 1382 } 1384 Authors' Addresses 1386 Daniel Margolis 1387 Google, Inc 1389 Email: dmargolis@google.com 1391 Alexander Brotman 1392 Comcast, Inc 1394 Email: alex_brotman@comcast.com 1396 Binu Ramakrishnan 1397 Yahoo!, Inc 1399 Email: rbinu@oath.com 1401 Janet Jones 1402 Microsoft, Inc 1404 Email: janet.jones@microsoft.com 1406 Mark Risher 1407 Google, Inc 1409 Email: risher@google.com