Using TLS in Applications D. Margolis
Internet-Draft Google, Inc
Intended status: Standards Track A. Brotman
Expires: June 7, 2018 Comcast, Inc
B. Ramakrishnan
Yahoo!, Inc
J. Jones
Microsoft, Inc
M. Risher
Google, Inc
December 4, 2017

SMTP TLS Reporting
draft-ietf-uta-smtp-tlsrpt-13

Abstract

A number of protocols exist for establishing encrypted channels between SMTP Mail Transfer Agents, including STARTTLS, DANE TLSA, and MTA-STS. These protocols can fail due to misconfiguration or active attack, leading to undelivered messages or delivery over unencrypted or unauthenticated channels. This document describes a reporting mechanism and format by which sending systems can share statistics and specific information about potential failures with recipient domains. Recipient domains can then use this information to both detect potential attackers and diagnose unintentional misconfigurations.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on June 7, 2018.

Copyright Notice

Copyright (c) 2017 IETF Trust and the persons identified as the document authors. All rights reserved.

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.


Table of Contents

1. Introduction

The STARTTLS extension to SMTP [RFC3207] allows SMTP clients and hosts to establish secure SMTP sessions over TLS. The protocol design is based on "Opportunistic Security" (OS) [RFC7435], which maintains interoperability with clients that do not support STARTTLS but means that any attacker who can delete parts of the SMTP session (such as the "250 STARTTLS" response) or redirect the entire SMTP session (perhaps by overwriting the resolved MX record of the delivery domain) can perform a downgrade or interception attack.

Because such "downgrade attacks" are not necessarily apparent to the receiving MTA, this document defines a mechanism for sending domains to report on failures at multiple stages of the MTA-to-MTA conversation.

Recipient domains may also use the mechanisms defined by MTA-STS [I-D.ietf-uta-mta-sts] or DANE [RFC6698] to publish additional encryption and authentication requirements; this document defines a mechanism for sending domains that are compatible with MTA-STS or DANE to share success and failure statistics with recipient domains.

Specifically, this document defines a reporting schema that covers failures in routing, STARTTLS negotiation, and both DANE [RFC6698] and MTA-STS [I-D.ietf-uta-mta-sts] policy validation errors, and a standard TXT record that recipient domains can use to indicate where reports in this format should be sent.

This document is intended as a companion to the specification for SMTP MTA Strict Transport Security [I-D.ietf-uta-mta-sts].

1.1. Terminology

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119].

We also define the following terms for further use in this document:

2. Related Technologies

3. Reporting Policy

A domain publishes a record to its DNS indicating that it wishes to receive reports. These SMTP TLSRPT policies are distributed via DNS from the Policy Domain's zone, as TXT records (similar to DMARC policies) under the name _smtp-tlsrpt. For example, for the Policy Domain example.com, the recipient's TLSRPT policy can be retrieved from _smtp-tlsrpt.example.com.

Policies consist of the following directives:

The formal definition of the _smtp-tlsrpt TXT record, defined using [RFC5234] & [RFC7405], is as follows:

    tlsrpt-record     = tlsrpt-version 1*(field-delim tlsrpt-field)
                        [field-delim]

    field-delim       = *WSP ";" *WSP

    tlsrpt-field      = tlsrpt-rua /        ; Note that the
                        tlsrpt-extension    ; tlsrpt-rua record is
                                            ; required.

    tlsrpt-version    = %s"v=TLSRPTv1"

    tlsrpt-rua        = %s"rua="
                    tlsrpt-uri *(*WSP "," *WSP tlsrpt-uri)

    tlsrpt-uri        = URI
                      ; "URI" is imported from [RFC3986];
          ; commas (ASCII 0x2C) and exclamation 
          ; points (ASCII 0x21) MUST be encoded

    tlsrpt-extension  = tlsrpt-ext-name "=" tlsrpt-ext-value

    tlsrpt-ext-name   = (ALPHA / DIGIT) *31(ALPHA / 
                    DIGIT / "_" / "-" / ".")

    tlsrpt-ext-value  = 1*(%x21-3A / %x3C / %x3E-7E)
                        ; chars excluding "=", ";", SP, and control
                        ; chars

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. If the resulting TXT record contains multiple strings, then the record MUST be treated as if those strings are concatenated together without adding spaces.

Parsers MUST accept TXT records which are syntactically valid (i.e. valid key-value pairs separated by semi-colons) and implementing a superset of this specification, in which case unknown fields SHALL be ignored.

3.1. Example Reporting Policy

3.1.1. Report using MAILTO

_smtp-tlsrpt.example.com. IN TXT \
	"v=TLSRPTv1;rua=mailto:reports@example.com"

3.1.2. Report using HTTPS

_smtp-tlsrpt.example.com. IN TXT \
	"v=TLSRPTv1; \
	rua=https://reporting.example.com/v1/tlsrpt"

4. Reporting Schema

The report is composed as a plain text file encoded in the I-JSON format ([RFC7493]).

Aggregate reports contain the following fields:

Note that the failure types are non-exclusive; an aggregate report may contain overlapping counts of failure types when a single send attempt encountered multiple errors. Reporters may report multiple applied policies (for example, an MTA-STS policy and a DANE TLSA record for the same domain and MX); even in the case where only a single policy was applied, the "policies" field of the report body MUST be an array and not a singular value.

4.1. Report Time-frame

The report SHOULD cover a full day, from 0000-2400 UTC. This should allow for easier correlation of failure events. To avoid a Denial of Service against the system processing the reports, the reports should be delivered after some delay, perhaps several hours.

4.2. Delivery Summary

4.2.1. Success Count

4.2.2. Failure Count

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. Negotiation Failures

4.3.2. Policy Failures

4.3.2.1. DANE-specific Policy Failures

4.3.2.2. MTA-STS-specific Policy Failures

4.3.3. 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.4. Transient Failures

Transient errors due to too-busy network, TCP timeouts, etc. are not required to be reported.

4.4. JSON Report Schema

The JSON schema is derived from the HPKP JSON schema [RFC7469] (cf. Section 3)

{
  "organization-name": organization-name,
  "date-range": {
    "start-datetime": date-time,
    "end-datetime": date-time
  },
  "contact-info": email-address,
  "report-id": report-id,
  "policies": [{
    "policy": {
      "policy-type": policy-type,
      "policy-string": policy-string,
      "policy-domain": domain,
      "mx-host": mx-host-pattern
    },
    "summary": {
      "total-successful-session-count": total-successful-session-count,
      "total-failure-session-count": total-failure-session-count
    },
    "failure-details": [
      {
        "result-type": result-type,
        "sending-mta-ip": ip-address,
        "receiving-mx-hostname": receiving-mx-hostname,
        "receiving-mx-helo": receiving-mx-helo,
        "failed-session-count": failed-session-count,
        "additional-information": additional-info-uri,
        "failure-reason-code": failure-reason-code
        }
      ]
    }
  ]
}

JSON Report Format

For report purposes, an IPv4 Address is defined as: IPv4address = dec-octet "." dec-octet "." dec-octet "." dec-octet
dec-octet = DIGIT ; 0-9 / %x31-39 DIGIT ; 10-99 / "1" 2DIGIT ; 100-199 / "2" %x30-34 DIGIT ; 200-249 / "25" %x30-35 ; 250-255

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 RECOMMENDED to be constructed using the following ABNF:

 filename = sender "!" policy-domain "!" begin-timestamp
           "!" end-timestamp [ "!" unique-id ] "." extension

 unique-id = 1*(ALPHA / DIGIT)

 sender = domain        ; From the [RFC5321] that is used
                ; as the domain for the `contact-info`
            ; address in the report body

 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. To make the reports machine-parsable for the receivers, we define a top-level media type multipart/report with a new parameter report-type="tlsrpt". Inside it, there are two parts: The first part is human readable, typically text/plain, and the second part is machine readable with a new media type defined called application/tlsrpt+json. If compressed, the report should use the media type application/tlsrpt+gzip.

In addition, the following two new top level message header fields are defined:

TLS-Report-Domain: Receiver-Domain TLS-Report-Submitter: Sender-Domain

The TLS-Report-Submitter value MUST match the value found in the filename and the [RFC5321] domain from the contact-info from the report body. These message headers MUST be included and should allow for easy searching for all reports submitted by a report domain or a particular submitter, for example in IMAP [RFC3501]:

s SEARCH HEADER "TLS-Report-Domain" "example.com"

It is presumed that the aggregate reporting address will be equipped to process new message header fields and extract MIME parts with the prescribed media type and filename, and ignore the rest. These additional headers SHOULD be included in the DKIM [RFC6376] signature for the message.

The [RFC5322].Subject field for report submissions SHOULD conform to the following ABNF:

tlsrpt-subject = %s"Report" FWS               ; "Report"
                 %s"Domain:" FWS              ; "Domain:"
         domain-name FWS              ; per [RFC6376]
         %s"Submitter:" FWS           ; "Submitter:"
         domain-name FWS              ; per [RFC6376]
         %s"Report-ID:" FWS           ; "Report-ID:
         "<" id-left "@" id-right ">" ; per [RFC5322]
         [CFWS]                       ; per [RFC5322]
                                              ; (as with FWS)

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>

5.3.1. Example Report

 From: tlsrpt@mail.sender.example.com
     Date: Fri, May 09 2017 16:54:30 -0800
     To: mts-sts-tlsrpt@example.net
     Subject: Report Domain: example.net
         Submitter: mail.sender.example.com
         Report-ID: <735ff.e317+bf22029@example.net>
     TLS-Report-Domain: example.net
     TLS-Report-Submitter: mail.sender.example.com
     MIME-Version: 1.0
     Content-Type: multipart/report; report-type="tlsrpt";
         boundary="----=_NextPart_000_024E_01CC9B0A.AFE54C00"
     Content-Language: en-us

     This is a multipart message in MIME format.

     ------=_NextPart_000_024E_01CC9B0A.AFE54C00
     Content-Type: text/plain; charset="us-ascii"
     Content-Transfer-Encoding: 7bit

     This is an aggregate TLS report from mail.sender.example.com

     ------=_NextPart_000_024E_01CC9B0A.AFE54C00
     Content-Type: application/tlsrpt+gzip
     Content-Transfer-Encoding: base64
     Content-Disposition: attachment;
         filename="mail.sender.example!example.com!
                   1013662812!1013749130.gz"

     <gzipped content of report>

------=_NextPart_000_024E_01CC9B0A.AFE54C00--
...

Note that, when sending failure reports via SMTP, sending MTAs MUST NOT honor MTA-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/tlsrpt+gzip, and application/tlsrpt+json otherwise (see section Section 6, "IANA Considerations").

A reporting entity SHOULD expect a "successful" response from the accepting HTTPS server, typically a 200 or 201 HTTP code [RFC7231]. Other codes could indicate a delivery failure, and may be retried as per local policy. The receiving system is not expected to process reports at receipt time, and MAY store them for processing at a later time.

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, ideally they would be on a logarithmic scale.

5.6. Metadata Variances

As stated above, there are a variable number of ways to declare information about the data therein. If it should be the case that these objects were to disagree, then the report data contained within the JSON body MUST be considered the authoritative source for those data elements.

6. IANA Considerations

The following are the IANA considerations discussed in this document.

6.1. Message headers

Below is the Internet Assigned Numbers Authority (IANA) Permanent Message Header Field registration information per [RFC3864].

 Header field name:           TLS-Report-Domain
 Applicable protocol:         mail
 Status:                      standard
 Author/Change controller:    IETF
 Specification document(s):   this one


 Header field name:           TLS-Report-Submitter
 Applicable protocol:         mail
 Status:                      standard
 Author/Change controller:    IETF
 Specification document(s):   this one

6.2. Report Type

This document registers a new parameter report-type="tlsrpt" under multipart/report top-level media type for use with [RFC6522].

The media type suitable for use as a report-type is defined in the following section.

6.3. application/tlsrpt+json Media Type

This document registers multiple media types, beginning with Table 1 below.

+-------------+----------------+-------------+-------------------+
| Type        | Subtype        | File extn   | Specification     |
+-------------+----------------+-------------+-------------------+
| application | tlsrpt+json    |  .json      | Section 5.3       |
+-------------+----------------+-------------+-------------------+
                Table 1: SMTP TLS Reporting Media Type

Type name: application

Subtype name: tlsrpt+json

Required parameters: n/a

Optional parameters: n/a

Encoding considerations: Encoding considerations are identical to those specified for the application/json media type. See [RFC7493].

Security considerations: Security considerations relating to SMTP TLS Reporting are discussed in Section 7.

Interoperability considerations: This document specifies format of conforming messages and the interpretation thereof.

Published specification: Section 5.3 of this document.

Applications that use this media type: Mail User Agents (MUA) and Mail Transfer Agents.

Additional information:

  Magic number(s):  n/a

  File extension(s):  ".json"

  Macintosh file type code(s):  n/a

Person & email address to contact for further information: See Authors' Addresses section.

Intended usage: COMMON

Restrictions on usage: n/a

Author: See Authors' Addresses section.

Change controller: Internet Engineering Task Force (mailto:iesg@ietf.org).

6.4. application/tlsrpt+gzip Media Type

+-------------+----------------+-------------+-------------------+
| Type        | Subtype        | File extn   | Specification     |
+-------------+----------------+-------------+-------------------+
| application | tlsrpt+gzip    |  .gz        | Section 5.3       |
+-------------+----------------+-------------+-------------------+
                Table 2: SMTP TLS Reporting Media Type

Type name: application

Subtype name: tlsrpt+gzip

Required parameters: n/a

Optional parameters: n/a

Encoding considerations: Binary

Security considerations: Security considerations relating to SMTP TLS Reporting are discussed in Section 7.

Interoperability considerations: This document specifies format of conforming messages and the interpretation thereof.

Published specification: Section 5.3 of this document.

Applications that use this media type: Mail User Agents (MUA) and Mail Transfer Agents.

Additional information:

  Magic number(s):  n/a

  File extension(s):  ".gz"

  Macintosh file type code(s):  n/a

Person & email address to contact for further information: See Authors' Addresses section.

Intended usage: COMMON

Restrictions on usage: n/a

Author: See Authors' Addresses section.

Change controller: Internet Engineering Task Force (mailto:iesg@ietf.org).

6.5. STARTTLS Validation Result Types

This document creates a new registry, "STARTTLS Validation Result Types". The initial entries in the registry are:

+-------------------------------+
| Result Type                   | 
+-------------------------------+
| "starttls-not-supported"      | 
| "certificate-host-mismatch"   | 
| "certificate-expired"         | 
| "tlsa-invalid"                | 
| "dnssec-invalid"              | 
| "sts-policy-invalid"          | 
| "sts-webpki-invalid"          | 
| "validation-failure"          | 
+-------------------------------+

The above entries are described in section Section 4.3, "Result Types." New result types can be added to this registry using "Expert Review" IANA registration policy.

7. Security Considerations

SMTP TLS Reporting provides transparency into misconfigurations or attempts to intercept or tamper with mail between hosts who support STARTTLS. There are several security risks presented by the existence of this reporting channel:

Finally, because TLSRPT is intended to help administrators discover man-in-the-middle attacks against transport-layer encryption, including attacks designed to thwart negotiation of encrypted connections (by downgrading opportunistic encryption or, in the case of MTA-STS, preventing discovery of a new MTA-STS policy), we must also consider the risk that an adversary who can induce such a downgrade attack can also prevent discovery of the TLSRPT TXT record (and thus prevent discovery of the successful downgrade attack). Administrators are thus encouraged to deploy TLSRPT TXT records with a large TTL (reducing the window for successful attacks against DNS resolution of the record) or to deploy DNSSEC on the deploying zone.

8. References

8.1. Normative References

[I-D.ietf-uta-mta-sts] Margolis, D., Risher, M., Ramakrishnan, B., Brotman, A. and J. Jones, "SMTP MTA Strict Transport Security (MTA-STS)", Internet-Draft draft-ietf-uta-mta-sts-11, November 2017.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997.
[RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet: Timestamps", RFC 3339, DOI 10.17487/RFC3339, July 2002.
[RFC3492] Costello, A., "Punycode: A Bootstring encoding of Unicode for Internationalized Domain Names in Applications (IDNA)", RFC 3492, DOI 10.17487/RFC3492, March 2003.
[RFC3986] Berners-Lee, T., Fielding, R. and L. Masinter, "Uniform Resource Identifier (URI): Generic Syntax", STD 66, RFC 3986, DOI 10.17487/RFC3986, January 2005.
[RFC5234] Crocker, D. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", STD 68, RFC 5234, DOI 10.17487/RFC5234, January 2008.
[RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., Housley, R. and W. Polk, "Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008.
[RFC5321] Klensin, J., "Simple Mail Transfer Protocol", RFC 5321, DOI 10.17487/RFC5321, October 2008.
[RFC5322] Resnick, P., "Internet Message Format", RFC 5322, DOI 10.17487/RFC5322, October 2008.
[RFC5891] Klensin, J., "Internationalized Domain Names in Applications (IDNA): Protocol", RFC 5891, DOI 10.17487/RFC5891, August 2010.
[RFC5952] Kawamura, S. and M. Kawashima, "A Recommendation for IPv6 Address Text Representation", RFC 5952, DOI 10.17487/RFC5952, August 2010.
[RFC6068] Duerst, M., Masinter, L. and J. Zawinski, "The 'mailto' URI Scheme", RFC 6068, DOI 10.17487/RFC6068, October 2010.
[RFC6125] Saint-Andre, P. and J. Hodges, "Representation and Verification of Domain-Based Application Service Identity within Internet Public Key Infrastructure Using X.509 (PKIX) Certificates in the Context of Transport Layer Security (TLS)", RFC 6125, DOI 10.17487/RFC6125, March 2011.
[RFC6376] Crocker, D., Hansen, T. and M. Kucherawy, "DomainKeys Identified Mail (DKIM) Signatures", STD 76, RFC 6376, DOI 10.17487/RFC6376, September 2011.
[RFC6522] Kucherawy, M., "The Multipart/Report Media Type for the Reporting of Mail System Administrative Messages", STD 73, RFC 6522, DOI 10.17487/RFC6522, January 2012.
[RFC6698] Hoffman, P. and J. Schlyter, "The DNS-Based Authentication of Named Entities (DANE) Transport Layer Security (TLS) Protocol: TLSA", RFC 6698, DOI 10.17487/RFC6698, August 2012.
[RFC7231] Fielding, R. and J. Reschke, "Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content", RFC 7231, DOI 10.17487/RFC7231, June 2014.
[RFC7405] Kyzivat, P., "Case-Sensitive String Support in ABNF", RFC 7405, DOI 10.17487/RFC7405, December 2014.
[RFC7493] Bray, T., "The I-JSON Message Format", RFC 7493, DOI 10.17487/RFC7493, March 2015.

8.2. Informative References

[RFC3207] Hoffman, P., "SMTP Service Extension for Secure SMTP over Transport Layer Security", RFC 3207, DOI 10.17487/RFC3207, February 2002.
[RFC3501] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1", RFC 3501, DOI 10.17487/RFC3501, March 2003.
[RFC3864] Klyne, G., Nottingham, M. and J. Mogul, "Registration Procedures for Message Header Fields", BCP 90, RFC 3864, DOI 10.17487/RFC3864, September 2004.
[RFC7435] Dukhovni, V., "Opportunistic Security: Some Protection Most of the Time", RFC 7435, DOI 10.17487/RFC7435, December 2014.
[RFC7469] Evans, C., Palmer, C. and R. Sleevi, "Public Key Pinning Extension for HTTP", RFC 7469, DOI 10.17487/RFC7469, April 2015.
[RFC7489] Kucherawy, M. and E. Zwicky, "Domain-based Message Authentication, Reporting, and Conformance (DMARC)", RFC 7489, DOI 10.17487/RFC7489, March 2015.

Appendix A. Example Reporting Policy

A.1. Report using MAILTO

_smtp-tlsrpt.mail.example.com. IN TXT \
        "v=TLSRPTv1;rua=mailto:reports@example.com"

A.2. Report using HTTPS

_smtp-tlsrpt.mail.example.com. IN TXT \
        "v=TLSRPTv1; \
        rua=https://reporting.example.com/v1/tlsrpt"

Appendix B. Example JSON Report

{
  "organization-name": "Company-X",
  "date-range": {
    "start-datetime": "2016-04-01T00:00:00Z",
    "end-datetime": "2016-04-01T23:59:59Z"
  },
  "contact-info": "sts-reporting@company-x.example",
  "report-id": "5065427c-23d3-47ca-b6e0-946ea0e8c4be",
  "policies": [{
    "policy": {
      "policy-type": "sts",
      "policy-string": "version: STSv1\r\nmode: report\r\n
                mx: .mail.company-y.example\r\nmax_age: 86400",
      "policy-domain": "company-y.example",
      "mx-host": ".mail.company-y.example"
    },
    "summary": {
      "total-successful-session-count": 5326,
      "total-failure-session-count": 303
    },
    "failure-details": [{
      "result-type": "certificate-expired",
      "sending-mta-ip": "98.136.216.25",
      "receiving-mx-hostname": "mx1.mail.company-y.example",
      "failed-session-count": 100
    }, {
      "result-type": "starttls-not-supported",
      "sending-mta-ip": "98.22.33.99",
      "receiving-mx-hostname": "mx2.mail.company-y.example",
      "failed-session-count": 200,
      "additional-information": "https://reports.company-x.example/ 
        report_info ? id = 5065427 c - 23 d3# StarttlsNotSupported "
    }, {
      "result-type": "validation-failure",
      "sending-mta-ip": "47.97.15.2",
      "receiving-mx-hostname": "mx-backup.mail.company-y.example",
      "failed-session-count": 3,
      "failure-error-code": "X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED"
    }]
  }]
}

Figure: Example JSON report for a messages from Company-X to Company-Y, where 100 sessions were attempted to Company Y servers with an expired certificate and 200 sessions were attempted to 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".

Authors' Addresses

Daniel Margolis Google, Inc EMail: dmargolis (at) google (dot com)
Alexander Brotman Comcast, Inc EMail: alex_brotman (at) comcast (dot com)
Binu Ramakrishnan Yahoo!, Inc EMail: rbinu (at) yahoo-inc (dot com)
Janet Jones Microsoft, Inc EMail: janet.jones (at) microsoft (dot com)
Mark Risher Google, Inc EMail: risher (at) google (dot com)