--- 1/draft-ietf-tokbind-ttrp-00.txt 2017-08-02 11:13:12.010846995 -0700 +++ 2/draft-ietf-tokbind-ttrp-01.txt 2017-08-02 11:13:12.034847573 -0700 @@ -1,18 +1,18 @@ Internet Engineering Task Force B. Campbell Internet-Draft Ping Identity -Intended status: Standards Track July 21, 2017 -Expires: January 22, 2018 +Intended status: Standards Track August 2, 2017 +Expires: February 3, 2018 HTTPS Token Binding with TLS Terminating Reverse Proxies - draft-ietf-tokbind-ttrp-00 + draft-ietf-tokbind-ttrp-01 Abstract This document defines common HTTP header fields that enable a TLS terminating reverse proxy to convey information about the validated Token Binding Message sent by the client to a backend server, which enables that backend server to bind, or verify the binding of, cookies and other security tokens to the client's Token Binding key. Status of This Memo @@ -23,21 +23,21 @@ Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at http://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." - This Internet-Draft will expire on January 22, 2018. + This Internet-Draft will expire on February 3, 2018. Copyright Notice Copyright (c) 2017 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents @@ -57,22 +57,21 @@ 2.3. Examples . . . . . . . . . . . . . . . . . . . . . . . . 5 2.3.1. Provided Token Binding ID . . . . . . . . . . . . . . 5 2.3.2. Provided and Referred Token Binding IDs . . . . . . . 6 3. Security Considerations . . . . . . . . . . . . . . . . . . . 6 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 4.1. HTTP Message Header Field Names Registration . . . . . . 7 5. References . . . . . . . . . . . . . . . . . . . . . . . . . 8 5.1. Normative References . . . . . . . . . . . . . . . . . . 8 5.2. Informative References . . . . . . . . . . . . . . . . . 9 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 9 - Appendix B. Open Issues . . . . . . . . . . . . . . . . . . . . 9 - Appendix C. Document History . . . . . . . . . . . . . . . . . . 10 + Appendix B. Document History . . . . . . . . . . . . . . . . . . 9 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 10 1. Introduction Token Binding over HTTP [I-D.ietf-tokbind-https] provides a mechanism that enables HTTP servers to cryptographically bind cookies and other security tokens to a key held by the browser or other HTTP client, possession of which is proven on the TLS [RFC5246] connections over which the tokens are used. When Token Binding is negotiated in the TLS handshake [I-D.ietf-tokbind-negotiation] the client sends an @@ -101,21 +101,21 @@ Token Binding facilitates a binding of security tokens to a key held by the client by way of the TLS connection between that client and the server. In a deployment where TLS is terminated by a reverse proxy, however, the TLS connection is between the client and the proxy while the backend server is likely the system that will issue cookies or other security tokens. Additional steps are therefore needed to enable the use of Token Binding in such deployment architectures. In the absence of a standardized approach, different implementations will address it differently, which will make - interoperability between implementation difficult or impossible + interoperability between such implementations difficult or impossible without complex configurations or custom integrations. This document standardizes HTTP header field names that a TLS terminating reverse proxy (TTRP) adds to requests that it sends to the backend servers. The headers contain the information from the validated Token Binding Message sent by the client to the proxy with the "Sec-Token-Binding" header, thus enabling the backend server to bind, or verify the binding of, cookies and other security tokens to the client's Token Binding key. The usage of the headers, both the reverse proxy adding it and the application server using them to bind @@ -132,25 +132,26 @@ 2. HTTP Header Fields and Processing Rules 2.1. Token Binding ID HTTP Header Fields The Token Binding Protocol [I-D.ietf-tokbind-protocol] recommends that implementations make Token Binding IDs available to the application as opaque byte sequences, enabling those applications to use the Token Binding IDs when generating and verifying bound tokens. In the context of a TLS terminating reverse proxy (TTRP) deployment, the provided and referred Token Binding IDs are made available to the - backend application as the "Provided-Token-Binding-ID" and "Referred- - Token-Binding-ID" HTTP headers respectively. The value of both - headers is an "EncodedTokenBindingID", for which the ABNF [RFC5234] - syntax is shown in Figure 1 below. "EncodedTokenBindingID" is a - single HTTP header field-value as defined in Section 3.2 of + backend application as the "Sec-Provided-Token-Binding-ID" and "Sec- + Referred-Token-Binding-ID" HTTP headers respectively. The value of + both headers is an "EncodedTokenBindingID", for which the ABNF + [RFC5234] syntax is shown in Figure 1 below. "EncodedTokenBindingID" + is a single HTTP header field-value as defined in Section 3.2 of + [RFC7230], which MUST NOT have a list of values or occur multiple times in a request. An "EncodedTokenBindingID" is only for use in HTTP requests and MUST NOT to be used in HTTP responses. EncodedTokenBindingID = *( DIGIT / ALPHA / "-" / "_" ) DIGIT = ALPHA = Figure 1: Encoded Token Binding ID Header ABNF @@ -179,42 +180,45 @@ [I-D.ietf-tokbind-https] for each HTTP request on the underlying TLS connection. Requests with a valid Token Binding Message (and meeting any other authorization or policy requirements of the TTRP) are dispatched to the backend server with the following modifications. 1. The "Sec-Token-Binding" header in the original incoming request MUST be removed from the request that is dispatched to the backend server. 2. The Token Binding ID of the provided Token Binding of the Token - Binding Message MUST be placed in the "Provided-Token-Binding-ID" - header field of the dispatched request using the format defined - in Section 2.1. + Binding Message MUST be placed in the "Sec-Provided-Token- + Binding-ID" header field of the dispatched request using the + format defined in Section 2.1. 3. If the Token Binding Message contains a referred Token Binding, - the referred Token Binding ID MUST be placed in the "Referred- - Token-Binding-ID" header field of the dispatched request using - the format defined in Section 2.1. Otherwise, the "Referred- - Token-Binding-ID" header field MUST NOT be present in the - dispatched request. + the referred Token Binding ID MUST be placed in the "Sec- + Referred-Token-Binding-ID" header field of the dispatched request + using the format defined in Section 2.1. Otherwise, the "Sec- + Referred-Token-Binding-ID" header field MUST NOT be present in + the dispatched request. - 4. Any occurrence of the "Provided-Token-Binding-ID" or "Referred- - Token-Binding-ID" header in the original incoming request MUST be - removed or overwritten before forwarding the request. + 4. Any occurrence of the "Sec-Provided-Token-Binding-ID" or "Sec- + Referred-Token-Binding-ID" header in the original incoming + request MUST be removed or overwritten before forwarding the + request. Requests made over a TLS connection where the use of Token Binding was not negotiated MUST be sanitized by removing any occurrences of - the "Provided-Token-Binding-ID" and "Referred-Token-Binding-ID" - header fields prior to dispatching the request to the backend server. + the "Sec-Provided-Token-Binding-ID" and "Sec-Referred-Token-Binding- + ID" header fields prior to dispatching the request to the backend + server. - Forward proxies and other intermediaries MUST NOT add the "Provided- - Token-Binding-ID" or "Referred-Token-Binding-ID" header to requests. + Forward proxies and other intermediaries MUST NOT add the "Sec- + Provided-Token-Binding-ID" or "Sec-Referred-Token-Binding-ID" header + to requests. 2.3. Examples Extra line breaks and whitespace have been added to the following examples for display and formatting purposes only. 2.3.1. Provided Token Binding ID The following "Sec-Token-Binding" header is from an HTTP request made over a TLS connection between the client and the TTRP where the use @@ -226,26 +230,26 @@ the server. Sec-Token-Binding: AIkAAgBBQKzyIrmcY_YCtHVoSHBut69vrGfFdy1_YKTZfFJv 6BjrZsKD9b9FRzSBxDs1twTqnAS71M1RBumuihhI9xqxXKkAQEtxe4jeUJU0WezxlQ XWVSBFeHxFMdXRBIH_LKOSAuSMOJ0XEw1Q8DE248qkOiRKzw3KdSNYukYEPmO21bQi 3YYAAA Figure 2: Header in HTTP Request to TTRP After validating the Token Binding Message, the TTRP removes the - "Sec-Token-Binding" header and adds the following "Provided-Token- - Binding-ID" header with the provided Token Binding ID to the request - that is dispatched to the backend server. + "Sec-Token-Binding" header and adds the following "Sec-Provided- + Token-Binding-ID" header with the provided Token Binding ID to the + request that is dispatched to the backend server. - Provided-Token-Binding-ID: AgBBQKzyIrmcY_YCtHVoSHBut69vrGfFdy1_YKTZ - fFJv6BjrZsKD9b9FRzSBxDs1twTqnAS71M1RBumuihhI9xqxXKk + Sec-Provided-Token-Binding-ID: AgBBQKzyIrmcY_YCtHVoSHBut69vrGfFdy1_ + YKTZfFJv6BjrZsKD9b9FRzSBxDs1twTqnAS71M1RBumuihhI9xqxXKk Figure 3: Header in HTTP Request to Backend Server 2.3.2. Provided and Referred Token Binding IDs The following "Sec-Token-Binding" header is from an HTTP request made over a TLS connection between the client and the TTRP where the use of Token Binding has been negotiated (The base64url-encoded representation of the exported keying material, which can be used to validate the Token Binding Message, for that connection is @@ -257,51 +261,48 @@ Sec-Token-Binding: ARIAAgBBQCfsI1D1sTq5mvT_2H_dihNIvuHJCHGjHPJchPav NbGrOo26-2JgT_IsbvZd4daDFbirYBIwJ-TK1rh8FzrC-psAQMyYIqXj7djGPev1dk jV9XxLYGCyqOrBVEtBHrMUCeo22ymLg3OiFcl_fmOPxJbjxI6lKcF0lyfy-dSQmPIe zQ0AAAECAEFArPIiuZxj9gK0dWhIcG63r2-sZ8V3LX9gpNl8Um_oGOtmwoP1v0VHNI HEOzW3BOqcBLvUzVEG6a6KGEj3GrFcqQBAHQm0pzgUTXKLRamuKE1pmmP9I3UBVpoe 1DBCe9H2l1VPpsImakUa6crAqZ-0CGBmji7bYzQogpKcyxTTFk5zdwAA Figure 4: Header in HTTP Request to TTRP After validating the Token Binding Message, the TTRP removes the - "Sec-Token-Binding" header and adds the following "Provided-Token- - Binding-ID" and "Referred-Token-Binding-ID" headers, with the - provided and referred Token Binding IDs respectively, to the request - that is dispatched to the backend server. + "Sec-Token-Binding" header and adds the following "Sec-Provided- + Token-Binding-ID" and "Sec-Referred-Token-Binding-ID" headers, with + the provided and referred Token Binding IDs respectively, to the + request that is dispatched to the backend server. - Provided-Token-Binding-ID: AgBBQCfsI1D1sTq5mvT_2H_dihNIvuHJCHGjHPJc - hPavNbGrOo26-2JgT_IsbvZd4daDFbirYBIwJ-TK1rh8FzrC-ps - Referred-Token-Binding-ID: AgBBQKzyIrmcY_YCtHVoSHBut69vrGfFdy1_YKTZ - fFJv6BjrZsKD9b9FRzSBxDs1twTqnAS71M1RBumuihhI9xqxXKk + Sec-Provided-Token-Binding-ID: AgBBQCfsI1D1sTq5mvT_2H_dihNIvuHJCHGj + HPJchPavNbGrOo26-2JgT_IsbvZd4daDFbirYBIwJ-TK1rh8FzrC-ps + Sec-Referred-Token-Binding-ID: AgBBQKzyIrmcY_YCtHVoSHBut69vrGfFdy1_ + YKTZfFJv6BjrZsKD9b9FRzSBxDs1twTqnAS71M1RBumuihhI9xqxXKk Figure 5: Headers in HTTP Request to Backend Server 3. Security Considerations The headers described herein enable a reverse proxy and backend server to function together as though they are single logical server side deployment of HTTPS Token Binding. Use of the headers outside that intended use case, however, may undermine the protections afforded by Token Binding. Therefore steps MUST be taken to prevent unintended use, both in sending the headers and in relying on their value. Producing and consuming the headers SHOULD be a configurable option, respectively, in a reverse proxy and backend server (or individual application in that server). The default configuration for both should be to not use the headers thus requiring an "opt-in" to the functionality. - Reverse proxies SHOULD only add the headers to requests that are - forwarded to trusted backend servers. - Backend servers MUST only accept the headers from trusted reverse proxies. And reverse proxies MUST sanitize the incoming request before forwarding it on by removing or overwriting any existing instances of the headers. Otherwise arbitrary clients can control the header values as seen and used by the backend server. The communication between a reverse proxy and backend server needs to be secured against eavesdropping and modification by unintended parties. @@ -310,35 +311,40 @@ be met in a number of ways, which will vary based on specific deployments. The communication between a reverse proxy and backend server, for example, might be over a mutually authenticated TLS with the insertion and consumption headers occurring only on that connection. Alternatively the network topology might dictate a private network such that the backend application is only able to accept requests from the reverse proxy and the proxy can only make requests to that server. Other deployments that meet the requirements set forth herein are also possible. + Employing the "Sec-" header field prefix for the headers defined + herein denotes them as forbidden header names (see [fetch-spec]), + which means they cannot be set or modified programmatically by script + running in-browser. + 4. IANA Considerations 4.1. HTTP Message Header Field Names Registration This document specifies the following new HTTP header fields, registration of which is requested in the "Permanent Message Header Field Names" registry defined in [RFC3864]. - o Header Field Name: "Provided-Token-Binding-ID" + o Header Field Name: "Sec-Provided-Token-Binding-ID" o Applicable protocol: HTTP o Status: standard o Author/change Controller: IETF o Specification Document(s): [[ this specification ]] - o Header Field Name: "Referred-Token-Binding-ID" + o Header Field Name: "Sec-Referred-Token-Binding-ID" o Applicable protocol: HTTP o Status: standard o Author/change Controller: IETF o Specification Document(s): [[ this specification ]] 5. References 5.1. Normative References [I-D.ietf-tokbind-https] @@ -380,62 +386,53 @@ Layer Security (TLS)", RFC 5705, DOI 10.17487/RFC5705, March 2010, . [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing", RFC 7230, DOI 10.17487/RFC7230, June 2014, . 5.2. Informative References + [fetch-spec] + WhatWG, "Fetch", Living Standard , + . + [RFC3864] Klyne, G., Nottingham, M., and J. Mogul, "Registration Procedures for Message Header Fields", BCP 90, RFC 3864, DOI 10.17487/RFC3864, September 2004, . Appendix A. Acknowledgements The author would like to thank the following people for their various contributions to the specification: Vinod Anupam, Dirk Balfanz, John - Bradley, Jeff Hodges, Subodh Iyengar, Leif Johansson, Yoav Nir, - Andrei Popov, Eric Rescorla, Piotr Sikora, Martin Thomson, Hans - Zandbelt and others (please let me know, if you've contributed and - I've forgotten you). + Bradley, Nick Harper, Jeff Hodges, Subodh Iyengar, Leif Johansson, + Yoav Nir, Andrei Popov, Eric Rescorla, Piotr Sikora, Martin Thomson, + Hans Zandbelt and others (please let me know, if you've contributed + and I've forgotten you). -Appendix B. Open Issues +Appendix B. Document History - o During discussions at a side meeting in Chicago (IETF 98) there - seemed to be general support for having the TTRP rename the "Sec- - Token-Binding" header to something else and pass the full original - EncodedTokenBindingMessage to the backend server via a different - header (maybe "TTRP-Token-Binding" or something) in addition to - the "Provided-Token-Binding-ID" and if applicable the "Referred- - Token-Binding-ID" headers defined herein. The idea was largely - that the backend server "might need it for something" so pass the - whole thing along just in case. However, as I sat down to write - this draft, I couldn't bring myself to add it in the main text. - On thinking about it more, it feels inefficient/duplicative and - rather inelegant. And without the EKM, much of the data not - already made available via the Token Binding IDs is meaningless - (e.g. the signature value). Data in TokenBinding.extensions, if - extensions are present, might be useful to the backend server. - But might also only be useful/meaningful at the TTRP where the - initial TLS connection is terminated. I really don't know. - Perhaps any extensions, if present, should be passed to the - backend via different header(s)? Or maybe it would be more - appropriate to not attempt to cover TokenBinding.extensions in - this document and defer to the definition of individual extensions - to say how/if they are to be handled in a TTRP type deployment? + [[ to be removed by the RFC Editor before publication as an RFC ]] -Appendix C. Document History + draft-ietf-tokbind-ttrp-01 - [[ to be removed by the RFC Editor before publication as an RFC ]] + o Prefix the header names with "Sec-" so that they are denoted as + forbidden header names by Fetch https://fetch.spec.whatwg.org/ + + o Removed potentially confusing sentence from Security + Considerations per + https://mailarchive.ietf.org/arch/msg/unbearable/ + O0IpppyyEqMrQjEkyEi8p8CeBGA + + o Editorial fixes. draft-ietf-tokbind-ttrp-00 o Initial WG draft from draft-campbell-tokbind-ttrp. draft-campbell-tokbind-ttrp-01 o Minor editorial fixes. o Add to the Acknowledgements.