HTTP Proxy-Status Parameter for Next-Hop AliasesApple, Inc.tpauly@apple.com
Applications and Real-Time
HTTPproxy statusThis document defines an HTTP Proxy-Status Parameter that contains a list of aliases and canonical names received over DNS when establishing a connection to the next hop.Status information for this document may be found at .Discussion of this document takes place on the HTTP Working Group mailing list (), which is archived at . Working Group information can be found at .Source for this draft and an issue tracker can be found at .IntroductionThe Proxy-Status HTTP response field allows proxies to convey information about how a proxied request was handled in HTTP responses sent to clients. It defines a set of parameters that provide information, such as the name of the next hop. defines a next-hop parameter, which can contain a hostname, IP address, or alias of the next hop. This parameter can contain only one such item, so it cannot be used to communicate a chain of aliases encountered during DNS resolution when connecting to the next hop.Knowing the full chain of names that were used during DNS resolution via CNAME records is particularly useful for clients of forward proxies, in which the client is requesting to connect to a specific target hostname using the CONNECT method or UDP proxying . CNAME records can be used to "cloak" hosts that perform tracking or malicious activity behind more innocuous hostnames, and clients such as web browsers use the chain of DNS names to influence behavior like cookie usage policies or blocking of malicious hosts.This document allows clients to receive the CNAME chain of DNS names for the next hop by including the list of names in a new next-hop-aliases Proxy-Status parameter.RequirementsThe 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 when, and only when, they appear in all capitals, as shown here.next-hop-aliases ParameterThe next-hop-aliases parameter's value is a String that contains one or more DNS names in a comma-separated list. The items in the list include all alias names an canonical names received in CNAME records during the course of resolving the next hop's hostname using DNS, not including the original requested hostname itself. The names SHOULD appear in the order in which they were received in DNS. If there are multiple CNAME records in the chain, the first name in the next-hop-aliases list would be the value in the CNAME record for the original hostname, and the final name in the next-hop-aliases list would be the name that ultimately resolved to one or more addresses.The list of DNS names in next-hop-aliases use a comma (",") as a separator between names. DNS names normally just contain alphanumeric characters and hyphens ("-"), although they are allowed to contain any character , including a comma. To prevent commas or other special characters in names leading to incorrect parsing, any characters that appear in names in this list that do not belong to the set of URI Unreserved Characters MUST be percent-encoded as defined in .For example, consider a proxy "proxy.example.net" that receives the following records when performing DNS resolution for the next hop "host.example.com":The proxy could include the following proxy status in its response:This indicates that proxy.example.net, which used the IP address "2001:db8::1" as the next hop for this request, encountered the names "tracker.example.com" and "service1.example-cdn.com" in the DNS resolution chain. Note that while this example includes both the next-hop and next-hop-aliases parameters, next-hop-aliases can be included without including next-hop.The next-hop-aliases parameter only applies when DNS was used to resolve the next hop's name, and does not apply in all situations. Clients can use the information in this parameter to determine how to use the connection established through the proxy, but need to gracefully handle situations in which this parameter is not present.The proxy MAY send the empty string ("") as the value of next-hop-aliases to indicate that no CNAME records were encountered when resolving the next hop's name.Implementation ConsiderationsIn order to include the next-hop-aliases parameter, a proxy needs to have access to the chain of alias names and canonical names received in CNAME records.Implementations ought to note that the full chain of names might not available in common DNS resolution APIs, such as getaddrinfo. getaddrinfo does have an option for AI_CANONNAME, but this will only return the last name in the chain (the canonical name), not the alias names.An implementation MAY include incomplete information in the next-hop-aliases parameter to accommodate cases where it is unable to include the full chain, such as only including the canonical name if the implementation can only use getaddrinfo as described above.Security ConsiderationsThe next-hop-aliases parameter does not include any DNSSEC information or imply that DNSSEC was used. The information included in the parameter can only be trusted to be valid insofar as the client trusts its proxy to provide accurate information. This information is intended to be used as a hint, and SHOULD NOT be used for making security decisions about the identity of a resource accessed through the proxy.IANA ConsiderationsThis document registers the "next-hop-aliases" parameter in the "HTTP Proxy-Status Parameters" registry <>.
Name:
next-hop-aliases
Description:
A string containing one or more DNS aliases or canonical names used to establish a proxied connection to the next hop.
Reference:
This document
The Proxy-Status HTTP Response Header FieldDomain names - concepts and facilitiesHTTP SemanticsProxying UDP in HTTPKey words for use in RFCs to Indicate Requirement LevelsAmbiguity of Uppercase vs Lowercase in RFC 2119 Key WordsStructured Field Values for HTTPUniform Resource Identifier (URI): Generic SyntaxHTTP State Management MechanismDomain names - implementation and specification