MARF Working Group | M.S. Kucherawy |
Internet-Draft | Cloudmark |
Intended status: Standards Track | March 13, 2012 |
Expires: September 12, 2012 |
Extensions to DKIM for Failure Reporting
draft-ietf-marf-dkim-reporting-14
This memo presents extensions to the DomainKeys Identified Mail (DKIM) specification to allow for detailed reporting of message authentication failures in an on-demand fashion.
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 http://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 September 12, 2012.
Copyright (c) 2012 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 (http://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.
DomainKeys Identified Mail [DKIM] introduced a mechanism for message signing and authentication. It uses digital signing to associate a domain name with a message in a reliable (i.e. not easily forged) manner. The output is a verified domain name that can then be subjected to some sort of evaluation process (e.g., advertised sender policy, comparison to a known-good list, submission to a reputation service, etc.).
Deployers of message authentication technologies are increasingly seeking visibility into DKIM verification failures and conformance failures involving the published signing practices (e.g., Author Domain Signing Practices, [ADSP]) of an Administrative Management Domain (ADMD; see [EMAIL-ARCH]).
This document extends [DKIM] and [ADSP] to add an optional reporting address and some reporting parameters. Reports are generated using the format defined in [I-D.IETF-MARF-AUTHFAILURE-REPORT].
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 [KEYWORDS].
The [ABNF] token "qp-section" is imported from [MIME].
Numerous DKIM-specific terms used here are defined in [DKIM]. The definition of the ABNF token "domain-name" can also be found there.
Certain properties of email messages described in this document are referenced using notation found in [EMAIL-ARCH] (e.g., "RFC5322.From").
A domain name owner employing [DKIM] for email signing and authentication might want to know when signatures that ought to be verifiable with specific public keys are not successfully verifying. Currently there is no such mechanism defined.
This document adds optional "tags" (as defined in [DKIM]) to the DKIM-Signature header field and the DKIM key record in the DNS, using the formats defined in that specification.
The following tag is added to DKIM-Signature header fields when a Signer wishes to request that reports of failed verifications be generated by a Verifier:
sig-r-tag = %x72 *WSP "=" *WSP "y"
ABNF:
When a Signer wishes to advertise that it wants to receive failed verification reports, it places in the DNS a TXT resource record (RR). The RR is made up of a sequence of tag-value objects (much like DKIM key records, as defined in Section 3.6.1 of [DKIM]), but it is entirely independent of those key records and is found at a different name. In the case of a record advertising the desire for authentication failure reports, the tags and values comprise the parameters to be used when generating the reports. A report generator will request the content of this record when it sees an "r=" tag in a DKIM-Signature header field.
Section 3.6.2.2 of [DKIM] provides guidance with respect to handling of a TXT RR that comprises multiple distinct strings ("character-strings" in the parlance of [DNS]). The same process MUST be applied here.
Implementations MUST support all tags defined in this document, and any other tag found in the content of the record that is not recognized by an implementation MUST be ignored. See Section 7.3 for details about finding or registering extension tags.
rep-ra-tag = %x72.61 *WSP "=" *WSP qp-section
rep-rp-tag = %x72.70 *WSP "=" *WSP 1*3DIGIT
rep-rr-type = ( "all" / "d" / "o" / "p"/ "s" / "u" / "v" / "x" ) rep-rr-tag = %x72.72 *WSP "=" *WSP rep-rr-type *WSP 0* ( ":" *WSP rep-rr-type )
rep-rs-tag = %x72.73 *WSP "=" qp-section
The initial list of tags supported for the reporting TXT record is as follows:
In the absence of an "ra=" tag, the "rp=" and "rr=" tags MUST be ignored, and the report generator MUST NOT issue a report.
Report generators MUST apply the following algorithm, or one semantically equivalent to it, for each DKIM-Signature header field whose verification fails for some reason. Note that this processing is done as a reporting extension only; the outcome of the specified DKIM evaluation MUST be otherwise unaffected.
In order to thwart attacks that seek to convert report generators into unwitting denial-of-service attack participants, a report generator SHOULD NOT issue more than one report to any given domain as a result of a single message. Further, a report generator SHOULD establish an upper bound on the number of reports a single message can generate overall. For example, a message with three invalid signatures, two from example.com and one from example.net, would generate at most one report to each of those domains.
This algorithm has the following advantages over previous pre-standardization implementations, such as early versions of [OPENDKIM]:
See Section 8.4 for some considerations regardin limitations of this mechanism.
There also exist cases in which a domain name owner employing [ADSP] for announcing signing practises with DKIM may want to know when messages are received without valid author domain signatures. Currently there is no such mechanism defined.
adsp-ra-tag = %x72.61 *WSP "=" qp-section
adsp-rp-tag = %x72.70 *WSP "=" *WSP 1*3DIGIT
adsp-rr-type = ( "all" / "o" / "p" / "s" / "u" ) adsp-rr-tag = %x72.72 *WSP "=" *WSP adsp-rr-type *WSP 0* ( ":" *WSP adsp-rr-type )
adsp-rs-tag = %x72.73 *WSP "=" qp-section
This document adds the following optional "tags" (as defined in [ADSP]) to the DKIM ADSP records, using the form defined in that specification:
In the absence of an "ra=" tag, the "rp=" and "rr=" tags MUST be ignored, and the report generator MUST NOT issue a report.
This memo also includes, as the "rr" tags defined above, the means by which the signer can request reports for specific circumstances of interest. Verifiers MUST NOT generate reports for incidents that do not match a requested report, and MUST ignore requests for reports not included in this list.
The following report requests are defined for DKIM keys:
The following report requests are defined for ADSP records:
This section describes the process for generating and sending reports in accordance with the request of the signer and/or sender as described above.
All reports generated as a result of requests contained in these extension parameters MUST be generated in compliance with [ARF] and its extension specific to this work, [I-D.IETF-MARF-AUTHFAILURE-REPORT].
Additional guidance about the generation of these reports can be found in [I-D.IETF-MARF-AS], especially Section 9.
As required by [IANA-CONSIDERATIONS], this section contains registry information for the new [DKIM] signature tags, and the new [ADSP] tags. It also creates a DKIM reporting tag registry.
IANA is requested to update the DKIM Signature Tag Specification Registry to include the following new items:
+------+-----------------+--------+ | TYPE | REFERENCE | STATUS | +------+-----------------+--------+ | r | (this document) | active | +------+-----------------+--------+
IANA is requested to update the DKIM ADSP Specification Tag Registry to include the following new items:
+------+-----------------+ | TYPE | REFERENCE | +------+-----------------+ | ra | (this document) | | rp | (this document) | | rr | (this document) | | rs | (this document) | +------+-----------------+
IANA is requested to create a sub-registry of the DKIM Parameters registry called "DKIM Reporting Tags". Additions to this registry follow the "Specification Required" rules, with the following columns required for all registrations:
+------+-----------------+--------+ | TYPE | REFERENCE | STATUS | +------+-----------------+--------+ | ra | (this document) | active | | rp | (this document) | active | | rr | (this document) | active | | rs | (this document) | active | +------+-----------------+--------+
The initial registry entries are as follows:
Security issues with respect to these reports are similar to those found in [DSN].
Implementers are advised to consider the Security Considerations sections of [DKIM], [ADSP], [I-D.IETF-MARF-AS], and [I-D.IETF-MARF-AUTHFAILURE-REPORT]. Many security issues related to this draft are already covered in those documents.
It is impossible to predict the volume of reports this facility will generate when enabled by a report receiver. An implementer ought to anticipate substantial volume, since the amount of abuse occurring at receivers cannot be known ahead of time, and may vary rapidly and unpredictably.
Some threats caused by deliberate misuse of this mechanism are discussed in Section 3.3, but they warrant further discussion here.
Negative caching offers some protection against this pattern of abuse, although it will work only as long as the negative time-to-live on the relevant SOA record in the DNS.
The presence of the DNS record that indicates willingness to accept reports opens the recipient to abuse. In particular, it is possible for an attacker to attempt to cause a flood of reports toward the domain identified in a signature's "d=" tag in one of these ways:
Consider, for example, the situation where an an attacker sends out a multi-million-message spam run, and includes in the messages a fake DKIM signature containing "d=example.com; r=y". It won't matter that those signatures couldn't possibly be real: each will fail verification, and any implementations that support this specification will report those failures, in the millions and in short order, to example.com.
Implementers are therefore strongly advised not to advertise that DNS record except when reports desired, including the risk of receiving this kind of attack.
Positive caching of this DNS reply also means turning off the flow of reports by removing the record is not likely to have immediate effect. A low time-to-live on the record needs to be considered.
An attacker can craft fraudulent DKIM-Signature fields on messages, without using "r=" tags, and avoid having these reported. The procedure described in Section 3.3 does not permit the detection and reporting of such cases.
It might be useful to some Signers to receive such reports, but the mechanism does not support it. To offer such support, a Verifier would have to violate the first step in the procedure and continue even in the absence of an "r=" tag. Although that would enable the desired report, it would also create a possible denial-of-service attack: such Verifiers would always look for the reporting TXT record, so a generator of fraudulent messages could simply send a large volume of messages without an "r=" tag to a number of destinations. To avoid that outcome, reports of fraudulent DKIM-Signature header fields are not possible using the published mechanism.
[DSN] | Moore, K. and G. Vaudreuil, "An Extensible Message Format for Delivery Status Notifications ", RFC 3464, January 2003. |
[OPENDKIM] | Kucherawy, M., "OpenDKIM -- Open Source DKIM Library and Filter ", August 2009. |
The authors wish to acknowledge the following for their review and constructive criticism of this proposal: Steve Atkins, Monica Chew, Dave Crocker, Tim Draegen, Frank Ellermann, JD Falk, John Levine, Scott Kitterman, and Andrew Sullivan.
This section contains examples of the use of each of the extensions defined by this memo.
A DKIM-Signature field including use of the extension tag defined by this memo:
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=example.com; s=jan2012; r=y; h=from:to:subject:date:message-id; bh=YJAYwiNdc3wMh6TD8FjVhtmxaHYHo7Z/06kHQYvQ4tQ=; b=jHF3tpgqr6nH/icHKIqFK2IJPtCLF0CRJaz2Hj1Y8yNwTJ IMYIZtLccho3ymGF2GYqvTl2nP/cn4dH+55rH5pqkWNnuJ R9z54CFcanoKKcl9wOZzK9i5KxM0DTzfs0r8
Example 1: DKIM-Signature field using this extension
This example DKIM-Signature field contains the "r=" tag that indicates reports are requested on verification failure.
Assuming the public key retrieved from the DNS and processed according to [DKIM] would determine that the signature is invalid, a TXT query will be sent to "_report._domainkey.example.com" to retrieve a reporting address and other report parameters as described in Section 3.3.
An example DKIM Reporting TXT Record as defined by this memo:
ra=dkim-errors; rp=100; rr=v:x
Example 2: Example DKIM Reporting TXT Record
This example, continuing from the previous one, shows a message that might be found at "_report._domainkey.example.com" in a TXT record. It makes the following requests:
A DKIM ADSP record including use of the extensions defined by this memo:
dkim=all; ra=dkim-adsp-errors; rr=u
Example 3: DKIM ADSP record using these extensions
This example ADSP record makes the following assertions: