draft-ietf-dnsop-server-cookies-01.txt | draft-ietf-dnsop-server-cookies-02.txt | |||
---|---|---|---|---|
DNSOP Working Group O. Sury | DNSOP Working Group O. Sury | |||
Internet-Draft Internet Systems Consortium | Internet-Draft Internet Systems Consortium | |||
Updates: 7873 (if approved) W. Toorop | Updates: 7873 (if approved) W. Toorop | |||
Intended status: Standards Track NLnet Labs | Intended status: Standards Track NLnet Labs | |||
Expires: May 7, 2020 D. Eastlake 3rd | Expires: May 21, 2020 D. Eastlake 3rd | |||
Futurewei Technologies | Futurewei Technologies | |||
M. Andrews | M. Andrews | |||
Internet Systems Consortium | Internet Systems Consortium | |||
November 4, 2019 | November 18, 2019 | |||
Interoperable Domain Name System (DNS) Server Cookies | Interoperable Domain Name System (DNS) Server Cookies | |||
draft-ietf-dnsop-server-cookies-01 | draft-ietf-dnsop-server-cookies-02 | |||
Abstract | Abstract | |||
DNS cookies, as specified in RFC 7873, are a lightweight DNS | DNS cookies, as specified in RFC 7873, are a lightweight DNS | |||
transaction security mechanism that provides limited protection to | transaction security mechanism that provides limited protection to | |||
DNS servers and clients against a variety of denial-of-service and | DNS servers and clients against a variety of denial-of-service and | |||
amplification, forgery, or cache poisoning attacks by off-path | amplification, forgery, or cache poisoning attacks by off-path | |||
attackers. | attackers. | |||
This document provides precise directions for creating Server Cookies | This document provides precise directions for creating Server Cookies | |||
skipping to change at page 1, line 45 ¶ | skipping to change at page 1, line 45 ¶ | |||
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 7, 2020. | This Internet-Draft will expire on May 21, 2020. | |||
Copyright Notice | Copyright Notice | |||
Copyright (c) 2019 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 | |||
skipping to change at page 2, line 35 ¶ | skipping to change at page 2, line 35 ¶ | |||
2. Changes to [RFC7873] . . . . . . . . . . . . . . . . . . . . 4 | 2. Changes to [RFC7873] . . . . . . . . . . . . . . . . . . . . 4 | |||
3. Constructing a Client Cookie . . . . . . . . . . . . . . . . 4 | 3. Constructing a Client Cookie . . . . . . . . . . . . . . . . 4 | |||
4. Constructing a Server Cookie . . . . . . . . . . . . . . . . 5 | 4. Constructing a Server Cookie . . . . . . . . . . . . . . . . 5 | |||
4.1. The Version Sub-Field . . . . . . . . . . . . . . . . . . 6 | 4.1. The Version Sub-Field . . . . . . . . . . . . . . . . . . 6 | |||
4.2. The Reserved Sub-Field . . . . . . . . . . . . . . . . . 6 | 4.2. The Reserved Sub-Field . . . . . . . . . . . . . . . . . 6 | |||
4.3. The Timestamp Sub-Field . . . . . . . . . . . . . . . . . 6 | 4.3. The Timestamp Sub-Field . . . . . . . . . . . . . . . . . 6 | |||
4.4. The Hash Sub-Field . . . . . . . . . . . . . . . . . . . 6 | 4.4. The Hash Sub-Field . . . . . . . . . . . . . . . . . . . 6 | |||
5. Updating the Server Secret . . . . . . . . . . . . . . . . . 7 | 5. Updating the Server Secret . . . . . . . . . . . . . . . . . 7 | |||
6. Cookie Algorithms . . . . . . . . . . . . . . . . . . . . . . 8 | 6. Cookie Algorithms . . . . . . . . . . . . . . . . . . . . . . 8 | |||
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 | 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 | |||
8. References . . . . . . . . . . . . . . . . . . . . . . . . . 9 | 8. Security and Privacy Considerations . . . . . . . . . . . . . 9 | |||
8.1. Normative References . . . . . . . . . . . . . . . . . . 9 | 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 10 | |||
8.2. Informative References . . . . . . . . . . . . . . . . . 9 | 9.1. Normative References . . . . . . . . . . . . . . . . . . 10 | |||
Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 10 | 9.2. Informative References . . . . . . . . . . . . . . . . . 10 | |||
Appendix B. Test vectors . . . . . . . . . . . . . . . . . . . . 10 | Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 11 | |||
B.1. Learning a new Server Cookie . . . . . . . . . . . . . . 10 | Appendix B. Test vectors . . . . . . . . . . . . . . . . . . . . 11 | |||
B.2. The same client learning a renewed (fresh) Server Cookie 11 | B.1. Learning a new Server Cookie . . . . . . . . . . . . . . 11 | |||
B.3. Another client learning a renewed Server Cookie . . . . . 12 | B.2. The same client learning a renewed (fresh) Server Cookie 12 | |||
B.4. IPv6 query with rolled over secret . . . . . . . . . . . 13 | B.3. Another client learning a renewed Server Cookie . . . . . 13 | |||
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 14 | B.4. IPv6 query with rolled over secret . . . . . . . . . . . 14 | |||
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 15 | ||||
1. Introduction | 1. Introduction | |||
DNS cookies, as specified in [RFC7873], are a lightweight DNS | DNS cookies, as specified in [RFC7873], are a lightweight DNS | |||
transaction security mechanism that provides limited protection to | transaction security mechanism that provides limited protection to | |||
DNS servers and clients against a variety of denial-of-service and | DNS servers and clients against a variety of denial-of-service and | |||
amplification, forgery, or cache poisoning attacks by off-path | amplification, forgery, or cache poisoning attacks by off-path | |||
attackers. This document specifies a means of producing | attackers. This document specifies a means of producing | |||
interoperable strong cookies so that an anycast server set including | interoperable strong cookies so that an anycast server set including | |||
diverse implementations can be easily configured to interoperate with | diverse implementations can be easily configured to interoperate with | |||
skipping to change at page 3, line 49 ¶ | skipping to change at page 3, line 50 ¶ | |||
In Section Section 5 instructions on updating Server Secrets are | In Section Section 5 instructions on updating Server Secrets are | |||
given. | given. | |||
In Section Section 6 the different hash functions usable for DNS | In Section Section 6 the different hash functions usable for DNS | |||
Cookie construction are listed. [FNV] and HMAC-SHA-256-64 [RFC6234] | Cookie construction are listed. [FNV] and HMAC-SHA-256-64 [RFC6234] | |||
are deprecated and [SipHash-2.4] is introduced as a REQUIRED hash | are deprecated and [SipHash-2.4] is introduced as a REQUIRED hash | |||
function for server side DNS Cookie implementations. | function for server side DNS Cookie implementations. | |||
IANA considerations are in Section 7. | IANA considerations are in Section 7. | |||
Privacy and Security Considerations in Section 8. | ||||
Acknowledgements are in Appendix A. | Acknowledgements are in Appendix A. | |||
Test vectors are in Appendix B. | Test vectors are in Appendix B. | |||
1.2. Definitions | 1.2. Definitions | |||
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", | "SHOULD", "SHOULD NOT", "RECOMMENDED", "*NOT RECOMMENDED*", "MAY", | |||
and "OPTIONAL" in this document are to be interpreted as described in | and "OPTIONAL" in this document are to be interpreted as described in | |||
BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all | BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all | |||
skipping to change at page 4, line 35 ¶ | skipping to change at page 4, line 39 ¶ | |||
specification in Section 4 of this document, which MUST be used by | specification in Section 4 of this document, which MUST be used by | |||
Server Cookie implementations. | Server Cookie implementations. | |||
This document has suggestions on Client Cookie construction in | This document has suggestions on Client Cookie construction in | |||
Section 3. The previous example in Appendix A.2 of [RFC7873] is NOT | Section 3. The previous example in Appendix A.2 of [RFC7873] is NOT | |||
RECOMMENDED. | RECOMMENDED. | |||
3. Constructing a Client Cookie | 3. Constructing a Client Cookie | |||
The Client Cookie is a cryptographic nonce and should be treated as | The Client Cookie is a cryptographic nonce and should be treated as | |||
such. For simplicity, it can be calculated from Server IP Address, | such. It is RECOMMENDED to create a new Client Cookie for each new | |||
and a Client Secret known only to the Client that is changed whenever | upstream server a Client connects to. The Client Cookie SHOULD have | |||
an IP address previously used by the Client is no longer available. | at least 64-bits of entropy. | |||
The Client Cookie SHOULD have at least 64-bits of entropy. | ||||
Except for when the Client IP address changes, there is no need to | When a Server does not support DNS Cookies, the Client MUST NOT send | |||
change the Client Secret often if a secure pseudorandom function | the same Client Cookie to that same Server again. Instead, it is | |||
(like [SipHash-2.4]) is used. It is reasonable to change the Client | recommended that the Client does not send a Client Cookie to that | |||
secret then only if it has been compromised or after a relatively | Server for a certain period, like for example five minutes, before it | |||
long period of time such as no longer than a year. | retries with a new Client Cookie. | |||
It is RECOMMENDED but not required that the following pseudorandom | When a Server does support DNS Cookies, the Client should store the | |||
function be used to construct the Client Cookie: | Client Cookie alongside the Server Cookie it registered for that | |||
Server. | ||||
Client-Cookie = MAC_Algorithm( | Except for when the Client IP address changes, there is no need to | |||
Server IP Address, Client Secret ) | change the Client Cookie often. It is reasonable to change the | |||
Client Cookie then only if it has been compromised or after a | ||||
relatively long period of time such as no longer than a year. Client | ||||
Cookies are not expected to survive a program restart. | ||||
Client-Cookie = 64 bits of entropy | ||||
Previously, the recommended algorithm to compute the Client Cookie | Previously, the recommended algorithm to compute the Client Cookie | |||
included Client IP Address as an input to the MAC_Algorithm. | included Client IP Address as an input to a hashing function. | |||
However, when implementing the DNS Cookies, several DNS vendors found | However, when implementing the DNS Cookies, several DNS vendors found | |||
impractical to include the Client IP as the Client Cookie is | impractical to include the Client IP as the Client Cookie is | |||
typically computed before the Client IP address is known. Therefore, | typically computed before the Client IP address is known. Therefore, | |||
the requirement to put Client IP address as input was removed. | the requirement to put Client IP address as input was removed. | |||
However, for privacy reasons, in order to prevent tracking of devices | However, for privacy reasons, in order to prevent tracking of devices | |||
across links and to not circumvent IPv6 Privacy Extensions [RFC4941], | across links and to not circumvent IPv6 Privacy Extensions [RFC4941], | |||
Clients MUST NOT re-use a Client or Server Cookie after the Client IP | Clients MUST NOT re-use a Client or Server Cookie after the Client IP | |||
address has changed. | address has changed. | |||
The Client IP address is available on the UDP socket when it receives | One way to track Client IP addresses, is to register the Client IP | |||
the Server Cookie and should be registered alongside the Server | address alongside the Server Cookie when it receives the Server | |||
Cookie. In subsequent queries to the Server with that Server Cookie, | Cookie. In subsequent queries to the Server with that Server Cookie, | |||
the socket MUST be bound to the Client IP address that was also used | the socket MAY be bound to the Client IP address that was also used | |||
(and registered) when it received the Server Cookie. Failure to bind | (and registered) when it received the Server Cookie. Failure to bind | |||
must result in a new Client Cookie, which, for the method described | MUST then result in a new Client Cookie. | |||
in this section means a new Client Secret. | ||||
4. Constructing a Server Cookie | 4. Constructing a Server Cookie | |||
The Server Cookie is effectively a Message Authentication Code (MAC) | The Server Cookie is effectively a Message Authentication Code (MAC) | |||
and should be treated as such. The Server Cookie is calculated from | and should be treated as such. The Server Cookie is calculated from | |||
the Client Cookie, a series of Sub-Fields specified below, the Client | the Client Cookie, a series of Sub-Fields specified below, the Client | |||
IP address, and a Server Secret known only to the servers responding | IP address, and a Server Secret known only to the servers responding | |||
on the same address in an anycast set. | on the same address in an anycast set. | |||
Changing the Server Secret regularly is RECOMMENDED but, when a | Changing the Server Secret regularly is RECOMMENDED but, when a | |||
skipping to change at page 9, line 17 ¶ | skipping to change at page 9, line 20 ¶ | |||
+---------+-------+---------------------------------------+ | +---------+-------+---------------------------------------+ | |||
| 0 | 8-32 | reserved | | | 0 | 8-32 | reserved | | |||
| 1 | 8-15 | unassiged | | | 1 | 8-15 | unassiged | | |||
| 1 | 16 | SipHash-2.4 [this document] Section 4 | | | 1 | 16 | SipHash-2.4 [this document] Section 4 | | |||
| 1 | 17-32 | unassigned | | | 1 | 17-32 | unassigned | | |||
| 2-239 | 8-32 | unassigned | | | 2-239 | 8-32 | unassigned | | |||
| 240-254 | 8-32 | private use | | | 240-254 | 8-32 | private use | | |||
| 255 | 8-32 | reserved | | | 255 | 8-32 | reserved | | |||
+---------+-------+---------------------------------------+ | +---------+-------+---------------------------------------+ | |||
8. References | 8. Security and Privacy Considerations | |||
8.1. Normative References | DNS Cookies provides limited protection to DNS servers and clients | |||
against a variety of denial-of-service and amplification/forgery or | ||||
cache poisoning attacks by off-path attackers. They provide no | ||||
protection against on-path adversaries that can observe the plaintext | ||||
DNS traffic. An on-path adversary that can observe a Server Cookie | ||||
for a client and server interaction, can use that Server Cookie for | ||||
amplification and denial-of-service forgery attacks for the lifetime | ||||
of the Server Cookie. | ||||
In [RFC7873] it was RECOMMENDED to construct a Client Cookie by using | ||||
a pseudorandom function of the Client IP Address, the Server IP | ||||
Address, and a secret quantity known only to the client. The Client | ||||
IP Address was included to ensure that a client could not be tracked | ||||
if its IP Address changes due to privacy mechanisms or otherwise. | ||||
In this document, we changed Client Cookie construction to be just 64 | ||||
bits of entropy newly created for each new upstream server the client | ||||
connects to. As a consequence additional care needs to be taken to | ||||
prevent tracking of clients. To prevent tracking, a new Client | ||||
Cookie for a server MUST be created whenever the Client IP Address | ||||
changes. | ||||
Unfortunately, tracking Client IP Address Changes is impractical with | ||||
servers that do not support DNS Cookies. To prevent tracking of | ||||
clients with non DNS Cookie supporting servers, a client MUST NOT | ||||
send a previously sent Client Cookie. To prevent the creation of a | ||||
new Client Cookie for each query to an non DNS Cookies supporting | ||||
server, it is RECOMMENDED to not send a Client Cookie to that server | ||||
for a certain period, like for example five minute. | ||||
Summarizing: | ||||
o In order to provide minimal authentication, a client MUST use a | ||||
different Client Cookie for each different Server IP Address. | ||||
o To prevent tracking of clients, a new Client Cookie MUST be | ||||
created when the Client IP Address changes. | ||||
o To prevent tracking of clients for a non DNS Cookie supporting | ||||
server, a client MUST NOT send a previously sent Client Cookie to | ||||
that server, unless it can track Client IP Address changes for | ||||
those servers too. | ||||
Besides the Client Cookie construction, this update on [RFC7873] does | ||||
not introduce any new characteristics to DNS Cookies operations and | ||||
the Security Considerations section of [RFC7873] still applies. | ||||
9. References | ||||
9.1. Normative References | ||||
[RFC1982] Elz, R. and R. Bush, "Serial Number Arithmetic", RFC 1982, | [RFC1982] Elz, R. and R. Bush, "Serial Number Arithmetic", RFC 1982, | |||
DOI 10.17487/RFC1982, August 1996, | DOI 10.17487/RFC1982, August 1996, | |||
<https://www.rfc-editor.org/info/rfc1982>. | <https://www.rfc-editor.org/info/rfc1982>. | |||
[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>. | |||
skipping to change at page 9, line 42 ¶ | skipping to change at page 10, line 45 ¶ | |||
<https://www.rfc-editor.org/info/rfc7873>. | <https://www.rfc-editor.org/info/rfc7873>. | |||
[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>. | |||
[SipHash-2.4] | [SipHash-2.4] | |||
Aumasson, J. and D. Bernstein, "SipHash: a fast short- | Aumasson, J. and D. Bernstein, "SipHash: a fast short- | |||
input PRF", 2012, <https://131002.net/siphash/>. | input PRF", 2012, <https://131002.net/siphash/>. | |||
8.2. Informative References | 9.2. Informative References | |||
[FNV] Fowler, G., Noll, L., Vo, K., Eastlake, D., and T. Hansen, | [FNV] Fowler, G., Noll, L., Vo, K., Eastlake, D., and T. Hansen, | |||
"The FNV Non-Cryptographic Hash Algorithm", | "The FNV Non-Cryptographic Hash Algorithm", | |||
<https://datatracker.ietf.org/doc/draft-eastlake-fnv>. | <https://datatracker.ietf.org/doc/draft-eastlake-fnv>. | |||
[RFC6234] Eastlake 3rd, D. and T. Hansen, "US Secure Hash Algorithms | [RFC6234] Eastlake 3rd, D. and T. Hansen, "US Secure Hash Algorithms | |||
(SHA and SHA-based HMAC and HKDF)", RFC 6234, | (SHA and SHA-based HMAC and HKDF)", RFC 6234, | |||
DOI 10.17487/RFC6234, May 2011, | DOI 10.17487/RFC6234, May 2011, | |||
<https://www.rfc-editor.org/info/rfc6234>. | <https://www.rfc-editor.org/info/rfc6234>. | |||
End of changes. 17 change blocks. | ||||
36 lines changed or deleted | 92 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/ |