draft-ietf-dnsop-rfc2845bis-02.txt | draft-ietf-dnsop-rfc2845bis-03.txt | |||
---|---|---|---|---|
Internet Engineering Task Force F. Dupont | Internet Engineering Task Force F. Dupont | |||
Internet-Draft S. Morris | Internet-Draft S. Morris | |||
Obsoletes: 2845, 4635 (if approved) ISC | Obsoletes: 2845, 4635 (if approved) ISC | |||
Intended status: Standards Track P. Vixie | Intended status: Standards Track P. Vixie | |||
Expires: May 23, 2019 Farsight | Expires: September 8, 2019 Farsight | |||
D. Eastlake 3rd | D. Eastlake 3rd | |||
Huawei | Huawei | |||
O. Gudmundsson | O. Gudmundsson | |||
CloudFlare | CloudFlare | |||
B. Wellington | B. Wellington | |||
Akamai | Akamai | |||
November 19, 2018 | March 7, 2019 | |||
Secret Key Transaction Authentication for DNS (TSIG) | Secret Key Transaction Authentication for DNS (TSIG) | |||
draft-ietf-dnsop-rfc2845bis-02 | draft-ietf-dnsop-rfc2845bis-03 | |||
Abstract | Abstract | |||
This protocol allows for transaction level authentication using | This document describes a protocol for transaction level | |||
shared secrets and one way hashing. It can be used to authenticate | authentication using shared secrets and one way hashing. It can be | |||
dynamic updates as coming from an approved client, or to authenticate | used to authenticate dynamic updates as coming from an approved | |||
responses as coming from an approved name server. | client, or to authenticate responses as coming from an approved name | |||
server. | ||||
No provision has been made here for distributing the shared secrets. | No recommendation is made here for distributing the shared secrets: | |||
it is expected that a network administrator will statically configure | ||||
name servers and clients using some out of band mechanism. | ||||
This document includes revised original TSIG specifications (RFC2845) | This document obsoletes RFC2845 and RFC4635. | |||
and its extension for HMAC-SHA (RFC4635). | ||||
Status of This Memo | Status of This Memo | |||
This Internet-Draft is submitted in full conformance with the | This Internet-Draft is submitted in full conformance with the | |||
provisions of BCP 78 and BCP 79. | provisions of BCP 78 and BCP 79. | |||
Internet-Drafts are working documents of the Internet Engineering | Internet-Drafts are working documents of the Internet Engineering | |||
Task Force (IETF). Note that other groups may also distribute | Task Force (IETF). Note that other groups may also distribute | |||
working documents as Internet-Drafts. The list of current Internet- | working documents as Internet-Drafts. The list of current Internet- | |||
Drafts is at https://datatracker.ietf.org/drafts/current/. | Drafts is at https://datatracker.ietf.org/drafts/current/. | |||
Internet-Drafts are draft documents valid for a maximum of six months | Internet-Drafts are draft documents valid for a maximum of six months | |||
and may be updated, replaced, or obsoleted by other documents at any | and may be updated, replaced, or obsoleted by other documents at any | |||
time. It is inappropriate to use Internet-Drafts as reference | time. It is inappropriate to use Internet-Drafts as reference | |||
material or to cite them other than as "work in progress." | material or to cite them other than as "work in progress." | |||
This Internet-Draft will expire on May 23, 2019. | This Internet-Draft will expire on September 8, 2019. | |||
Copyright Notice | Copyright Notice | |||
Copyright (c) 2018 IETF Trust and the persons identified as the | Copyright (c) 2019 IETF Trust and the persons identified as the | |||
document authors. All rights reserved. | document authors. All rights reserved. | |||
This document is subject to BCP 78 and the IETF Trust's Legal | This document is subject to BCP 78 and the IETF Trust's Legal | |||
Provisions Relating to IETF Documents | Provisions Relating to IETF Documents | |||
(https://trustee.ietf.org/license-info) in effect on the date of | (https://trustee.ietf.org/license-info) in effect on the date of | |||
publication of this document. Please review these documents | publication of this document. Please review these documents | |||
carefully, as they describe your rights and restrictions with respect | carefully, as they describe your rights and restrictions with respect | |||
to this document. Code Components extracted from this document must | to this document. Code Components extracted from this document must | |||
include Simplified BSD License text as described in Section 4.e of | include Simplified BSD License text as described in Section 4.e of | |||
the Trust Legal Provisions and are provided without warranty as | the Trust Legal Provisions and are provided without warranty as | |||
skipping to change at page 2, line 35 ¶ | skipping to change at page 2, line 35 ¶ | |||
Without obtaining an adequate license from the person(s) controlling | Without obtaining an adequate license from the person(s) controlling | |||
the copyright in such materials, this document may not be modified | the copyright in such materials, this document may not be modified | |||
outside the IETF Standards Process, and derivative works of it may | outside the IETF Standards Process, and derivative works of it may | |||
not be created outside the IETF Standards Process, except to format | not be created outside the IETF Standards Process, except to format | |||
it for publication as an RFC or to translate it into languages other | it for publication as an RFC or to translate it into languages other | |||
than English. | than English. | |||
Table of Contents | Table of Contents | |||
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 | 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 | |||
2. Key words . . . . . . . . . . . . . . . . . . . . . . . . . . 4 | 2. Key Words . . . . . . . . . . . . . . . . . . . . . . . . . . 4 | |||
3. New Assigned Numbers . . . . . . . . . . . . . . . . . . . . 5 | 3. New Assigned Numbers . . . . . . . . . . . . . . . . . . . . 4 | |||
4. TSIG RR Format . . . . . . . . . . . . . . . . . . . . . . . 5 | 4. TSIG RR Format . . . . . . . . . . . . . . . . . . . . . . . 5 | |||
4.1. TSIG RR Type . . . . . . . . . . . . . . . . . . . . . . 5 | 4.1. TSIG RR Type . . . . . . . . . . . . . . . . . . . . . . 5 | |||
4.2. TSIG Calculation . . . . . . . . . . . . . . . . . . . . 5 | 4.2. TSIG Calculation . . . . . . . . . . . . . . . . . . . . 5 | |||
4.3. TSIG Record Format . . . . . . . . . . . . . . . . . . . 5 | 4.3. TSIG Record Format . . . . . . . . . . . . . . . . . . . 5 | |||
4.4. Example . . . . . . . . . . . . . . . . . . . . . . . . . 7 | 4.4. Example . . . . . . . . . . . . . . . . . . . . . . . . . 7 | |||
5. Protocol Operation . . . . . . . . . . . . . . . . . . . . . 7 | 5. Protocol Operation . . . . . . . . . . . . . . . . . . . . . 7 | |||
5.1. Effects of adding TSIG to outgoing message . . . . . . . 8 | 5.1. Effects of Adding TSIG to Outgoing Messages . . . . . . . 8 | |||
5.2. TSIG processing on incoming messages . . . . . . . . . . 8 | 5.2. TSIG Processing on Incoming Messages . . . . . . . . . . 8 | |||
5.3. Time values used in TSIG calculations . . . . . . . . . . 8 | 5.3. Time Values Used in TSIG Calculations . . . . . . . . . . 8 | |||
5.4. TSIG Variables and Coverage . . . . . . . . . . . . . . . 9 | 5.4. TSIG Variables and Coverage . . . . . . . . . . . . . . . 9 | |||
5.4.1. DNS Message . . . . . . . . . . . . . . . . . . . . . 9 | 5.4.1. DNS Message . . . . . . . . . . . . . . . . . . . . . 9 | |||
5.4.2. TSIG Variables . . . . . . . . . . . . . . . . . . . 9 | 5.4.2. TSIG Variables . . . . . . . . . . . . . . . . . . . 9 | |||
5.4.3. Request MAC . . . . . . . . . . . . . . . . . . . . . 10 | 5.4.3. Request MAC . . . . . . . . . . . . . . . . . . . . . 10 | |||
5.5. Component Padding . . . . . . . . . . . . . . . . . . . . 10 | 5.5. Component Padding . . . . . . . . . . . . . . . . . . . . 10 | |||
6. Protocol Details . . . . . . . . . . . . . . . . . . . . . . 10 | 6. Protocol Details . . . . . . . . . . . . . . . . . . . . . . 10 | |||
6.1. TSIG generation on requests . . . . . . . . . . . . . . . 10 | 6.1. TSIG Generation on Requests . . . . . . . . . . . . . . . 10 | |||
6.2. TSIG on Answers . . . . . . . . . . . . . . . . . . . . . 10 | 6.2. TSIG on Answers . . . . . . . . . . . . . . . . . . . . . 10 | |||
6.3. TSIG on TSIG Error returns . . . . . . . . . . . . . . . 11 | 6.3. TSIG on TSIG Error Returns . . . . . . . . . . . . . . . 11 | |||
6.4. TSIG on zone transfer over a TCP connection . . . . . . . 11 | 6.4. TSIG on Zone Transfer Over a TCP Connection . . . . . . . 11 | |||
6.5. Server TSIG checks . . . . . . . . . . . . . . . . . . . 12 | 6.5. Server TSIG checks . . . . . . . . . . . . . . . . . . . 12 | |||
6.5.1. Key check and error handling . . . . . . . . . . . . 12 | 6.5.1. Key Check and Error Handling . . . . . . . . . . . . 12 | |||
6.5.2. MAC check and error handling . . . . . . . . . . . . 12 | 6.5.2. MAC Check and Error Handling . . . . . . . . . . . . 12 | |||
6.5.3. Time check and error handling . . . . . . . . . . . . 13 | 6.5.3. Time Check and Error Handling . . . . . . . . . . . . 13 | |||
6.5.4. Truncation check and error handling . . . . . . . . . 13 | 6.5.4. Truncation Check and Error Handling . . . . . . . . . 13 | |||
6.6. Client processing of answer . . . . . . . . . . . . . . . 14 | 6.6. Client Processing of Answer . . . . . . . . . . . . . . . 14 | |||
6.6.1. Key error handling . . . . . . . . . . . . . . . . . 14 | 6.6.1. Key Error Handling . . . . . . . . . . . . . . . . . 14 | |||
6.6.2. MAC error handling . . . . . . . . . . . . . . . . . 14 | 6.6.2. MAC Error Handling . . . . . . . . . . . . . . . . . 14 | |||
6.6.3. Time error handling . . . . . . . . . . . . . . . . . 14 | 6.6.3. Time Error Handling . . . . . . . . . . . . . . . . . 14 | |||
6.6.4. Truncation error handling . . . . . . . . . . . . . . 14 | 6.6.4. Truncation Error Handling . . . . . . . . . . . . . . 14 | |||
6.7. Special considerations for forwarding servers . . . . . . 15 | 6.7. Special Considerations for Forwarding Servers . . . . . . 15 | |||
7. Algorithms and Identifiers . . . . . . . . . . . . . . . . . 15 | 7. Algorithms and Identifiers . . . . . . . . . . . . . . . . . 15 | |||
8. TSIG Truncation Policy . . . . . . . . . . . . . . . . . . . 16 | 8. TSIG Truncation Policy . . . . . . . . . . . . . . . . . . . 16 | |||
9. Shared Secrets . . . . . . . . . . . . . . . . . . . . . . . 17 | 9. Shared Secrets . . . . . . . . . . . . . . . . . . . . . . . 17 | |||
10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 17 | 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 17 | |||
11. Security Considerations . . . . . . . . . . . . . . . . . . . 18 | 11. Security Considerations . . . . . . . . . . . . . . . . . . . 18 | |||
11.1. Issue fixed in this document . . . . . . . . . . . . . . 19 | 11.1. Issue Fixed in this Document . . . . . . . . . . . . . . 19 | |||
11.2. Why not DNSSEC? . . . . . . . . . . . . . . . . . . . . 19 | 11.2. Why not DNSSEC? . . . . . . . . . . . . . . . . . . . . 19 | |||
12. References . . . . . . . . . . . . . . . . . . . . . . . . . 20 | 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 20 | |||
12.1. Normative References . . . . . . . . . . . . . . . . . . 20 | 12.1. Normative References . . . . . . . . . . . . . . . . . . 20 | |||
12.2. Informative References . . . . . . . . . . . . . . . . . 20 | 12.2. Informative References . . . . . . . . . . . . . . . . . 20 | |||
Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . 22 | Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . 22 | |||
Appendix B. Change History (to be removed before publication) . 23 | Appendix B. Change History (to be removed before publication) . 23 | |||
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 25 | Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 25 | |||
1. Introduction | 1. Introduction | |||
The Domain Name System (DNS) [RFC1034], [RFC1035] is a replicated | The Domain Name System (DNS) [RFC1034], [RFC1035] is a replicated | |||
hierarchical distributed database system that provides information | hierarchical distributed database system that provides information | |||
fundamental to Internet operations, such as name <=> address | fundamental to Internet operations, such as name <=> address | |||
translation and mail handling information. | translation and mail handling information. | |||
In 2017, security problems in two nameservers strictly following | In 2017, two nameservers strictly following [RFC2845] and [RFC4635] | |||
[RFC2845] and [RFC4635] (i.e., TSIG and its HMAC-SHA extension) | (i.e., TSIG and its HMAC-SHA extension) specifications were | |||
specifications were discovered. The implementations were fixed but, | discovered to have security problems related to this feature. The | |||
to avoid similar problems in the future, the two documents were | implementations were fixed but, to avoid similar problems in the | |||
updated and merged, producing this revised specification for TSIG. | future, the two documents were updated and merged, producing this | |||
revised specification for TSIG. | ||||
This document specifies use of a message authentication code (MAC), | This document specifies use of a message authentication code (MAC), | |||
either HMAC-MD5 or HMAC-SHA (keyed hash functions), to provide an | generated using certain keyed hash functions, to provide an efficient | |||
efficient means of point-to-point authentication and integrity | means of point-to-point authentication and integrity checking for DNS | |||
checking for DNS transactions. | transactions. Such transactions include DNS update requests and | |||
responses for which this can provide a lightweight alternative to the | ||||
The second area where the secret key based MACs specified in this | ||||
document can be used is to authenticate DNS update requests as well | ||||
as transaction responses, providing a lightweight alternative to the | ||||
protocol described by [RFC3007]. | protocol described by [RFC3007]. | |||
A further use of this mechanism is to protect zone transfers. In | A further use of this mechanism is to protect zone transfers. In | |||
this case the data covered would be the whole zone transfer including | this case the data covered would be the whole zone transfer including | |||
any glue records sent. The protocol described by DNSSEC does not | any glue records sent. The protocol described by DNSSEC does not | |||
protect glue records and unsigned records unless SIG(0) (transaction | protect glue records and unsigned records unless SIG(0) (transaction | |||
signature) is used. | signature) is used. | |||
The authentication mechanism proposed in this document uses shared | The authentication mechanism proposed in this document uses shared | |||
secret keys to establish a trust relationship between two entities. | secret keys to establish a trust relationship between two entities. | |||
Such keys must be protected in a fashion similar to private keys, | Such keys must be protected in a manner similar to private keys, lest | |||
lest a third party masquerade as one of the intended parties (by | a third party masquerade as one of the intended parties (by forging | |||
forging the MAC). There is an urgent need to provide simple and | the MAC). There is an urgent need to provide simple and efficient | |||
efficient authentication between clients and local servers and this | authentication between clients and local servers and this proposal | |||
proposal addresses that need. The proposal is unsuitable for general | addresses that need. The proposal is unsuitable for general server | |||
server to server authentication for servers which speak with many | to server authentication for servers which speak with many other | |||
other servers, since key management would become unwieldy with the | servers, since key management would become unwieldy with the number | |||
number of shared keys going up quadratically. But it is suitable for | of shared keys going up quadratically. But it is suitable for many | |||
many resolvers on hosts that only talk to a few recursive servers. | resolvers on hosts that only talk to a few recursive servers. | |||
A server acting as an indirect caching resolver -- a "forwarder" in | A server acting as an indirect caching resolver -- a "forwarder" in | |||
common usage -- might use transaction-based authentication when | common usage -- might use transaction-based authentication when | |||
communicating with its small number of preconfigured "upstream" | communicating with its small number of preconfigured "upstream" | |||
servers. Other uses of DNS secret key authentication and possible | servers. Other uses of DNS secret key authentication and possible | |||
systems for automatic secret key distribution may be proposed in | systems for automatic secret key distribution may be proposed in | |||
separate future documents. | separate future documents. | |||
Note that use of TSIG presumes prior agreement between the two | Note that use of TSIG presumes prior agreement between the two | |||
parties involved (e.g., resolver and server) as to any algorithm and | parties involved (e.g., resolver and server) as to any algorithm and | |||
key to be used. | key to be used. | |||
Since the publication of first version of this document ([RFC2845]) a | Since the publication of first version of this document ([RFC2845]) a | |||
mechanism based on asymmetric signatures using the SIG RR was | mechanism based on asymmetric signatures using the SIG RR was | |||
specified (SIG(0) [RFC2931]) whereas this document uses symmetric | specified (SIG(0) [RFC2931]) whereas this document uses symmetric | |||
authentication codes calculated by HMAC [RFC2104] using strong hash | authentication codes calculated by HMAC [RFC2104] using strong hash | |||
functions. | functions. | |||
2. Key words | 2. Key Words | |||
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | |||
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and | "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and | |||
"OPTIONAL" in this document are to be interpreted as described in BCP | "OPTIONAL" in this document are to be interpreted as described in BCP | |||
14 [RFC2119] [RFC8174] when, and only when, they appear in all | 14 [RFC2119] [RFC8174] when, and only when, they appear in all | |||
capitals, as shown here. | capitals, as shown here. | |||
3. New Assigned Numbers | 3. New Assigned Numbers | |||
RRTYPE = TSIG (250) | RRTYPE = TSIG (250) | |||
skipping to change at page 6, line 5 ¶ | skipping to change at page 5, line 48 ¶ | |||
<id>.B.example.net, and <id>.A.site.example.B.example.net. It | <id>.B.example.net, and <id>.A.site.example.B.example.net. It | |||
should be possible for more than one key to be in simultaneous | should be possible for more than one key to be in simultaneous | |||
use among a set of interacting hosts. The name only needs to | use among a set of interacting hosts. The name only needs to | |||
be meaningful to the communicating hosts but a meaningful | be meaningful to the communicating hosts but a meaningful | |||
mnemonic name as above is strongly recommended. | mnemonic name as above is strongly recommended. | |||
The name may be used as a local index to the key involved and | The name may be used as a local index to the key involved and | |||
it is recommended that it be globally unique. Where a key is | it is recommended that it be globally unique. Where a key is | |||
just shared between two hosts, its name actually need only be | just shared between two hosts, its name actually need only be | |||
meaningful to them but it is recommended that the key name be | meaningful to them but it is recommended that the key name be | |||
mnemonic and incorporate the resolver and server host names in | mnemonic and incorporates the names of participating agents or | |||
that order. | resources. | |||
TYPE TSIG (250: Transaction SIGnature) | ||||
CLASS ANY | TYPE This MUST be TSIG (250: Transaction SIGnature) | |||
CLASS This MUST be ANY | ||||
TTL 0 | TTL This MUST be 0 | |||
RdLen (variable) | RdLen (variable) | |||
RDATA The RDATA for a TSIG RR consists of an octet stream Algorithm | RDATA The RDATA for a TSIG RR consists of an octet stream Algorithm | |||
Name field, a uint48_t Time Signed field, a uint16_t Fudge | Name field, a uint48_t Time Signed field, a uint16_t Fudge | |||
field, a uint16_t MAC Size field, a octet stream MAC field, a | field, a uint16_t MAC Size field, a octet stream MAC field, a | |||
uint16_t Original ID, a uint16_t Error field, a uint16_t Other | uint16_t Original ID, a uint16_t Error field, a uint16_t Other | |||
Len field and an octet stream of Other Data. | Len field and an octet stream of Other Data. | |||
1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 | 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 | |||
skipping to change at page 6, line 45 ¶ | skipping to change at page 6, line 39 ¶ | |||
| Original ID | Error | | | Original ID | Error | | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| Other Len | / | | Other Len | / | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Other Data / | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Other Data / | |||
/ / | / / | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
The contents of the RDATA fields are: | The contents of the RDATA fields are: | |||
* Algorithm Name - identifies the TSIG algorithm name in the | * Algorithm Name - identifies the TSIG algorithm name in the | |||
domain name syntax. | domain name syntax. (Allowed names are listed in Table 1.) | |||
The name is stored in the DNS name wire format as described | ||||
in [RFC1034]. As per [RFC3597], this name MUST NOT be | ||||
compressed. | ||||
* Time Signed - time signed as seconds since 00:00 on | * Time Signed - time signed as seconds since 00:00 on | |||
1970-01-01 UTC ignoring leap seconds. | 1970-01-01 UTC ignoring leap seconds. | |||
* Fudge - specifies the allowed time difference in seconds | * Fudge - specifies the allowed time difference in seconds | |||
permitted in the Time Signed field. | permitted in the Time Signed field. | |||
* MAC Size - the length of MAC field in octets. Truncation is | * MAC Size - the length of MAC field in octets. Truncation is | |||
indicated by a MAC size less than the size of the keyed hash | indicated by a MAC size less than the size of the keyed hash | |||
produced by the algorithm specified by the Algorithm Name. | produced by the algorithm specified by the Algorithm Name. | |||
skipping to change at page 7, line 36 ¶ | skipping to change at page 7, line 36 ¶ | |||
TYPE TSIG | TYPE TSIG | |||
CLASS ANY | CLASS ANY | |||
TTL 0 | TTL 0 | |||
RdLen As appropriate | RdLen As appropriate | |||
RDATA | RDATA | |||
Field Name Contents | Field Name Contents | |||
-------------- ------------------- | -------------- ------------------------ | |||
Algorithm Name SAMPLE-ALG.EXAMPLE. | Algorithm Name HMAC-MD5.SIG-ALG.REG.INT | |||
Time Signed 853804800 | Time Signed 853804800 | |||
Fudge 300 | Fudge 300 | |||
MAC Size As appropriate | MAC Size As appropriate | |||
MAC As appropriate | MAC As appropriate | |||
Original ID As appropriate | Original ID As appropriate | |||
Error 0 (NOERROR) | Error 0 (NOERROR) | |||
Other Len 0 | Other Len 0 | |||
Other Data Empty | Other Data Empty | |||
5. Protocol Operation | 5. Protocol Operation | |||
5.1. Effects of adding TSIG to outgoing message | 5.1. Effects of Adding TSIG to Outgoing Messages | |||
Once the outgoing message has been constructed, the HMAC computation | Once the outgoing message has been constructed, the HMAC computation | |||
can be performed. The resulting MAC will then be stored in a TSIG | can be performed. The resulting MAC will then be stored in a TSIG | |||
which is appended to the additional data section (the ARCOUNT is | which is appended to the additional data section (the ARCOUNT is | |||
incremented to reflect this). If the TSIG record cannot be added | incremented to reflect the extra RR). If the TSIG record cannot be | |||
without causing the message to be truncated, the server MUST alter | added without causing the message to be truncated, the server MUST | |||
the response so that a TSIG can be included. This response consists | alter the response so that a TSIG can be included. This response | |||
of only the question and a TSIG record, and has the TC bit set and | consists of only the question and a TSIG record, and has the TC bit | |||
RCODE 0 (NOERROR). The client SHOULD at this point retry the request | set and RCODE 0 (NOERROR). The client SHOULD at this point retry the | |||
using TCP (per [RFC1035] 4.2.2). | request using TCP (per [RFC1035] 4.2.2). | |||
5.2. TSIG processing on incoming messages | 5.2. TSIG Processing on Incoming Messages | |||
If an incoming message contains a TSIG record, it MUST be the last | If an incoming message contains a TSIG record, it MUST be the last | |||
record in the additional section. Multiple TSIG records are not | record in the additional section. Multiple TSIG records are not | |||
allowed. If a TSIG record is present in any other position, the DNS | allowed. If a TSIG record is present in any other position, the DNS | |||
message is dropped and a response with RCODE 1 (FORMERR) MUST be | message is dropped and a response with RCODE 1 (FORMERR) MUST be | |||
returned. Upon receipt of a message with exactly one correctly | returned. Upon receipt of a message with exactly one correctly | |||
placed TSIG RR, the TSIG RR is copied to a safe location, removed | placed TSIG RR, the TSIG RR is copied to a safe location, removed | |||
from the DNS Message, and decremented out of the DNS message header's | from the DNS Message, and decremented out of the DNS message header's | |||
ARCOUNT. At this point the keyed hash (HMAC) computation is | ARCOUNT. At this point the keyed hash (HMAC) computation is | |||
performed. | performed. | |||
If the algorithm name or key name is unknown to the recipient, or if | If the algorithm name or key name is unknown to the recipient, or if | |||
the MACs do not match, the whole DNS message MUST be discarded. If | the MACs do not match, the whole DNS message MUST be discarded. If | |||
the message is a query, a response with RCODE 9 (NOTAUTH) MUST be | the message is a query, a response with RCODE 9 (NOTAUTH) MUST be | |||
sent back to the originator with TSIG ERROR 17 (BADKEY) or TSIG ERROR | sent back to the originator with TSIG ERROR 17 (BADKEY) or TSIG ERROR | |||
16 (BADSIG). If no key is available to sign this message it MUST be | 16 (BADSIG). If no key is available to sign this message it MUST be | |||
sent unsigned (MAC size == 0 and empty MAC). Algorithm name and time | sent unsigned (MAC size == 0 and empty MAC). The algorithm name, | |||
signed and fudge fields SHOULD be copied to the response to provide | time signed, and fudge fields SHOULD be copied to the response to | |||
off path spoof protection. A message to the system operations log | provide off path spoof protection. A message to the system | |||
SHOULD be generated, to warn the operations staff of a possible | operations log SHOULD be generated, to warn the operations staff of a | |||
security incident in progress. Care should be taken to ensure that | possible security incident in progress. Care should be taken to | |||
logging of this type of event does not open the system to a denial of | ensure that logging of this type of event does not open the system to | |||
service attack. | a denial of service attack. | |||
Until these error checks are successfully passed, concluding that the | Until these error checks are successfully passed, concluding that the | |||
signature is valid, the signature MUST be considered to be invalid. | signature is valid, the signature MUST be considered to be invalid. | |||
5.3. Time values used in TSIG calculations | 5.3. Time Values Used in TSIG Calculations | |||
The data digested includes the two timer values in the TSIG header in | The data digested includes the two timer values in the TSIG header in | |||
order to defend against replay attacks. If this were not done, an | order to defend against replay attacks. If this were not done, an | |||
attacker could replay old messages but update the "Time Signed" and | attacker could replay old messages but update the "Time Signed" and | |||
"Fudge" fields to make the message look new. This data is named | "Fudge" fields to make the message look new. This data is named | |||
"TSIG Timers", and for the purpose of MAC calculation they are hashed | "TSIG Timers", and for the purpose of MAC calculation, they are | |||
in their "on the wire" format, in the following order: first Time | hashed in their "on the wire" format, in the following order: first | |||
Signed, then Fudge. For example: | Time Signed, then Fudge. For example: | |||
Field Name Value Wire Format Meaning | Field Name Value Wire Format Meaning | |||
----------- --------- ----------------- ------------------------ | ----------- --------- ----------------- ------------------------ | |||
Time Signed 853804800 00 00 32 e4 07 00 Tue Jan 21 00:00:00 1997 | Time Signed 853804800 00 00 32 e4 07 00 Tue Jan 21 00:00:00 1997 | |||
Fudge 300 01 2C 5 minutes | Fudge 300 01 2C 5 minutes | |||
5.4. TSIG Variables and Coverage | 5.4. TSIG Variables and Coverage | |||
When generating or verifying the contents of a TSIG record, the | When generating or verifying the contents of a TSIG record, the | |||
following data are passed as input to MAC computation, in network | following data are passed as input to MAC computation, in network | |||
skipping to change at page 10, line 24 ¶ | skipping to change at page 10, line 24 ¶ | |||
The request's MAC is digested in wire format, including the following | The request's MAC is digested in wire format, including the following | |||
fields: | fields: | |||
Field Type Description | Field Type Description | |||
---------- ------------ ---------------------- | ---------- ------------ ---------------------- | |||
MAC Length uint16_t in network byte order | MAC Length uint16_t in network byte order | |||
MAC Data octet stream exactly as transmitted | MAC Data octet stream exactly as transmitted | |||
5.5. Component Padding | 5.5. Component Padding | |||
Digested components (i.e., inputs to keyed hash computation) are fed | Digested components (i.e., inputs to the keyed hash computation) are | |||
into the hashing function as a continuous octet stream with no | fed into the hashing function as a continuous octet stream with no | |||
interfield separator or padding. | interfield separator or padding. | |||
6. Protocol Details | 6. Protocol Details | |||
6.1. TSIG generation on requests | 6.1. TSIG Generation on Requests | |||
Client performs the keyed hash (HMAC) computation and appends a TSIG | The client performs the keyed hash (HMAC) computation and appends a | |||
record to the additional data section and transmits the request to | TSIG record to the additional data section and transmits the request | |||
the server. The client MUST store the MAC from the request while | to the server. The client MUST store the MAC from the request while | |||
awaiting an answer. The digest components for a request are: | awaiting an answer. The digest components for a request are: | |||
DNS Message (request) | DNS Message (request) | |||
TSIG Variables (request) | TSIG Variables (request) | |||
Note that some older name servers will not accept requests with a | Note that some older name servers will not accept requests with a | |||
nonempty additional data section. Clients SHOULD only attempt signed | nonempty additional data section. Clients SHOULD only attempt signed | |||
transactions with servers who are known to support TSIG and share | transactions with servers who are known to support TSIG and share | |||
some algorithm and secret key with the client -- so, this is not a | some algorithm and secret key with the client -- so, this is not a | |||
problem in practice. | problem in practice. | |||
skipping to change at page 11, line 17 ¶ | skipping to change at page 11, line 17 ¶ | |||
Signing responses to unsigned TKEY requests MUST be explicitly | Signing responses to unsigned TKEY requests MUST be explicitly | |||
specified in the description of an individual secret key | specified in the description of an individual secret key | |||
establishment algorithm [RFC3645]. | establishment algorithm [RFC3645]. | |||
The digest components are: | The digest components are: | |||
Request MAC | Request MAC | |||
DNS Message (response) | DNS Message (response) | |||
TSIG Variables (response) | TSIG Variables (response) | |||
6.3. TSIG on TSIG Error returns | 6.3. TSIG on TSIG Error Returns | |||
When a server detects an error relating to the key or MAC, the server | When a server detects an error relating to the key or MAC, the server | |||
SHOULD send back an unsigned error message (MAC size == 0 and empty | SHOULD send back an unsigned error message (MAC size == 0 and empty | |||
MAC). It MUST NOT send back a signed error message. | MAC). It MUST NOT send back a signed error message. | |||
If an error is detected relating to the TSIG validity period or the | If an error is detected relating to the TSIG validity period or the | |||
MAC is too short for the local policy, the server SHOULD send back a | MAC is too short for the local policy, the server SHOULD send back a | |||
signed error message. The digest components are: | signed error message. The digest components are: | |||
Request MAC (if the request MAC validated) | Request MAC (if the request MAC validated) | |||
DNS Message (response) | DNS Message (response) | |||
TSIG Variables (response) | TSIG Variables (response) | |||
The reason that the request is not included in this MAC in some cases | The reason that the request is not included in this MAC in some cases | |||
is to make it possible for the client to verify the error. If the | is to make it possible for the client to verify the error. If the | |||
error is not a TSIG error the response MUST be generated as specified | error is not a TSIG error the response MUST be generated as specified | |||
in Section 6.2. | in Section 6.2. | |||
6.4. TSIG on zone transfer over a TCP connection | 6.4. TSIG on Zone Transfer Over a TCP Connection | |||
A zone transfer over a DNS TCP session can include multiple DNS | A zone transfer over a DNS TCP session can include multiple DNS | |||
messages. Using TSIG on such a connection can protect the connection | messages. Using TSIG on such a connection can protect the connection | |||
from hijacking and provide data integrity. The TSIG MUST be included | from hijacking and provide data integrity. The TSIG MUST be included | |||
on the first and last DNS messages, and SHOULD be placed on all | on the first and last DNS messages, and SHOULD be placed on all | |||
intermediary messages. For backward compatibility, a client which | intermediary messages. For backward compatibility, a client which | |||
receives DNS messages and verifies TSIG MUST accept up to 99 | receives DNS messages and verifies TSIG MUST accept up to 99 | |||
intermediary messages without a TSIG. The first envelope is | intermediary messages without a TSIG. The first message is processed | |||
processed as a standard answer, and subsequent messages have the | as a standard answer (see Section 6.2) and subsequent messages have | |||
following digest components: | the following digest components: | |||
Prior MAC (running) | Prior MAC (running) | |||
DNS Messages (any unsigned messages since the last TSIG) | DNS Messages (any unsigned messages since the last TSIG) | |||
TSIG Timers (current message) | TSIG Timers (current message) | |||
This allows the client to rapidly detect when the session has been | This allows the client to rapidly detect when the session has been | |||
altered; at which point it can close the connection and retry. If a | altered; at which point it can close the connection and retry. If a | |||
client TSIG verification fails, the client MUST close the connection. | client TSIG verification fails, the client MUST close the connection. | |||
If the client does not receive TSIG records frequently enough (as | If the client does not receive TSIG records frequently enough (as | |||
specified above) it SHOULD assume the connection has been hijacked | specified above) it SHOULD assume the connection has been hijacked | |||
and it SHOULD close the connection. The client SHOULD treat this the | and it SHOULD close the connection. The client SHOULD treat this the | |||
same way as they would any other interrupted transfer (although the | same way as they would any other interrupted transfer (although the | |||
exact behavior is not specified). | exact behavior is not specified here). | |||
6.5. Server TSIG checks | 6.5. Server TSIG checks | |||
Upon receipt of a message, server will check if there is a TSIG RR. | Upon receipt of a message, server will check if there is a TSIG RR. | |||
If one exists, the server is REQUIRED to return a TSIG RR in the | If one exists, the server is REQUIRED to return a TSIG RR in the | |||
response. The server MUST perform the following checks in the | response. The server MUST perform the following checks in the | |||
following order, check KEY, check MAC, check TIME values, check | following order, check KEY, check MAC, check TIME values, check | |||
Truncation policy. | Truncation policy. | |||
6.5.1. Key check and error handling | 6.5.1. Key Check and Error Handling | |||
If a non-forwarding server does not recognize the key used by the | If a non-forwarding server does not recognize the key used by the | |||
client, the server MUST generate an error response with RCODE 9 | client, the server MUST generate an error response with RCODE 9 | |||
(NOTAUTH) and TSIG ERROR 17 (BADKEY). This response MUST be unsigned | (NOTAUTH) and TSIG ERROR 17 (BADKEY). This response MUST be unsigned | |||
as specified in Section 6.3. The server SHOULD log the error. | as specified in Section 6.3. The server SHOULD log the error. | |||
(Special considerations apply to forwarding servers, see | (Special considerations apply to forwarding servers, see | |||
Section 6.7.) | Section 6.7.) | |||
6.5.2. MAC check and error handling | 6.5.2. MAC Check and Error Handling | |||
If a TSIG fails to verify, the server MUST generate an error response | If a TSIG fails to verify, the server MUST generate an error response | |||
as specified in Section 6.3 with RCODE 9 (NOTAUTH) and TSIG ERROR 16 | as specified in Section 6.3 with RCODE 9 (NOTAUTH) and TSIG ERROR 16 | |||
(BADSIG). This response MUST be unsigned as specified in | (BADSIG). This response MUST be unsigned as specified in | |||
Section 6.3. The server SHOULD log the error. | Section 6.3. The server SHOULD log the error. | |||
6.5.2.1. Specifying Truncation | 6.5.2.1. Specifying Truncation | |||
When space is at a premium and the strength of the full length of a | When space is at a premium and the strength of the full length of a | |||
MAC is not needed, it is reasonable to truncate the keyed hash and | MAC is not needed, it is reasonable to truncate the keyed hash and | |||
skipping to change at page 13, line 29 ¶ | skipping to change at page 13, line 29 ¶ | |||
TSIG MAC for a reply is the truncated request MAC. | TSIG MAC for a reply is the truncated request MAC. | |||
4. "MAC size" field is less than the larger of 10 (octets) and half | 4. "MAC size" field is less than the larger of 10 (octets) and half | |||
the length of the hash function in use: | the length of the hash function in use: | |||
With the exception of certain TSIG error messages described in | With the exception of certain TSIG error messages described in | |||
Section 6.3, where it is permitted that the MAC size be zero, | Section 6.3, where it is permitted that the MAC size be zero, | |||
this case MUST NOT be generated and, if received, MUST cause the | this case MUST NOT be generated and, if received, MUST cause the | |||
DNS message to be dropped and RCODE 1 (FORMERR) to be returned. | DNS message to be dropped and RCODE 1 (FORMERR) to be returned. | |||
6.5.3. Time check and error handling | 6.5.3. Time Check and Error Handling | |||
If the server time is outside the time interval specified by the | If the server time is outside the time interval specified by the | |||
request (which is: Time Signed, plus/minus Fudge), the server MUST | request (which is: Time Signed, plus/minus Fudge), the server MUST | |||
generate an error response with RCODE 9 (NOTAUTH) and TSIG ERROR 18 | generate an error response with RCODE 9 (NOTAUTH) and TSIG ERROR 18 | |||
(BADTIME). The server SHOULD also cache the most recent time signed | (BADTIME). The server SHOULD also cache the most recent time signed | |||
value in a message generated by a key, and SHOULD return BADTIME if a | value in a message generated by a key, and SHOULD return BADTIME if a | |||
message received later has an earlier time signed value. A response | message received later has an earlier time signed value. A response | |||
indicating a BADTIME error MUST be signed by the same key as the | indicating a BADTIME error MUST be signed by the same key as the | |||
request. It MUST include the client's current time in the time | request. It MUST include the client's current time in the time | |||
signed field, the server's current time (a uint48_t) in the other | signed field, the server's current time (a uint48_t) in the other | |||
data field, and 6 in the other data length field. This is done so | data field, and 6 in the other data length field. This is done so | |||
that the client can verify a message with a BADTIME error without the | that the client can verify a message with a BADTIME error without the | |||
verification failing due to another BADTIME error. The data signed | verification failing due to another BADTIME error. The data signed | |||
is specified in Section 6.3. The server SHOULD log the error. | is specified in Section 6.3. The server SHOULD log the error. | |||
6.5.4. Truncation check and error handling | 6.5.4. Truncation Check and Error Handling | |||
If a TSIG is received with truncation that is permitted under | If a TSIG is received with truncation that is permitted under | |||
Section 6.5.2.1 above but the MAC is too short for the local policy | Section 6.5.2.1 above but the MAC is too short for the local policy | |||
in force, an RCODE 9 (NOTAUTH) and TSIG ERROR 22 (BADTRUNC) MUST be | in force, an RCODE 9 (NOTAUTH) and TSIG ERROR 22 (BADTRUNC) MUST be | |||
returned. The server SHOULD log the error. | returned. The server SHOULD log the error. | |||
6.6. Client processing of answer | 6.6. Client Processing of Answer | |||
When a client receives a response from a server and expects to see a | When a client receives a response from a server and expects to see a | |||
TSIG, it first checks if the TSIG RR is present in the response. | TSIG, it first checks if the TSIG RR is present in the response. | |||
Otherwise, the response is treated as having a format error and | Otherwise, the response is treated as having a format error and | |||
discarded. The client then extracts the TSIG, adjusts the ARCOUNT, | discarded. The client then extracts the TSIG, adjusts the ARCOUNT, | |||
and calculates the MAC in the same way as the server, applying the | and calculates the MAC in the same way as the server, applying the | |||
same rules to decide if truncated MAC is valid. If the TSIG does not | same rules to decide if truncated MAC is valid. If the TSIG does not | |||
validate, that response MUST be discarded, unless the RCODE is 9 | validate, that response MUST be discarded, unless the RCODE is 9 | |||
(NOTAUTH), in which case the client SHOULD attempt to verify the | (NOTAUTH), in which case the client SHOULD attempt to verify the | |||
response as if it were a TSIG Error response, as specified in | response as if it were a TSIG Error response, as specified in | |||
Section 6.3. A message containing an unsigned TSIG record or a TSIG | Section 6.3. A message containing an unsigned TSIG record or a TSIG | |||
record which fails verification SHOULD NOT be considered an | record which fails verification SHOULD NOT be considered an | |||
acceptable response; the client SHOULD log an error and continue to | acceptable response; the client SHOULD log an error and continue to | |||
wait for a signed response until the request times out. | wait for a signed response until the request times out. | |||
6.6.1. Key error handling | 6.6.1. Key Error Handling | |||
If an RCODE on a response is 9 (NOTAUTH), and the response TSIG | If an RCODE on a response is 9 (NOTAUTH), and the response TSIG | |||
validates, and the TSIG key is different from the key used on the | validates, and the TSIG key is different from the key used on the | |||
request, then this is a Key error. The client MAY retry the request | request, then this is a Key error. The client MAY retry the request | |||
using the key specified by the server. This should never occur, as a | using the key specified by the server. This should never occur, as a | |||
server MUST NOT sign a response with a different key than signed the | server MUST NOT sign a response with a different key than signed the | |||
request. | request. | |||
6.6.2. MAC error handling | 6.6.2. MAC Error Handling | |||
If the response RCODE is 9 (NOTAUTH) and TSIG ERROR is 16 (BADSIG), | If the response RCODE is 9 (NOTAUTH) and TSIG ERROR is 16 (BADSIG), | |||
this is a MAC error, and client MAY retry the request with a new | this is a MAC error, and client MAY retry the request with a new | |||
request ID but it would be better to try a different shared key if | request ID but it would be better to try a different shared key if | |||
one is available. Clients SHOULD keep track of how many MAC errors | one is available. Clients SHOULD keep track of how many MAC errors | |||
are associated with each key. Clients SHOULD log this event. | are associated with each key. Clients SHOULD log this event. | |||
6.6.3. Time error handling | 6.6.3. Time Error Handling | |||
If the response RCODE is 9 (NOTAUTH) and the TSIG ERROR is 18 | If the response RCODE is 9 (NOTAUTH) and the TSIG ERROR is 18 | |||
(BADTIME), or the current time does not fall in the range specified | (BADTIME), or the current time does not fall in the range specified | |||
in the TSIG record, then this is a Time error. This is an indication | in the TSIG record, then this is a Time error. This is an indication | |||
that the client and server clocks are not synchronized. In this case | that the client and server clocks are not synchronized. In this case | |||
the client SHOULD log the event. DNS resolvers MUST NOT adjust any | the client SHOULD log the event. DNS resolvers MUST NOT adjust any | |||
clocks in the client based on BADTIME errors, but the server's time | clocks in the client based on BADTIME errors, but the server's time | |||
in the other data field SHOULD be logged. | in the other data field SHOULD be logged. | |||
6.6.4. Truncation error handling | 6.6.4. Truncation Error Handling | |||
If the response RCODE is 9 (NOTAUTH) and the TSIG ERROR is 22 | If the response RCODE is 9 (NOTAUTH) and the TSIG ERROR is 22 | |||
(BADTRUNC) then this is a Truncation error. The client MAY retry | (BADTRUNC) then this is a Truncation error. The client MAY retry | |||
with a lesser truncation up to the full HMAC output (no truncation), | with a lesser truncation up to the full HMAC output (no truncation), | |||
using the truncation used in the response as a hint for what the | using the truncation used in the response as a hint for what the | |||
server policy allowed (Section 8). Clients SHOULD log this event. | server policy allowed (Section 8). Clients SHOULD log this event. | |||
6.7. Special considerations for forwarding servers | 6.7. Special Considerations for Forwarding Servers | |||
A server acting as a forwarding server of a DNS message SHOULD check | A server acting as a forwarding server of a DNS message SHOULD check | |||
for the existence of a TSIG record. If the name on the TSIG is not | for the existence of a TSIG record. If the name on the TSIG is not | |||
of a secret that the server shares with the originator the server | of a secret that the server shares with the originator the server | |||
MUST forward the message unchanged including the TSIG. If the name | MUST forward the message unchanged including the TSIG. If the name | |||
of the TSIG is of a key this server shares with the originator, it | of the TSIG is of a key this server shares with the originator, it | |||
MUST process the TSIG. If the TSIG passes all checks, the forwarding | MUST process the TSIG. If the TSIG passes all checks, the forwarding | |||
server MUST, if possible, include a TSIG of his own, to the | server MUST, if possible, include a TSIG of its own, to the | |||
destination or the next forwarder. If no transaction security is | destination or the next forwarder. If no transaction security is | |||
available to the destination and the response has the AD flag (see | available to the destination and the message is a query then, if the | |||
[RFC4035]), the forwarder MUST unset the AD flag before adding the | corresponding response has the AD flag (see [RFC4035]) set, the | |||
TSIG to the answer. | forwarder MUST clear the AD flag before adding the TSIG to the | |||
response and returning the result to the system from which it | ||||
received the query. | ||||
7. Algorithms and Identifiers | 7. Algorithms and Identifiers | |||
The only message digest algorithm specified in the first version of | The only message digest algorithm specified in the first version of | |||
these specifications [RFC2845] was "HMAC-MD5" (see [RFC1321], | these specifications [RFC2845] was "HMAC-MD5" (see [RFC1321], | |||
[RFC2104]). The "HMAC-MD5" algorithm is mandatory to implement for | [RFC2104]). The "HMAC-MD5" algorithm is mandatory to implement for | |||
interoperability. | interoperability. | |||
The use of SHA-1 [FIPS180-4], [RFC3174], (which is a 160-bit hash as | The use of SHA-1 [FIPS180-4], [RFC3174], (which is a 160-bit hash as | |||
compared to the 128 bits for MD5), and additional hash algorithms in | compared to the 128 bits for MD5), and additional hash algorithms in | |||
skipping to change at page 16, line 15 ¶ | skipping to change at page 16, line 15 ¶ | |||
Requirement Name | Requirement Name | |||
----------- ------------------------ | ----------- ------------------------ | |||
Mandatory HMAC-MD5.SIG-ALG.REG.INT | Mandatory HMAC-MD5.SIG-ALG.REG.INT | |||
Optional gss-tsig | Optional gss-tsig | |||
Mandatory hmac-sha1 | Mandatory hmac-sha1 | |||
Optional hmac-sha224 | Optional hmac-sha224 | |||
Mandatory hmac-sha256 | Mandatory hmac-sha256 | |||
Optional hmac-sha384 | Optional hmac-sha384 | |||
Optional hmac-sha512 | Optional hmac-sha512 | |||
Table 1 | ||||
SHA-1 truncated to 96 bits (12 octets) SHOULD be implemented. | SHA-1 truncated to 96 bits (12 octets) SHOULD be implemented. | |||
8. TSIG Truncation Policy | 8. TSIG Truncation Policy | |||
As noted above, two DNS agents (e.g., resolver and server) must | As noted above, two DNS agents (e.g., resolver and server) must | |||
mutually agree to use TSIG. Implicit in such an "agreement" are | mutually agree to use TSIG. Implicit in such an "agreement" are | |||
criteria as to acceptable keys and algorithms and, with the | criteria as to acceptable keys and algorithms and, with the | |||
extensions in this document, truncations. Note that it is common for | extensions in this document, truncations. Note that it is common for | |||
implementations to bind the TSIG secret key or keys that may be in | implementations to bind the TSIG secret key or keys that may be in | |||
place at two parties to particular algorithms. Thus, such | place at two parties to particular algorithms. Thus, such | |||
skipping to change at page 17, line 25 ¶ | skipping to change at page 17, line 25 ¶ | |||
A name server usually runs privileged, which means its configuration | A name server usually runs privileged, which means its configuration | |||
data need not be visible to all users of the host. For this reason, | data need not be visible to all users of the host. For this reason, | |||
a host that implements transaction-based authentication should | a host that implements transaction-based authentication should | |||
probably be configured with a "stub resolver" and a local caching and | probably be configured with a "stub resolver" and a local caching and | |||
forwarding name server. This presents a special problem for | forwarding name server. This presents a special problem for | |||
[RFC2136] which otherwise depends on clients to communicate only with | [RFC2136] which otherwise depends on clients to communicate only with | |||
a zone's authoritative name servers. | a zone's authoritative name servers. | |||
Use of strong random shared secrets is essential to the security of | Use of strong random shared secrets is essential to the security of | |||
TSIG. See [RFC4086] for a discussion of this issue. The secret | TSIG. See [RFC4086] for a discussion of this issue. The secret | |||
SHOULD be at least as long as the keyed hash output, i.e., 16 bytes | SHOULD be at least as long as the keyed hash output [RFC2104]. | |||
for HMAC-MD5 or 20 bytes for HMAC-SHA1. | ||||
10. IANA Considerations | 10. IANA Considerations | |||
IANA maintains a registry of algorithm names to be used as "Algorithm | IANA maintains a registry of algorithm names to be used as "Algorithm | |||
Names" as defined in Section 4.3. Algorithm names are text strings | Names" as defined in Section 4.3. Algorithm names are text strings | |||
encoded using the syntax of a domain name. There is no structure | encoded using the syntax of a domain name. There is no structure | |||
required other than names for different algorithms must be unique | required other than names for different algorithms must be unique | |||
when compared as DNS names, i.e., comparison is case insensitive. | when compared as DNS names, i.e., comparison is case insensitive. | |||
Previous specifications [RFC2845] and [RFC4635] defined values for | Previous specifications [RFC2845] and [RFC4635] defined values for | |||
HMAC MD5 and SHA. IANA has also registered "gss-tsig" as an | HMAC MD5 and SHA. IANA has also registered "gss-tsig" as an | |||
skipping to change at page 18, line 12 ¶ | skipping to change at page 18, line 12 ¶ | |||
Section 4.3. New error codes are assigned and specified as in | Section 4.3. New error codes are assigned and specified as in | |||
[RFC6895]. | [RFC6895]. | |||
11. Security Considerations | 11. Security Considerations | |||
The approach specified here is computationally much less expensive | The approach specified here is computationally much less expensive | |||
than the signatures specified in DNSSEC. As long as the shared | than the signatures specified in DNSSEC. As long as the shared | |||
secret key is not compromised, strong authentication is provided | secret key is not compromised, strong authentication is provided | |||
between two DNS systems, e.g., for the last hop from a local name | between two DNS systems, e.g., for the last hop from a local name | |||
server to the user resolver, or between primary and secondary | server to the user resolver, or between primary and secondary | |||
nameservers.. | nameservers. | |||
Secret keys should be changed periodically. If the client host has | Recommendations for choosing and maintaining secret keys can be found | |||
been compromised, the server should suspend the use of all secrets | in [RFC2104]. If the client host has been compromised, the server | |||
known to that client. If possible, secrets should be stored in | should suspend the use of all secrets known to that client. If | |||
encrypted form. Secrets should never be transmitted in the clear | possible, secrets should be stored in encrypted form. Secrets should | |||
over any network. This document does not address the issue on how to | never be transmitted in the clear over any network. This document | |||
distribute secrets except that it mentions the possibilities of | does not address the issue on how to distribute secrets except that | |||
manual configuration and the use of TKEY [RFC2930]. Secrets SHOULD | it mentions the possibilities of manual configuration and the use of | |||
NOT be shared by more than two entities. | TKEY [RFC2930]. Secrets SHOULD NOT be shared by more than two | |||
entities. | ||||
This mechanism does not authenticate source data, only its | This mechanism does not authenticate source data, only its | |||
transmission between two parties who share some secret. The original | transmission between two parties who share some secret. The original | |||
source data can come from a compromised zone master or can be | source data can come from a compromised zone master or can be | |||
corrupted during transit from an authentic zone master to some | corrupted during transit from an authentic zone master to some | |||
"caching forwarder." However, if the server is faithfully performing | "caching forwarder." However, if the server is faithfully performing | |||
the full DNSSEC security checks, then only security checked data will | the full DNSSEC security checks, then only security checked data will | |||
be available to the client. | be available to the client. | |||
A fudge value that is too large may leave the server open to replay | A fudge value that is too large may leave the server open to replay | |||
attacks. A fudge value that is too small may cause failures if | attacks. A fudge value that is too small may cause failures if | |||
machines are not time synchronized or there are unexpected network | machines are not time synchronized or there are unexpected network | |||
delays. The recommended value in most situations is 300 seconds. | delays. The RECOMMENDED value in most situations is 300 seconds. | |||
For all of the message authentication code algorithms listed in this | For all of the message authentication code algorithms listed in this | |||
document, those producing longer values are believed to be stronger; | document, those producing longer values are believed to be stronger; | |||
however, while there have been some arguments that mild truncation | however, while there have been some arguments that mild truncation | |||
can strengthen a MAC by reducing the information available to an | can strengthen a MAC by reducing the information available to an | |||
attacker, excessive truncation clearly weakens authentication by | attacker, excessive truncation clearly weakens authentication by | |||
reducing the number of bits an attacker has to try to break the | reducing the number of bits an attacker has to try to break the | |||
authentication by brute force [RFC2104]. | authentication by brute force [RFC2104]. | |||
Significant progress has been made recently in cryptanalysis of hash | Significant progress has been made recently in cryptanalysis of hash | |||
functions of the types used here, all of which ultimately derive from | functions of the types used here. While the results so far should | |||
the design of MD4. While the results so far should not effect HMAC, | not affect HMAC, the stronger SHA-1 and SHA-256 algorithms are being | |||
the stronger SHA-1 and SHA-256 algorithms are being made mandatory | made mandatory as a precaution. | |||
due to caution. Note that today SHA-3 [FIPS202] is available as an | ||||
alternative to SHA-2 using a very different design. | ||||
See also the Security Considerations section of [RFC2104] from which | See also the Security Considerations section of [RFC2104] from which | |||
the limits on truncation in this RFC were taken. | the limits on truncation in this RFC were taken. | |||
11.1. Issue fixed in this document | 11.1. Issue Fixed in this Document | |||
When signing a DNS reply message using TSIG, the MAC computation uses | When signing a DNS reply message using TSIG, the MAC computation uses | |||
the request message's MAC as an input to cryptographically relate the | the request message's MAC as an input to cryptographically relate the | |||
reply to the request. The original TSIG specification [RFC2845] | reply to the request. The original TSIG specification [RFC2845] | |||
required that the TIME values be checked before the request's MAC. | required that the TIME values be checked before the request's MAC. | |||
If the TIME was invalid, some implementations failed to carry out | If the TIME was invalid, some implementations failed to carry out | |||
further checks and could use an invalid request MAC in the signed | further checks and could use an invalid request MAC in the signed | |||
reply. | reply. | |||
This document proposes the principle that the request MAC must be | This document makes it a madatory that the request MAC is considered | |||
considered to be invalid until it has been validated: until then, any | to be invalid until it has been validated: until then, any answer | |||
answer must be unsigned. For this reason, the request MAC is now | must be unsigned. For this reason, the request MAC is now checked | |||
checked before the TIME value. | before the TIME value. | |||
11.2. Why not DNSSEC? | 11.2. Why not DNSSEC? | |||
This section from the original document [RFC2845] analyzes DNSSEC in | This section from the original document [RFC2845] analyzes DNSSEC in | |||
order to justify the introduction of TSIG. | order to justify the introduction of TSIG. | |||
DNS has recently been extended by DNSSEC ([RFC4033], [RFC4034] and | DNS has recently been extended by DNSSEC ([RFC4033], [RFC4034] and | |||
[RFC4035]) to provide for data origin authentication, and public key | [RFC4035]) to provide for data origin authentication, and public key | |||
distribution, all based on public key cryptography and public key | distribution, all based on public key cryptography and public key | |||
based digital signatures. To be practical, this form of security | based digital signatures. To be practical, this form of security | |||
skipping to change at page 20, line 31 ¶ | skipping to change at page 20, line 31 ¶ | |||
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | |||
Requirement Levels", BCP 14, RFC 2119, | Requirement Levels", BCP 14, RFC 2119, | |||
DOI 10.17487/RFC2119, March 1997, | DOI 10.17487/RFC2119, March 1997, | |||
<https://www.rfc-editor.org/info/rfc2119>. | <https://www.rfc-editor.org/info/rfc2119>. | |||
[RFC2845] Vixie, P., Gudmundsson, O., Eastlake 3rd, D., and B. | [RFC2845] Vixie, P., Gudmundsson, O., Eastlake 3rd, D., and B. | |||
Wellington, "Secret Key Transaction Authentication for DNS | Wellington, "Secret Key Transaction Authentication for DNS | |||
(TSIG)", RFC 2845, DOI 10.17487/RFC2845, May 2000, | (TSIG)", RFC 2845, DOI 10.17487/RFC2845, May 2000, | |||
<https://www.rfc-editor.org/info/rfc2845>. | <https://www.rfc-editor.org/info/rfc2845>. | |||
[RFC3597] Gustafsson, A., "Handling of Unknown DNS Resource Record | ||||
(RR) Types", RFC 3597, DOI 10.17487/RFC3597, September | ||||
2003, <https://www.rfc-editor.org/info/rfc3597>. | ||||
[RFC4635] Eastlake 3rd, D., "HMAC SHA (Hashed Message Authentication | [RFC4635] Eastlake 3rd, D., "HMAC SHA (Hashed Message Authentication | |||
Code, Secure Hash Algorithm) TSIG Algorithm Identifiers", | Code, Secure Hash Algorithm) TSIG Algorithm Identifiers", | |||
RFC 4635, DOI 10.17487/RFC4635, August 2006, | RFC 4635, DOI 10.17487/RFC4635, August 2006, | |||
<https://www.rfc-editor.org/info/rfc4635>. | <https://www.rfc-editor.org/info/rfc4635>. | |||
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC | [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC | |||
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, | 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, | |||
May 2017, <https://www.rfc-editor.org/info/rfc8174>. | May 2017, <https://www.rfc-editor.org/info/rfc8174>. | |||
12.2. Informative References | 12.2. Informative References | |||
[FIPS202] National Institute of Standards and Technology, "SHA-3 | ||||
Standard", FIPS PUB 202, August 2015. | ||||
[RFC1321] Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321, | [RFC1321] Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321, | |||
DOI 10.17487/RFC1321, April 1992, | DOI 10.17487/RFC1321, April 1992, | |||
<https://www.rfc-editor.org/info/rfc1321>. | <https://www.rfc-editor.org/info/rfc1321>. | |||
[RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- | [RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- | |||
Hashing for Message Authentication", RFC 2104, | Hashing for Message Authentication", RFC 2104, | |||
DOI 10.17487/RFC2104, February 1997, | DOI 10.17487/RFC2104, February 1997, | |||
<https://www.rfc-editor.org/info/rfc2104>. | <https://www.rfc-editor.org/info/rfc2104>. | |||
[RFC2136] Vixie, P., Ed., Thomson, S., Rekhter, Y., and J. Bound, | [RFC2136] Vixie, P., Ed., Thomson, S., Rekhter, Y., and J. Bound, | |||
skipping to change at page 22, line 34 ¶ | skipping to change at page 22, line 39 ¶ | |||
[RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for | [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for | |||
Writing an IANA Considerations Section in RFCs", BCP 26, | Writing an IANA Considerations Section in RFCs", BCP 26, | |||
RFC 8126, DOI 10.17487/RFC8126, June 2017, | RFC 8126, DOI 10.17487/RFC8126, June 2017, | |||
<https://www.rfc-editor.org/info/rfc8126>. | <https://www.rfc-editor.org/info/rfc8126>. | |||
Appendix A. Acknowledgments | Appendix A. Acknowledgments | |||
This document consolidates and updates the earlier documents by the | This document consolidates and updates the earlier documents by the | |||
authors of [RFC2845] (Paul Vixie, Olafur Gudmundsson, Donald E. | authors of [RFC2845] (Paul Vixie, Olafur Gudmundsson, Donald E. | |||
Eastlake 3rd and Brian Wellington) and [RFC4635] (Donald E. Eastlake | Eastlake 3rd and Brian Wellington) and [RFC4635] (Donald E. Eastlake | |||
3rd). It would not be possible without their original work. | 3rd). | |||
The security problem addressed by this document was reported by | The security problem addressed by this document was reported by | |||
Clement Berthaux from Synacktiv. | Clement Berthaux from Synacktiv. | |||
Note for the RFC Editor (to be removed before publication): the first | Note for the RFC Editor (to be removed before publication): the first | |||
'e' in Clement is a fact a small 'e' with acute, unicode code U+00E9. | 'e' in Clement is a fact a small 'e' with acute, unicode code U+00E9. | |||
I do not know if xml2rfc supports non ASCII characters so I prefer to | I do not know if xml2rfc supports non ASCII characters so I prefer to | |||
not experiment with it. BTW I am French too so I can help if you | not experiment with it. BTW I am French too so I can help if you | |||
have questions like correct spelling... | have questions like correct spelling... | |||
skipping to change at page 25, line 5 ¶ | skipping to change at page 24, line 51 ¶ | |||
Many improvements in the wording. | Many improvements in the wording. | |||
Added RFC 2845 authors as co-authors of this document. | Added RFC 2845 authors as co-authors of this document. | |||
draft-ietf-dnsop-rfc2845bis-02 | draft-ietf-dnsop-rfc2845bis-02 | |||
Added a recommendation to copy time fields in BADKEY errors. | Added a recommendation to copy time fields in BADKEY errors. | |||
(Mark Andrews) | (Mark Andrews) | |||
draft-ietf-dnsop-rfc2845bis-03 | ||||
Further changes as a result of comments by Mukund Sivaraman. | ||||
Miscellaneous changes to wording. | ||||
Authors' Addresses | Authors' Addresses | |||
Francis Dupont | Francis Dupont | |||
Internet Software Consortium | Internet Software Consortium | |||
950 Charter Street | 950 Charter Street | |||
Redwood City, CA 94063 | Redwood City, CA 94063 | |||
United States of America | United States of America | |||
Email: Francis.Dupont@fdupont.fr | Email: Francis.Dupont@fdupont.fr | |||
End of changes. 60 change blocks. | ||||
142 lines changed or deleted | 152 lines changed or added | |||
This html diff was produced by rfcdiff 1.47. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |