DPRIVE WG T. Reddy Internet-Draft McAfee Intended status: Standards Track D. Wing Expires: April 5, 2020 Citrix M. Richardson Sandelman Software Works October 3, 2019 DNS server privacy policy with assertion token draft-reddy-dprive-dprive-privacy-policy-00 Abstract Users want to control how their DNS queries are handled by DNS servers so they can configure their system to use DNS servers that comply with their privacy expectations. This document defines a mechanism for a DNS server to communicate its privacy policy to a DNS client. This communication is cryptographically signed to attest to its authenticity. By evaluating the DNS privacy policy and the signatory, the DNS client can choose a DNS server that best supports its desired privacy policies. The privacy assertion token is particularly useful for DNS-over-TLS and DNS-over-HTTPS servers, both public resolvers and those discovered on the local network. Status of This Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at https://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." This Internet-Draft will expire on April 5, 2020. Reddy, et al. Expires April 5, 2020 [Page 1] Internet-Draft Asserted DNS server privacy policy October 2019 Copyright Notice Copyright (c) 2019 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 3. Privacy assertion token (PAT) overview . . . . . . . . . . . 4 4. PAT Header . . . . . . . . . . . . . . . . . . . . . . . . . 5 4.1. "typ" (Type) Header Parameter . . . . . . . . . . . . . . 5 4.2. "alg" (Algorithm) Header Parameter . . . . . . . . . . . 5 4.3. "x5u" (X.509 URL) Header Parameter . . . . . . . . . . . 6 4.4. Example PAT header . . . . . . . . . . . . . . . . . . . 6 5. PAT Payload . . . . . . . . . . . . . . . . . . . . . . . . . 6 5.1. JWT defined claims . . . . . . . . . . . . . . . . . . . 7 5.1.1. "iat" - Issued At claim . . . . . . . . . . . . . . . 7 5.1.2. "exp" - Expiration Time claim . . . . . . . . . . . . 7 5.2. PAT specific claims . . . . . . . . . . . . . . . . . . . 7 5.2.1. DNS server Identity Claims . . . . . . . . . . . . . 7 5.2.2. "privinfo" (Privacy Information) Claim . . . . . . . 8 5.2.3. Example . . . . . . . . . . . . . . . . . . . . . . . 10 6. PAT Signature . . . . . . . . . . . . . . . . . . . . . . . . 11 7. Extending PAT . . . . . . . . . . . . . . . . . . . . . . . . 12 8. Deterministic JSON Serialization . . . . . . . . . . . . . . 12 8.1. Example PAT deterministic JSON form . . . . . . . . . . . 13 9. Privacy Considerations . . . . . . . . . . . . . . . . . . . 13 10. Security Considerations . . . . . . . . . . . . . . . . . . . 14 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 14 11.1. Media Type Registration . . . . . . . . . . . . . . . . 15 11.1.1. Media Type Registry Contents Additions Requested . . 15 11.2. JSON Web Token Claims Registration . . . . . . . . . . . 16 11.2.1. Registry Contents Additions Requested . . . . . . . 16 11.3. DNS Resolver Information Registration . . . . . . . . . 16 12. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 16 13. References . . . . . . . . . . . . . . . . . . . . . . . . . 16 13.1. Normative References . . . . . . . . . . . . . . . . . . 16 Reddy, et al. Expires April 5, 2020 [Page 2] Internet-Draft Asserted DNS server privacy policy October 2019 13.2. Informative References . . . . . . . . . . . . . . . . . 18 Appendix A. Example ES256 based PAT JWS Serialization and Signature . . . . . . . . . . . . . . . . . . . . . 19 A.1. X.509 Private Key in PKCS#8 format for ES256 Example** . 21 A.2. X.509 Public Key for ES256 Example** . . . . . . . . . . 21 Appendix B. Complete JWS JSON Serialization Representation with multiple Signatures . . . . . . . . . . . . . . . . 21 B.1. X.509 Private Key in PKCS#8 format for E384 Example** . . 23 B.2. X.509 Public Key for ES384 Example** . . . . . . . . . . 23 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 23 1. Introduction [RFC7626] discusses DNS privacy considerations in both "on the wire" (Section 2.4 of [RFC7626]) and "in the server" (Section 2.5 of [RFC7626] contexts. In recent years there has also been an increase in the availability of "public resolvers" [I-D.ietf-dnsop-terminology-bis] which DNS clients may be pre- configured to use instead of the default network resolver because they offer a specific feature (e.g., good reachability, encrypted transport, strong privacy policy, filtering (or lack of), etc.). While a human can read the privacy policy of a DNS server operator, this information is not machine-parsable to allow automatic DNS server selection by the DNS client software. For DNS servers operated on the local network, the DNS client can be securely bootstrapped to discover and authenticate DNS-over-TLS and DNS-over- HTTPS servers provided by a local network using the technique proposed in [I-D.reddy-dprive-bootstrap-dns-server]. By creating a machine-parsable DNS server privacy policy, the DNS client can automatically allow using a DNS server on the local network that complies with the DNS client's privacy policy. This document defines a method for creating and validating a token that cryptographically verifies the privacy policy information of a DNS server, such as a DNS-over-TLS or DNS-over-HTTPS server. The cryptographically signed privacy statement allows a DNS client to connect to multiple DNS servers and select the DNS server that adheres to the privacy preserving data policy requirements of the client. For example, a browser with pre-configured DNS-over-HTTPS server can discover the DNS-over-HTTPS server provided the local network, connects to both the DNS servers, gets the privacy policy information from each of the DNS servers, validates the signatures and uses a server that meets the privacy preserving data policy requirements of the client. If both servers meet the privacy preserving data policy requirements of the client, it can select to use the local DNS server. In addition, the cryptographically signed privacy statement allows a DNS-over-TLS or DNS-over-HTTPS client to Reddy, et al. Expires April 5, 2020 [Page 3] Internet-Draft Asserted DNS server privacy policy October 2019 securely determine whether the local DNS server performs DNS-based content filtering, and if the local server meets the privacy preserving data policy requirements of the client, the client can continue to use the local DNS-over-TLS server to resolve DNS queries and does not have to switch to the pre-configured public resolver. 2. Terminology The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119][RFC8174] when, and only when, they appear in all capitals, as shown here. (D)TLS is used for statements that apply to both Transport Layer Security [RFC8446] and Datagram Transport Layer Security [RFC6347]. Specific terms are used for any statement that applies to either protocol alone. This document uses the terms defined in [RFC8499]. 3. Privacy assertion token (PAT) overview JSON Web Token (JWT) [RFC7519] and JSON Web Signature (JWS) [RFC7515] and related specifications define a standard token format that can be used as a way of encapsulating claimed or asserted information with an associated digital signature using X.509 based certificates. JWT provides a set of claims in JSON format that can conveniently accommodate asserted privacy policy information of the DNS-over-TLS or DNS-over-HTTPS server. Additionally, JWS provides a path for updating methods and cryptographic algorithms used for the associated digital signatures. JWS defines the use of JSON data structures in a specified canonical format for signing data corresponding to JOSE header, JWS Payload, and JWS Signature. JWT defines a set of claims that are represented by specified JSON objects which can be extended with custom keys for specific applications. The next sections define the header and claims that MUST be minimally used with JWT and JWS for privacy assertion token. The privacy assertion token (PAT) specifically uses this token format and defines claims that convey the privacy policy information of DNS- over-TLS or DNS-over-HTTPS server. The signer of a PAT object may or may not correspond to the DNS server's domain. The PAT object can be validated by the DNS client, and if the DNS server meets the privacy preserving data policy requirements of the client and/or end user, it can switch to the privacy-enabling DNS server discovered in the Reddy, et al. Expires April 5, 2020 [Page 4] Internet-Draft Asserted DNS server privacy policy October 2019 located network. The creation of the PAT object is performed by an entity that is authoritative to assert the DNS server privacy policy information. This authority is represented by the certificate credentials and the signature, and PAT object is created and the client can retrieve the PAT object using the method discussed in [I-D.ietf-dnsop-resolver-information]. For example, the PAT object could be created by the domain hosting the DNS-over-TLS or DNS-over-HTTPS server, or by a third party who performed privacy and security audit of the DNS-over-TLS or DNS-over- HTTPS server. The DNS client needs to have the capability to verify the PAT token and the digital signature. The PAT associated certificate is used to validate the authority of the originating signer, generally via a certificate chain to the trust anchor for the DNS client. 4. PAT Header The JWS token header is a JOSE header, [RFC7515] Section 4, that defines the type and encryption algorithm used in the token. PAT header should include, at a minimum, the header parameters defined in the next three subsections. 4.1. "typ" (Type) Header Parameter The "typ" (Type) Header Parameter is defined in JWS [RFC7515] Section 4.1.9 to declare the media type of the complete JWS. For PAT Token the "typ" header MUST be the string "pat". This represents that the encoded token is a JWT of type pat. 4.2. "alg" (Algorithm) Header Parameter The "alg" (Algorithm) Header Parameter is defined in JWS [RFC7515] Section 4.1.1. This definition includes the ability to specify the use of a cryptographic algorithm for the signature part of the JWS. It also refers to a list of defined "alg" values as part of a registry established by JSON Web Algorithms (JWA) [RFC7518] Section 3.1. For the creation and verification of PAT tokens and their digital signatures, implementations MUST support ES256 as defined in JWA [RFC7518] Section 3.4. Implementations MAY support other algorithms registered in the JSON Web Signature and Encryption Algorithms registry created by [RFC7518]. The contents of that registry may be updated in the future depending on cryptographic strength requirements guided by current security best practice. The Reddy, et al. Expires April 5, 2020 [Page 5] Internet-Draft Asserted DNS server privacy policy October 2019 mandatory-to-support algorithm for PAT tokens may likewise be updated in future updates to this document. Implementations of PAT digital signatures using ES256 as defined above SHOULD use deterministic ECDSA if/when supported for the reasons stated in [RFC6979]. 4.3. "x5u" (X.509 URL) Header Parameter As defined in JWS [RFC7515] Section 4.1.5., the "x5u" header parameter defines a URI [RFC3986] referring to the resource for the X.509 public key certificate or certificate chain [RFC5280] corresponding to the key used to digitally sign the JWS. Generally, as defined in JWS [RFC7515] section 4.1.5, this would correspond to an HTTPS or DNSSEC resource using integrity protection. 4.4. Example PAT header An example of the header, would be the following, including the specified pat type, ES256 algorithm, and a URI referencing the network location of the certificate needed to validate the PAT signature. { "typ":"pat", "alg":"ES256", "x5u":"https://cert.example.com/pat.cer" } 5. PAT Payload The token claims consists of the privacy policy information of the DNS server which needs to be verified at the DNS client. These claims follow the definition of a JWT claim [RFC7519] Section 4 and are encoded as defined by the JWS Payload [RFC7515] Section 3. PAT defines the use of a standard JWT defined claim as well as custom claims corresponding to the DNS-over-TLS or DNS-over-HTTPS servers. Any claim names MUST use the US-ASCII character set. Any claim values can contain characters that are outside the US-ASCII range, however MUST follow the default JSON serialization defined in [RFC7519] Section 7. Reddy, et al. Expires April 5, 2020 [Page 6] Internet-Draft Asserted DNS server privacy policy October 2019 5.1. JWT defined claims 5.1.1. "iat" - Issued At claim The JSON claim MUST include the "iat" [RFC7519] Section 4.1.6 defined claim Issued At. As defined the "iat" should be set to the date and time of issuance of the JWT. The time value should be of the format defined in [RFC7519] Section 2 NumericDate. 5.1.2. "exp" - Expiration Time claim The JSON claim MUST include the "exp" [RFC7519] Section 4.1.4 defined claim Expiration Time. As defined the "exp" should be set to specify the expiration time on or after which the JWT is not accepted for processing. The PAT object should generally expire after a reasonable duration. A short expiration time for the PAT object periodically reaffirms the privacy policy information of the DNS server to the client and ensures the client does not use outdated privacy policy information. If the client knows the PAT object has expired, it makes another request to get the new PAT object from the DNS server. 5.2. PAT specific claims 5.2.1. DNS server Identity Claims The DNS server identity is represented by a claim that is required for PAT, the "server" claim. The "server" MUST contain claim values that are identity claim JSON objects where the child claim name represents an identity type and the claim value is the identity string, both defined in subsequent subsections. Currently, these identities can be represented as either authentication domain name (ADN) (defined in [RFC8310]) or Uniform Resource Indicators (URI). 5.2.1.1. "adn" - authentication domain name identity If the DNS server identity is a ADN, the claim name representing the identity MUST be "adn". The claim value for the "adn" claim is the ADN. 5.2.1.2. "uri" - URI identity If the DNS server identity is of the form URI, as defined in [RFC3986], the claim name representing the identity MUST be "uri" and the claim value is the URI form of the DNS server identity. As a reminder, if DNS-over-HTTPS protocol is supported by the DNS server, the DNS client uses the https URI scheme (Section 3 of [RFC8484]). Reddy, et al. Expires April 5, 2020 [Page 7] Internet-Draft Asserted DNS server privacy policy October 2019 5.2.2. "privinfo" (Privacy Information) Claim The "privinfo" claim MUST be formatted as a JSON object. The "privinfo" claim contains the privacy policy information of the DNS server, it includes the following attributes: ipaddresspii: If the client IP address is Personally Identifiable Information (PII) data or non PII-data. If client IP address is PII, the parameter value is set to 'true'. This is a mandatory attribute. logging: If the transaction data (e.g., DNS messages) is logged and the duration that data is stored. A value of negative one (-1) indicates indefinite duration of logging transaction data. A value of zero (0) indicates no logging. Logging duration is represented in hours. If any of the attributes 'useridentity', 'notifyuser' and 'analytics' are not set to the value zero, 'logging' attribute MUST NOT be set to the value zero. This is a mandatory attribute. useridentity: If the user identity that sent the DNS query is logged and the duration that data is retained. User identity includes things such as username, IP address, MAC address, user DNS query patterns or any other personally identifiable data. The server should also discard or minimize correlation data (Section 5.2.4 of [I-D.ietf-dprive-bcp-op]) that can be used to identify the end user. A value of negative one (-1) indicates indefinite duration of logging user identity. A value of zero (0) indicates no logging. Logging duration is represented in hours. This is a mandatory attribute. filtering: If the DNS server changes some of the answers that it returns based on policy criteria, such as to prevent access to malware sites or objectionable content. This optional attribute has the following structure: malwareblocking: The DNS server offers malware blocking service. If access to domains is blocked on threat data, the parameter value is set to 'true'. policyblocking: If access to domains is blocked on a blacklist or objectionable content, the parameter value is set to 'true'. notifyuser: If the transaction data is logged to notify the user access to certain domains is blocked, the period for which the transaction data is stored. A value of negative one (-1) indicates indefinite duration of logging transaction data to notify the user. A value of zero (0) indicates no logging. Reddy, et al. Expires April 5, 2020 [Page 8] Internet-Draft Asserted DNS server privacy policy October 2019 Logging duration is represented in hours. This is an optional attribute. analytics: If the transaction data is logged for analytics (e.g., To detect malicious domains), the period for which the transaction data is stored. A value of negative one (-1) indicates indefinite duration of logging transaction data for analytics. A value of zero (0) indicates no logging. Logging duration is represented in hours. This is an optional attribute. sharedata: If the transaction data is shared with partners or not, and if the transaction data is shared with partners, the names of the partners. If anonymized data or client identifiable data is shared with partners. The term "anonymization" is defined in Section 5.2.2 of [I-D.ietf-dprive-bcp-op]. This mandatory attribute has the following structure: sharepartners: If transaction data is shared with partners, the parameter value is set to 'true'. partners: List of partner names. If 'sharepartners' value is set to false, 'partners' MUST NOT be present in the 'sharedata' structure. anonymizeddata: If anonymized transaction data is shared with partners, the parameter value is set to 'true'. If 'sharepartners' value is set to false, 'anonymizeddata' MUST NOT be present in the 'sharedata' structure. transferdata: If the transaction data is shared or sold to third parties. If the parameter value is set to 'true', means share or sell data to third parties. This is a mandatory attribute. qnameminimization: If the DNS server implements QNAME minimisation [RFC7816] to improve DNS privacy. If the parameter value is set to 'true', QNAME minimisation is supported by the DNS server. This is a mandatory attribute. privacyurl: A URL that points to the privacy policy information of the DNS server. This is a mandatory attribute. auditurl: A URL that points to the security assessment report of the DNS server by a third party auditor. This is an optional attribute. upstreamservers: The local DNS server can be configured as a Forwarding DNS server [RFC8499] relying on the upstream resolver (e.g., at an ISP) to perform recursive DNS lookups. The client Reddy, et al. Expires April 5, 2020 [Page 9] Internet-Draft Asserted DNS server privacy policy October 2019 needs to discover the privacy policy information of both the forwarder and recursive resolvers. This optional attribute has the following structure: securechannel: If DNS-over-TLS or DNS-over-HTTPS is used to encrypt the DNS messages exchanged between the local DNS server and recursive resolver, the parameter value is set to 'true'. upstreamserverspat: The PAT object of the upstream DNS server. If a local DNS server is configured as a Forwarding DNS server, its PAT MUST include the PAT object of the upstream resolver it is using. If the upstream DNS resolver does not communicate its privacy policy, the attribute value must be set to empty string. The client can combine the local and upstream resolver's privacy policies, always combining for the worse privacy values. For example, if the local server does not log queries but the upstream resolver does log queries, the combined PAT policy would indicate queries are logged and the client can evaluate if its privacy preserving data policy requirements are met. The Forwarding DNS server is typically configured with both primary and secondary resolvers as a backup mechanism to handle primary server failure. If the local DNS server is configured to use primary and secondary resolvers, 'upstreamserverspat' MUST include two entries in the array. If the local DNS server is acting as a forwarder, it RECOMMENDED that the DNS client requests the privacy policy information of the server every time the connection is re- established with the server. It allows the client to detect change in the local DNS server configuration to use an alternate resolver. 5.2.3. Example The below Figure shows an example of privacy policy information. Reddy, et al. Expires April 5, 2020 [Page 10] Internet-Draft Asserted DNS server privacy policy October 2019 { "server":{ "adn":["example.com"] }, "iat":1443208345, "exp":1443640345, "privinfo": { "ipaddresspii":true, "logging": 24, "useridentity": 24, "sharedata": { "sharepartners": false }, "transferdata":false, "privacyurl": "https://example.com/commitment-to-privacy/" } } 6. PAT Signature The signature of the PAT is created as specified by JWS [RFC7515] Section 5.1 Steps 1 through 6. PAT MUST use the JWS Protected Header. For the JWS Payload and the JWS Protected Header, the lexicographic ordering and white space rules described in Section 4 and Section 5, and JSON serialization rules in Section 8 of this document MUST be followed. The PAT is cryptographically signed by the domain hosting the DNS server and optionally by a third party who performed privacy and security audit of the DNS server. The privacy policy information will be attested using "Organization Validation" (OV) or "Extended Validation" (EV) certificates to avoid bad actors taking advantage of this mechanism to advertise DNS-over-TLS and DNS-over-HTTPS servers for illegitimate and fraudulent purposes meant to trick DNS clients into believing that they are using a legitimate DNS-over-TLS or DNS- over-HTTPS server hosted to provide privacy for DNS transactions. Alternatively, the DNS client will have to be configured to trust the leaf of the signer of the PAT object. That is, trust of the signer MUST NOT be determined by validating the signer via the OS or browser trust chain because that would allow any arbitrary entity to operate a DNS server and assert any sort of privacy policy. Appendix A of this document has a detailed example of how to follow the steps to create the JWS Signature. JWS [RFC7515] Section 5.1 Step 7 JWS JSON serialization is supported for PAT to enable multiple signatures to be applied to the PAT object. For example, the PAT object can be cryptographically signed Reddy, et al. Expires April 5, 2020 [Page 11] Internet-Draft Asserted DNS server privacy policy October 2019 by the domain hosting the DNS server and by a third party who performed privacy and security audit of the DNS server. Appendix B of this document has a example of complete JWS JSON serialization representation with multiple signatures. JWS [RFC7515] Section 5.1 Step 8 describes the method to create the final JWS Compact Serialization form of the PAT Token. 7. Extending PAT PAT includes the minimum set of claims needed to securely assert the privacy policy information of the DNS server. JWT supports a straight forward way to add additional asserted or signed information by simply adding new claims. PAT can be extended beyond the defined base set of claims to represent other DNS server information requiring assertion or validation. Specifying new claims follows the baseline JWT procedures ([RFC7519] Section 10.1). Understanding new claims on the DNS client is optional. The creator of a PAT object cannot assume that the DNS client will understand the new claims. 8. Deterministic JSON Serialization JSON objects can include spaces and line breaks, and key value pairs can occur in any order. It is therefore a non-deterministic string format. In order to make the digital signature verification work deterministically, the JSON representation of the JWS Protected Header object and JWS Payload object MUST be computed as follows. The JSON object MUST follow the following rules. These rules are based on the thumbprint of a JSON Web Key (JWK) as defined in Section 3 Step 1 of [RFC7638]. 1. The JSON object MUST contain no whitespace or line breaks before or after any syntactic elements. 2. JSON objects MUST have the keys ordered lexicographically by the Unicode [UNICODE] code points of the member names. 3. JSON value literals MUST be lowercase. 4. JSON numbers are to be encoded as integers unless the field is defined to be encoded otherwise. 5. Encoding rules MUST be applied recursively to member values and array values. Reddy, et al. Expires April 5, 2020 [Page 12] Internet-Draft Asserted DNS server privacy policy October 2019 8.1. Example PAT deterministic JSON form This section demonstrates the deterministic JSON serialization for the example PAT Payload shown in Section 5.2.3. The initial JSON object is shown here: { "server":{ "adn":["example.com"] }, "iat":1443208345, "exp":1443640345, "privinfo": { "ipaddresspii":true, "logging": 24, "useridentity": 24, "sharedata": { "sharepartners": false }, "transferdata":false, "privacyurl": "https://example.com/commitment-to-privacy/" } } The parent members of the JSON object are as follows, in lexicographic order: "exp", "iat", "privinfo", "server". The final constructed deterministic JSON serialization representation, with whitespace and line breaks removed, (with line breaks used for display purposes only) is: {"exp":1443640345,"iat":1443208345,"privinfo":{"ipaddresspii":true, "logging":24,"privacyurl":"https://example.com/commitment-to-privacy/", "sharedata":{"sharepartners":false},"transferdata":false, "useridentity":24},"server":{"adn":["example.com"]}} 9. Privacy Considerations Users are expected to indicate to their system in some way that they trust certain PAT signers (e.g., if working for Example, Inc., the user's system is configured to trust example.com signing the PAT). Separately, the user is expected to indicate to their system their PAT privacy requirements (e.g., logging, etc.). By doing so, the DNS client can automatically discover local DNS-over-TLS or DNS-over- HTTPS server, validate the PAT signature and check if the PAT complies with user's privacy needs, prior to using that DNS-over-TLS or DNS-over-HTTPS server for DNS queries. The client MAY also Reddy, et al. Expires April 5, 2020 [Page 13] Internet-Draft Asserted DNS server privacy policy October 2019 retrieve the human-readable privacy statement from the 'privacyurl' attribute to assist with that decision (e.g., display the privacy statement when it changes, show differences in previously-retrieved version, etc.). With the steps above, user consent is obtained prior to using a locally-discovered DNS-over-TLS or DNS-over-HTTPS server for DNS queries. An average user may not be able to indicate the privacy preserving data policy requirements to the system. For such users, the DNS client should auto check if the PAT complies with typical users privacy needs. For example, the client by default does not select the local DNS-over-TLS or DNS-over-HTTPS server if it shares non- anonymized DNS transaction data with partners or if it logs the DNS transaction data for a very long duration. 10. Security Considerations The use of PAT object based on the validation of the digital signature and the associated certificate requires consideration of the authentication and authority or reputation of the signer to attest the privacy policy information of the DNS server being asserted. Bad actors can host DNS-over-TLS and DNS-over-HTTPS servers, and claim the servers offer privacy but exactly do the opposite to invade the privacy of the user. Bad actor can get a domain name, host DNS-over-TLS and DNS-over-HTTPS servers, and get the DNS server certificate signed by a CA. The privacy policy information will have to be attested using OV/EV certificates or a PAT object signer trusted by the DNS client to prevent the attack. If the PAT object is asserted by a third party, it can do a "time of check" but the DNS server is susceptible of "time of use" attack. For example, changes to privacy policy of the DNS server like sharing identifiable transaction data with partners can cause a disagreement between the PAT object and the DNS server operation. In other words, the DNS server might have complied with the privacy policy when it was audited (by the 3rd party) but could now be in non-compliance with its privacy policy, hence the PAT object needs to be also asserted by the domain hosting the DNS server. In addition, the PAT object needs to have a short expiration time (e.g., 7 days) to ensure the DNS server's domain re-asserts the privacy policy information and limits the damage from change in privacy policy and mis-issuance. 11. IANA Considerations Reddy, et al. Expires April 5, 2020 [Page 14] Internet-Draft Asserted DNS server privacy policy October 2019 11.1. Media Type Registration 11.1.1. Media Type Registry Contents Additions Requested This section registers the "application/pat" media type [RFC2046] in the "Media Types" registry in the manner described in [RFC6838], which can be used to indicate that the content is a PAT defined JWT. o Type name: application o Subtype name: pat o Required parameters: n/a o Optional parameters: n/a o Encoding considerations: 8bit; application/pat values are encoded as a series of base64url-encoded values (some of which may be the empty string) separated by period ('.') characters.. o Security considerations: See the Security Considerations Section of [RFC7515]. o Interoperability considerations: n/a o Published specification: [RFCThis] o Applications that use this media type: DNS o Fragment identifier considerations: n/a o Additional information: Magic number(s): n/a File extension(s): n/a Macintosh file type code(s): n/a o Person & email address to contact for further information: Tirumaleswar Reddy, kondtir@gmail.com o Intended usage: COMMON o Restrictions on usage: none o Author: Tirumaleswar Reddy, kondtir@gmail.com o Change Controller: IESG o Provisional registration? No Reddy, et al. Expires April 5, 2020 [Page 15] Internet-Draft Asserted DNS server privacy policy October 2019 11.2. JSON Web Token Claims Registration 11.2.1. Registry Contents Additions Requested o Claim Name: "server" o Claim Description: DNS server identity o Change Controller: IESG o Specification Document(s): Section 5.2.1 of [TODO this document] o Claim Name: "privinfo" o Claim Description: Privacy policy information of DNS server. o Change Controller: IESG o Specification Document(s): Section 5.2.2 of [TODO this document] 11.3. DNS Resolver Information Registration IANA will add the names ipaddresspii, logging, useridentity, filtering, notifyuser, analytics, sharedata, transferdata, qnameminimization, privacyurl, auditurl and upstreamserverpat to the DNS Resolver Information registry defined in Section 5.2 of [I-D.ietf-dnsop-resolver-information]. 12. Acknowledgments This specification leverages some of the work that has been done in [RFC8225]. Thanks to Ted Lemon and Shashank Jain for the discussion and comments. 13. References 13.1. Normative References [I-D.ietf-dnsop-resolver-information] Sood, P., Arends, R., and P. Hoffman, "DNS Resolver Information Self-publication", draft-ietf-dnsop-resolver- information-00 (work in progress), August 2019. [I-D.ietf-dnsop-terminology-bis] Hoffman, P., Sullivan, A., and K. Fujiwara, "DNS Terminology", draft-ietf-dnsop-terminology-bis-14 (work in progress), September 2018. Reddy, et al. Expires April 5, 2020 [Page 16] Internet-Draft Asserted DNS server privacy policy October 2019 [RFC2046] Freed, N. and N. Borenstein, "Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types", RFC 2046, DOI 10.17487/RFC2046, November 1996, . [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, . [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform Resource Identifier (URI): Generic Syntax", STD 66, RFC 3986, DOI 10.17487/RFC3986, January 2005, . [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., Housley, R., and W. Polk, "Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008, . [RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347, January 2012, . [RFC6838] Freed, N., Klensin, J., and T. Hansen, "Media Type Specifications and Registration Procedures", BCP 13, RFC 6838, DOI 10.17487/RFC6838, January 2013, . [RFC6979] Pornin, T., "Deterministic Usage of the Digital Signature Algorithm (DSA) and Elliptic Curve Digital Signature Algorithm (ECDSA)", RFC 6979, DOI 10.17487/RFC6979, August 2013, . [RFC7515] Jones, M., Bradley, J., and N. Sakimura, "JSON Web Signature (JWS)", RFC 7515, DOI 10.17487/RFC7515, May 2015, . [RFC7518] Jones, M., "JSON Web Algorithms (JWA)", RFC 7518, DOI 10.17487/RFC7518, May 2015, . [RFC7519] Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token (JWT)", RFC 7519, DOI 10.17487/RFC7519, May 2015, . Reddy, et al. Expires April 5, 2020 [Page 17] Internet-Draft Asserted DNS server privacy policy October 2019 [RFC7638] Jones, M. and N. Sakimura, "JSON Web Key (JWK) Thumbprint", RFC 7638, DOI 10.17487/RFC7638, September 2015, . [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, . [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, . [RFC8484] Hoffman, P. and P. McManus, "DNS Queries over HTTPS (DoH)", RFC 8484, DOI 10.17487/RFC8484, October 2018, . [RFC8499] Hoffman, P., Sullivan, A., and K. Fujiwara, "DNS Terminology", BCP 219, RFC 8499, DOI 10.17487/RFC8499, January 2019, . [UNICODE] The Unicode Consortium, "The Unicode Standard", June 2016, . 13.2. Informative References [I-D.ietf-dprive-bcp-op] Dickinson, S., Overeinder, B., Rijswijk-Deij, R., and A. Mankin, "Recommendations for DNS Privacy Service Operators", draft-ietf-dprive-bcp-op-03 (work in progress), July 2019. [I-D.reddy-dprive-bootstrap-dns-server] K, R., Wing, D., Richardson, M., and M. Boucadair, "A Bootstrapping Procedure to Discover and Authenticate DNS- over-(D)TLS and DNS-over-HTTPS Servers", draft-reddy- dprive-bootstrap-dns-server-04 (work in progress), June 2019. [RFC7626] Bortzmeyer, S., "DNS Privacy Considerations", RFC 7626, DOI 10.17487/RFC7626, August 2015, . [RFC7816] Bortzmeyer, S., "DNS Query Name Minimisation to Improve Privacy", RFC 7816, DOI 10.17487/RFC7816, March 2016, . Reddy, et al. Expires April 5, 2020 [Page 18] Internet-Draft Asserted DNS server privacy policy October 2019 [RFC8225] Wendt, C. and J. Peterson, "PASSporT: Personal Assertion Token", RFC 8225, DOI 10.17487/RFC8225, February 2018, . [RFC8310] Dickinson, S., Gillmor, D., and T. Reddy, "Usage Profiles for DNS over TLS and DNS over DTLS", RFC 8310, DOI 10.17487/RFC8310, March 2018, . Appendix A. Example ES256 based PAT JWS Serialization and Signature For PAT, there will always be a JWS with the following members: o "protected", with the value BASE64URL(UTF8(JWS Protected Header)) o "payload", with the value BASE64URL (JWS Payload) o "signature", with the value BASE64URL(JWS Signature) This example will follow the steps in JWS [RFC7515] Section 5.1, steps 1-6 and 8 and incorporates the additional serialization steps required for PAT. Step 1 for JWS references the JWS Payload, an example PAT Payload is as follows: { "server":{ "adn":["example.com"] }, "iat":1443208345, "exp":1443640345, "privinfo": { "ipaddresspii":true, "logging": 24, "useridentity": 24, "sharedata": { "sharepartners": false }, "transferdata":false, "privacyurl": "https://example.com/commitment-to-privacy/" } } This would be serialized to the form (with line break used for display purposes only): Reddy, et al. Expires April 5, 2020 [Page 19] Internet-Draft Asserted DNS server privacy policy October 2019 {"exp":1443640345,"iat":1443208345,"privinfo":{"ipaddresspii":true, "logging":24,"privacyurl":"https://example.com/commitment-to-privacy/", "sharedata":{"sharepartners":false},"transferdata":false, "useridentity":24},"server":{"adn":["example.com"]}} Step 2 Computes the BASE64URL(JWS Payload) producing this value (with line break used for display purposes only): eyJleHAiOjE0NDM2NDAzNDUsImlhdCI6MTQ0MzIwODM0NSwicHJpdmluZm8iOnsi aXBhZGRyZXNzcGlpIjp0cnVlLCJsb2dnaW5nIjoyNCwicHJpdmFjeXVybCI6Imh0 dHBzOi8vZXhhbXBsZS5jb20vY29tbWl0bWVudC10by1wcml2YWN5LyIsInNoYXJl ZGF0YSI6eyJzaGFyZXBhcnRuZXJzIjpmYWxzZX0sInRyYW5zZmVyZGF0YSI6ZmFs c2UsInVzZXJpZGVudGl0eSI6MjR9LCJzZXJ2ZXIiOnsiYWRuIjpbImV4YW1wbGUu Y29tIl19fQ For Step 3, an example PAT Protected Header comprising the JOSE Header is as follows: { "alg":"ES256", "typ":"pat", "x5u":"https://cert.example.com/pat.cer" } This would be serialized to the form (with line break used for display purposes only): {"alg":"ES256","typ":"pat","x5u":"https://cert.example.com /pat.cer"} Step 4 Performs the BASE64URL(UTF8(JWS Protected Header)) operation and encoding produces this value (with line break used for display purposes only): eyJhbGciOiJFUzI1NiIsInR5cCI6InBhdCIsIng1dSI6Imh0dHBzOi8vY2VydC5l eGFtcGxlLmNvbS9wYXQuY2VyIn0 Step 5 and Step 6 performs the computation of the digital signature of the PAT Signing Input ASCII(BASE64URL(UTF8(JWS Protected Header)) || '.' || BASE64URL(JWS Payload)) using ES256 as the algorithm and the BASE64URL(JWS Signature). LEyaZpkJWVeJiQXdh6stCUo5VnLO56p9nTNsG8xhqpQMoJWc4j46Ze_43wPG-vHb Xq7BaVIfdb_Lw3BcKr92Cw Reddy, et al. Expires April 5, 2020 [Page 20] Internet-Draft Asserted DNS server privacy policy October 2019 Step 8 describes how to create the final PAT token, concatenating the values in the order Header.Payload.Signature with period ('.') characters. For the above example values this would produce the following (with line breaks between period used for readability purposes only): eyJhbGciOiJFUzI1NiIsInR5cCI6InBhdCIsIng1dSI6Imh0dHBzOi8vY2VydC5l eGFtcGxlLmNvbS9wYXQuY2VyIn0 . eyJleHAiOjE0NDM2NDAzNDUsImlhdCI6MTQ0MzIwODM0NSwicHJpdmluZm8iOnsi aXBhZGRyZXNzcGlpIjp0cnVlLCJsb2dnaW5nIjoyNCwicHJpdmFjeXVybCI6Imh0 dHBzOi8vZXhhbXBsZS5jb20vY29tbWl0bWVudC10by1wcml2YWN5LyIsInNoYXJl ZGF0YSI6eyJzaGFyZXBhcnRuZXJzIjpmYWxzZX0sInRyYW5zZmVyZGF0YSI6ZmFs c2UsInVzZXJpZGVudGl0eSI6MjR9LCJzZXJ2ZXIiOnsiYWRuIjpbImV4YW1wbGUu Y29tIl19fQ . 1ysb-n4O3YeN7HwPtzMP3SCEz28I80c78Lke4D_DRiwT8_-zi0p8IwmNU9778lOy Ub9WZehA89G4VMx8DDpm0Q A.1. X.509 Private Key in PKCS#8 format for ES256 Example** -----BEGIN PRIVATE KEY----- MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgevZzL1gdAFr88hb2 OF/2NxApJCzGCEDdfSp6VQO30hyhRANCAAQRWz+jn65BtOMvdyHKcvjBeBSDZH2r 1RTwjmYSi9R/zpBnuQ4EiMnCqfMPWiZqB4QdbAd0E7oH50VpuZ1P087G -----END PRIVATE KEY----- A.2. X.509 Public Key for ES256 Example** -----BEGIN PUBLIC KEY----- MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEEVs/o5+uQbTjL3chynL4wXgUg2R9 q9UU8I5mEovUf86QZ7kOBIjJwqnzD1omageEHWwHdBO6B+dFabmdT9POxg== -----END PUBLIC KEY----- Appendix B. Complete JWS JSON Serialization Representation with multiple Signatures The JWS payload used in this example as follows. Reddy, et al. Expires April 5, 2020 [Page 21] Internet-Draft Asserted DNS server privacy policy October 2019 { "server":{ "adn":["example.com"] }, "iat":1443208345, "exp":1443640345, "privinfo": { "ipaddresspii":true, "logging": 24, "useridentity": 24, "sharedata": { "sharepartners": false }, "transferdata":false, "privacyurl": "https://example.com/commitment-to-privacy/", "auditurl": "https://audit-example.com/privacyaudit" } } This would be serialized to the form (with line break used for display purposes only): {"auditurl":"https://audit-example.com/privacyaudit","exp":1443640345, "iat":1443208345,"privinfo":{"ipaddresspii":true,"logging":24, "privacyurl":"https://example.com/commitment-to-privacy/", "sharedata":{"sharepartners":false},"transferdata":false, "useridentity":24},"server":{"adn":["example.com"]}} The JWS protected Header value used for the first signature is same as that used in the example in Appendix A. The X.509 private key used for generating the first signature is same as that used in the example in Appendix A.1. The JWS Protected Header value used for the second signature is: { "alg":"ES384", "typ":"pat", "x5u":"https://cert.audit-example.com/pat.cer" } The complete JWS JSON Serialization for these values is as follows (with line breaks within values for display purposes only): Reddy, et al. Expires April 5, 2020 [Page 22] Internet-Draft Asserted DNS server privacy policy October 2019 { "payload": "eyJhdWRpdHVybCI6Imh0dHBzOi8vYXVkaXQtZXhhbXBsZS5jb20vcHJpdmFjeWF 1ZGl0IiwiZXhwIjoxNDQzNjQwMzQ1LCJpYXQiOjE0NDMyMDgzNDUsInByaXZpbmZ vIjp7ImlwYWRkcmVzc3BpaSI6dHJ1ZSwibG9nZ2luZyI6MjQsInByaXZhY3l1cmw iOiJodHRwczovL2V4YW1wbGUuY29tL2NvbW1pdG1lbnQtdG8tcHJpdmFjeS8iLCJ zaGFyZWRhdGEiOnsic2hhcmVwYXJ0bmVycyI6ZmFsc2V9LCJ0cmFuc2ZlcmRhdGE iOmZhbHNlLCJ1c2VyaWRlbnRpdHkiOjI0fSwic2VydmVyIjp7ImFkbiI6WyJleGF tcGxlLmNvbSJdfX0", "signatures":[ {"protected":"eyJhbGciOiJFUzI1NiIsInR5cCI6InBhdCIsIng1dSI6Imh0dHB zOi8vY2VydC5leGFtcGxlLmNvbS9wYXQuY2VyIn0", "signature": "VeX23b4UNTRE358iXJGBnSnMXkIfrEYeZwA8aVKA1In-Nz5lpGVFXIjArnUY7T D9vMR01jUzTy4qVbtA0smbUA"}, {"protected":"eyJhbGciOiJFUzM4NCIsInR5cCI6InBhdCIsIng1dSI6Imh0dHB zOi8vY2VydC5hdWRpdC1leGFtcGxlLmNvbS9wYXQuY2VyIn0", "signature": "PKLgW0O3YZAv5ZlIMbQqOgCegAT_TUo6fshOuuGrPqBSYRgIb2ApfvCENzdp-f rKQEVUTWj2odSzMaEKBkjIv49GdEEvAxIy6C5uNzugfsGZswu7gyY8-9mZ_OFV -nWF"}] } B.1. X.509 Private Key in PKCS#8 format for E384 Example** -----BEGIN PRIVATE KEY----- MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgevZzL1gdAFr88hb2 OF/2NxApJCzGCEDdfSp6VQO30hyhRANCAAQRWz+jn65BtOMvdyHKcvjBeBSDZH2r 1RTwjmYSi9R/zpBnuQ4EiMnCqfMPWiZqB4QdbAd0E7oH50VpuZ1P087G -----END PRIVATE KEY----- B.2. X.509 Public Key for ES384 Example** -----BEGIN PUBLIC KEY----- MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEEVs/o5+uQbTjL3chynL4wXgUg2R9 q9UU8I5mEovUf86QZ7kOBIjJwqnzD1omageEHWwHdBO6B+dFabmdT9POxg== -----END PUBLIC KEY----- Authors' Addresses Tirumaleswar Reddy McAfee, Inc. Embassy Golf Link Business Park Bangalore, Karnataka 560071 India Email: kondtir@gmail.com Reddy, et al. Expires April 5, 2020 [Page 23] Internet-Draft Asserted DNS server privacy policy October 2019 Dan Wing Citrix Systems, Inc. USA Email: dwing-ietf@fuggles.com Michael C. Richardson Sandelman Software Works USA Email: mcr+ietf@sandelman.ca Reddy, et al. Expires April 5, 2020 [Page 24]