--- 1/draft-ietf-tokbind-ttrp-01.txt 2018-01-29 16:13:10.841077967 -0800 +++ 2/draft-ietf-tokbind-ttrp-02.txt 2018-01-29 16:13:10.869078634 -0800 @@ -1,78 +1,79 @@ Internet Engineering Task Force B. Campbell Internet-Draft Ping Identity -Intended status: Standards Track August 2, 2017 -Expires: February 3, 2018 +Intended status: Standards Track January 29, 2018 +Expires: August 2, 2018 HTTPS Token Binding with TLS Terminating Reverse Proxies - draft-ietf-tokbind-ttrp-01 + draft-ietf-tokbind-ttrp-02 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 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 http://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 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 February 3, 2018. + This Internet-Draft will expire on August 2, 2018. Copyright Notice - Copyright (c) 2017 IETF Trust and the persons identified as the + Copyright (c) 2018 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 + (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 . . . . . . . . . . . . . . . . . . . . . . . . 2 1.1. Requirements Notation and Conventions . . . . . . . . . . 3 2. HTTP Header Fields and Processing Rules . . . . . . . . . . . 3 - 2.1. Token Binding ID HTTP Header Fields . . . . . . . . . . . 3 - 2.2. Processing Rules . . . . . . . . . . . . . . . . . . . . 4 - 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 + 2.1. Encoding . . . . . . . . . . . . . . . . . . . . . . . . 3 + 2.2. Token Binding ID HTTP Header Fields . . . . . . . . . . . 4 + 2.3. Processing Rules . . . . . . . . . . . . . . . . . . . . 4 + 2.4. Examples . . . . . . . . . . . . . . . . . . . . . . . . 5 + 2.4.1. Provided Token Binding ID . . . . . . . . . . . . . . 6 + 2.4.2. Provided and Referred Token Binding IDs . . . . . . . 6 + 3. Security Considerations . . . . . . . . . . . . . . . . . . . 7 + 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 + 4.1. HTTP Message Header Field Names Registration . . . . . . 8 5. References . . . . . . . . . . . . . . . . . . . . . . . . . 8 5.1. Normative References . . . . . . . . . . . . . . . . . . 8 5.2. Informative References . . . . . . . . . . . . . . . . . 9 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 9 - Appendix B. Document History . . . . . . . . . . . . . . . . . . 9 - Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 10 + Appendix B. Document History . . . . . . . . . . . . . . . . . . 10 + Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 11 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 encoded Token Binding Message [I-D.ietf-tokbind-protocol] as a header @@ -119,113 +119,128 @@ 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 cookies or other tokens, are to be configuration options of the respective systems as they will not always be applicable. 1.1. Requirements Notation and Conventions 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 RFC - 2119 [RFC2119]. + "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. 2. HTTP Header Fields and Processing Rules -2.1. Token Binding ID HTTP Header Fields +2.1. Encoding - 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 "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 + The field-values of the HTTP headers defined herein utilize the + following encoded forms. - [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. + A Token Binding ID is represented as an "EncodedTokenBindingID", for + which the ABNF [RFC5234] syntax is shown in Figure 1 below. EncodedTokenBindingID = *( DIGIT / ALPHA / "-" / "_" ) DIGIT = ALPHA = Figure 1: Encoded Token Binding ID Header ABNF The value of an "EncodedTokenBindingID" is a base64url encoding of the TokenBindingID byte sequence (see section 3 of [I-D.ietf-tokbind-protocol]) using the URL and filename safe alphabet described in Section 5 of [RFC4648], with all trailing pad characters '=' omitted and without the inclusion of any line breaks, whitespace, or other additional characters. -2.2. Processing Rules +2.2. 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 TTRP makes the Token Binding ID(s) available to the backend + application, when applicable, with the following header fields. + + Sec-Provided-Token-Binding-ID + The Token Binding ID of the provided Token Binding represented as + an "EncodedTokenBindingID" as defined in Section 2.1. + + Sec-Referred-Token-Binding-ID + The Token Binding ID of the referred Token Binding represented as + an "EncodedTokenBindingID" as defined in Section 2.1. + + Both "Sec-Provided-Token-Binding-ID" and "Sec-Referred-Token-Binding- + ID" are single HTTP header field-valued 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. + +2.3. Processing Rules This section defines the applicable processing rules for a TLS terminating reverse proxy (TTRP) and backend server(s) to provide server side support of Token Binding over HTTP [I-D.ietf-tokbind-https] using the HTTP headers described in - Section 2.1. Use of the technique is to be a configuration or + Section 2.2. Use of the technique is to be a configuration or deployments option and the processing rules described herein are for servers operating with that option enabled. A TTRP negotiates the use of Token Binding with the client per [I-D.ietf-tokbind-negotiation] and validates the Token Binding Message as defined in The Token Binding Protocol [I-D.ietf-tokbind-protocol] and Token Binding over HTTP [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 "Sec-Provided-Token- Binding-ID" header field of the dispatched request using the - format defined in Section 2.1. + format defined in Section 2.2. 3. If the Token Binding Message contains a referred Token Binding, 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- + using the format defined in Section 2.2. Otherwise, the "Sec- Referred-Token-Binding-ID" header field MUST NOT be present in the dispatched 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 "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 "Sec- Provided-Token-Binding-ID" or "Sec-Referred-Token-Binding-ID" header to requests. -2.3. Examples +2.4. 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 +2.4.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 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 "AYVUayPTP9RmELNpGjFl6Ykm2CUx7pUMxe35yb11dgU"). The encoded Token Binding Message has the provided Token Binding the client uses with the server. @@ -239,21 +254,21 @@ After validating the Token Binding Message, the TTRP removes the "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. 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 +2.4.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 "wEWWCP1KPxfq-QL4NxYII_P4ti_9YYqrTpGs28BZEqE"). The encoded Token Binding Message has the provided Token Binding the client uses with the server as well as the referred Token Binding that it uses with a different server. @@ -341,87 +356,104 @@ 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] - Popov, A., Nystrom, M., Balfanz, D., Langley, A., and J. - Hodges, "Token Binding over HTTP", draft-ietf-tokbind- - https-09 (work in progress), April 2017. + Popov, A., Nystrom, M., Balfanz, D., Langley, A., Harper, + N., and J. Hodges, "Token Binding over HTTP", draft-ietf- + tokbind-https-12 (work in progress), January 2018. [I-D.ietf-tokbind-negotiation] Popov, A., Nystrom, M., Balfanz, D., and A. Langley, "Transport Layer Security (TLS) Extension for Token Binding Protocol Negotiation", draft-ietf-tokbind- - negotiation-08 (work in progress), April 2017. + negotiation-10 (work in progress), October 2017. [I-D.ietf-tokbind-protocol] Popov, A., Nystrom, M., Balfanz, D., Langley, A., and J. Hodges, "The Token Binding Protocol Version 1.0", draft- - ietf-tokbind-protocol-14 (work in progress), April 2017. + ietf-tokbind-protocol-16 (work in progress), October 2017. [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, - . + . [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data Encodings", RFC 4648, DOI 10.17487/RFC4648, October 2006, - . + . [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", STD 68, RFC 5234, DOI 10.17487/RFC5234, January 2008, - . + . [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security (TLS) Protocol Version 1.2", RFC 5246, DOI 10.17487/RFC5246, August 2008, - . + . [RFC5705] Rescorla, E., "Keying Material Exporters for Transport Layer Security (TLS)", RFC 5705, DOI 10.17487/RFC5705, - March 2010, . + 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, - . + . + + [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC + 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, + May 2017, . 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, 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). + Bradley, William Denniss, 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. Document History [[ to be removed by the RFC Editor before publication as an RFC ]] + draft-ietf-tokbind-ttrp-02 + + o Add to the Acknowledgements. + + o Update references for Token Binding negotiation, protocol, and + https. + + o Use the boilerplate from RFC 8174. + + o Reformat the "HTTP Header Fields and Processing Rules" section to + make the header names more prominent and move the encoding + definitions earlier. + draft-ietf-tokbind-ttrp-01 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