draft-ietf-tokbind-https-15.txt   draft-ietf-tokbind-https-16.txt 
Internet Engineering Task Force A. Popov Internet Engineering Task Force A. Popov
Internet-Draft M. Nystroem Internet-Draft M. Nystroem
Intended status: Standards Track Microsoft Corp. Intended status: Standards Track Microsoft Corp.
Expires: November 10, 2018 D. Balfanz, Ed. Expires: December 5, 2018 D. Balfanz, Ed.
A. Langley A. Langley
N. Harper N. Harper
Google Inc. Google Inc.
J. Hodges J. Hodges
PayPal PayPal
May 9, 2018 June 3, 2018
Token Binding over HTTP Token Binding over HTTP
draft-ietf-tokbind-https-15 draft-ietf-tokbind-https-16
Abstract Abstract
This document describes a collection of mechanisms that allow HTTP This document describes a collection of mechanisms that allow HTTP
servers to cryptographically bind security tokens (such as cookies servers to cryptographically bind security tokens (such as cookies
and OAuth tokens) to TLS connections. and OAuth tokens) to TLS connections.
We describe both first-party and federated scenarios. In a first- We describe both first-party and federated scenarios. In a first-
party scenario, an HTTP server is able to cryptographically bind the party scenario, an HTTP server is able to cryptographically bind the
security tokens it issues to a client, and which the client security tokens it issues to a client, and which the client
skipping to change at page 2, line 7 skipping to change at page 2, line 7
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 November 10, 2018. This Internet-Draft will expire on December 5, 2018.
Copyright Notice Copyright Notice
Copyright (c) 2018 IETF Trust and the persons identified as the Copyright (c) 2018 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
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1. Requirements Language . . . . . . . . . . . . . . . . . . 4 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 3
2. The Sec-Token-Binding HTTP Request Header Field . . . . . . . 4 2. The Sec-Token-Binding HTTP Request Header Field . . . . . . . 4
2.1. HTTPS Token Binding Key Pair Scoping . . . . . . . . . . 5 2.1. HTTPS Token Binding Key Pair Scoping . . . . . . . . . . 5
3. TLS Renegotiation . . . . . . . . . . . . . . . . . . . . . . 6 3. TLS Renegotiation . . . . . . . . . . . . . . . . . . . . . . 6
4. First-Party Use Cases . . . . . . . . . . . . . . . . . . . . 6 4. First-Party Use Cases . . . . . . . . . . . . . . . . . . . . 6
5. Federation Use Cases . . . . . . . . . . . . . . . . . . . . 7 5. Federation Use Cases . . . . . . . . . . . . . . . . . . . . 7
5.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 7 5.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 7
5.2. Overview . . . . . . . . . . . . . . . . . . . . . . . . 8 5.2. Overview . . . . . . . . . . . . . . . . . . . . . . . . 8
5.3. HTTP Redirects . . . . . . . . . . . . . . . . . . . . . 10 5.3. HTTP Redirects . . . . . . . . . . . . . . . . . . . . . 10
5.4. Negotiated Key Parameters . . . . . . . . . . . . . . . . 12 5.4. Negotiated Key Parameters . . . . . . . . . . . . . . . . 12
5.5. Federation Example . . . . . . . . . . . . . . . . . . . 12 5.5. Federation Example . . . . . . . . . . . . . . . . . . . 12
6. Implementation Considerations . . . . . . . . . . . . . . . . 15 6. Implementation Considerations . . . . . . . . . . . . . . . . 15
7. Security Considerations . . . . . . . . . . . . . . . . . . . 15 7. Security Considerations . . . . . . . . . . . . . . . . . . . 15
7.1. Security Token Replay . . . . . . . . . . . . . . . . . . 15 7.1. Security Token Replay . . . . . . . . . . . . . . . . . . 15
7.2. Triple Handshake Vulnerability in TLS 1.2 and Older TLS 7.2. Sensitivity of the Sec-Token-Binding Header . . . . . . . 16
Versions . . . . . . . . . . . . . . . . . . . . . . . . 16 7.3. Securing Federated Sign-On Protocols . . . . . . . . . . 17
7.3. Sensitivity of the Sec-Token-Binding Header . . . . . . . 16
7.4. Securing Federated Sign-On Protocols . . . . . . . . . . 17
8. Privacy Considerations . . . . . . . . . . . . . . . . . . . 19 8. Privacy Considerations . . . . . . . . . . . . . . . . . . . 19
8.1. Scoping of Token Binding Key Pairs . . . . . . . . . . . 19 8.1. Scoping of Token Binding Key Pairs . . . . . . . . . . . 19
8.2. Lifetime of Token Binding Key Pairs . . . . . . . . . . . 20 8.2. Lifetime of Token Binding Key Pairs . . . . . . . . . . . 20
8.3. Correlation . . . . . . . . . . . . . . . . . . . . . . . 20 8.3. Correlation . . . . . . . . . . . . . . . . . . . . . . . 20
9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 21 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 21
10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 22 10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 21
11. References . . . . . . . . . . . . . . . . . . . . . . . . . 22 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 21
11.1. Normative References . . . . . . . . . . . . . . . . . . 22 11.1. Normative References . . . . . . . . . . . . . . . . . . 21
11.2. Informative References . . . . . . . . . . . . . . . . . 23 11.2. Informative References . . . . . . . . . . . . . . . . . 23
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 24 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 24
1. Introduction 1. Introduction
The Token Binding Protocol [I-D.ietf-tokbind-protocol] defines a The Token Binding Protocol [I-D.ietf-tokbind-protocol] defines a
Token Binding ID for a TLS connection between a client and a server. Token Binding ID for a TLS connection between a client and a server.
The Token Binding ID of a TLS connection is constructed using the The Token Binding ID of a TLS connection is constructed using the
public key of a private-public key pair. The client proves public key of a private-public key pair. The client proves
possession of the corresponding private key. This Token Binding key possession of the corresponding private key. This Token Binding key
pair is long-lived. I.e., subsequent TLS connections between the pair is long-lived. I.e., subsequent TLS connections between the
skipping to change at page 4, line 28 skipping to change at page 4, line 22
Binding header field in their HTTP requests, and MUST include only Binding header field in their HTTP requests, and MUST include only
one such header field per HTTP request. Also, The Sec-Token-Binding one such header field per HTTP request. Also, The Sec-Token-Binding
header field MUST NOT be included in HTTP responses. The ABNF of the header field MUST NOT be included in HTTP responses. The ABNF of the
Sec-Token-Binding header field is (in [RFC7230] style, see also Sec-Token-Binding header field is (in [RFC7230] style, see also
Section 8.3 of [RFC7231]): Section 8.3 of [RFC7231]):
Sec-Token-Binding = EncodedTokenBindingMessage Sec-Token-Binding = EncodedTokenBindingMessage
The header field name is Sec-Token-Binding and its single value, The header field name is Sec-Token-Binding and its single value,
EncodedTokenBindingMessage, is a base64url encoding of a single EncodedTokenBindingMessage, is a base64url encoding of a single
TokenBindingMessage, as defined in [I-D.ietf-tokbind-protocol], using TokenBindingMessage, as defined in [I-D.ietf-tokbind-protocol]. The
the URL- and filename-safe character set described in Section 5 of base64url encoding uses the URL- and filename-safe character set
[RFC4648], with all trailing padding characters '=' omitted and described in Section 5 of [RFC4648], with all trailing padding
without the inclusion of any line breaks, whitespace, or other characters '=' omitted and without the inclusion of any line breaks,
additional characters. whitespace, or other additional characters.
For example: For example:
Sec-Token-Binding: AIkAAgBBQFzK4_bhAqLDwRQxqJWte33d7hZ0hZWHwk-miKPg4E\ Sec-Token-Binding: AIkAAgBBQFzK4_bhAqLDwRQxqJWte33d7hZ0hZWHwk-miKPg4E\
9fcgs7gBPoz-9RfuDfN9WCw6keHEw1ZPQMGs9CxpuHm-YAQM_j\ 9fcgs7gBPoz-9RfuDfN9WCw6keHEw1ZPQMGs9CxpuHm-YAQM_j\
aOwwej6a-cQBGU7CJpUHOvXG4VvjNq8jDsvta9Y8_bPEPj25Gg\ aOwwej6a-cQBGU7CJpUHOvXG4VvjNq8jDsvta9Y8_bPEPj25Gg\
mKiPjhJEtZA6mJ_9SNifLvVBTi7fR9wSAAAA mKiPjhJEtZA6mJ_9SNifLvVBTi7fR9wSAAAA
(Note that the backslashes and line breaks are provided to ease
readability, they are not part of the actual encoded message.)
If the server receives more than one Sec-Token-Binding header field If the server receives more than one Sec-Token-Binding header field
in an HTTP request, then the server MUST reject the message with a in an HTTP request, then the server MUST reject the message with a
400 (Bad Request) HTTP status code. Additionally, the Sec-Token- 400 (Bad Request) HTTP status code. Additionally, the Sec-Token-
Binding header field: Binding header field:
SHOULD NOT be stored by origin servers on PUT requests, SHOULD NOT be stored by origin servers on PUT requests,
MAY be listed by a server in a Vary response header field, and, MAY be listed by a server in a Vary response header field, and,
MUST NOT be used in HTTP trailers. MUST NOT be used in HTTP trailers.
skipping to change at page 5, line 21 skipping to change at page 5, line 17
this TokenBinding is called a Provided Token Binding ID. this TokenBinding is called a Provided Token Binding ID.
The TokenBindingMessage MAY also contain exactly one TokenBinding The TokenBindingMessage MAY also contain exactly one TokenBinding
structure with TokenBindingType of referred_token_binding, as structure with TokenBindingType of referred_token_binding, as
specified in Section 5.3. In addition to the latter, or rather than specified in Section 5.3. In addition to the latter, or rather than
the latter, the TokenBindingMessage MAY contain other TokenBinding the latter, the TokenBindingMessage MAY contain other TokenBinding
structures. This is use case-specific, and such use cases are structures. This is use case-specific, and such use cases are
outside the scope of this specification. outside the scope of this specification.
A TokenBindingMessage is validated by the server as described in A TokenBindingMessage is validated by the server as described in
Section 4.2. ("Server Processing Rules") of Section 4.2 ("Server Processing Rules") of
[I-D.ietf-tokbind-protocol]. If validation fails and a Token Binding [I-D.ietf-tokbind-protocol]. If validation fails and a Token Binding
is rejected, any associated bound tokens MUST also be rejected by the is rejected, any associated bound tokens MUST also be rejected by the
server. HTTP requests containing invalid tokens MUST be rejected. server. HTTP requests containing invalid tokens MUST be rejected.
In this case, the server application MAY return HTTP status code 400 In this case, the server application MAY return HTTP status code 400
(Bad Request) or proceed with an application-specific invalid token (Bad Request) or proceed with an application-specific invalid token
response (e.g., directing the client to re-authenticate and present a response (e.g., directing the client to re-authenticate and present a
different token), or terminate the connection. different token), or terminate the connection.
In HTTP/2, the client SHOULD use Header Compression [RFC7541] to In HTTP/2, the client SHOULD use Header Compression [RFC7541] to
avoid the overhead of repeating the same header field in subsequent avoid the overhead of repeating the same header field in subsequent
HTTP requests. HTTP requests.
2.1. HTTPS Token Binding Key Pair Scoping 2.1. HTTPS Token Binding Key Pair Scoping
HTTPS is used in conjunction with various application protocols and HTTPS is used in conjunction with various application protocols and
application contexts, in various ways. For example, general-purpose application contexts, in various ways. For example, general-purpose
Web browsing is one such HTTP-based application context. Within the Web browsing is one such HTTP-based application context. Within that
latter context, HTTP cookies [RFC6265] are typically utilized for context, HTTP cookies [RFC6265] are typically utilized for state
state management, including client authentication. A related, though management, including client authentication. A related, though
distinct, example of other HTTP-based application contexts is where distinct, example of other HTTP-based application contexts is where
OAuth tokens [RFC6749] are utilized to manage authorization for OAuth tokens [RFC6749] are utilized to manage authorization for
third-party application access to resources. The token scoping rules third-party application access to resources. The token scoping rules
of these two examples can differ: the scoping rules for cookies are of these two examples can differ: the scoping rules for cookies are
concisely specified in [RFC6265], whereas OAuth is a framework and concisely specified in [RFC6265], whereas OAuth is a framework and
defines various token types with various scopings, some of which are defines various token types with various scopings, some of which are
determined by the encompassing application. determined by the encompassing application.
The scoping of Token Binding key pairs generated by Web browsers for The scoping of Token Binding key pairs generated by Web browsers for
use in first-party and federation use cases defined in this the purpose of binding HTTP cookies MUST be no wider than the
specification (Section 5), and intended for binding HTTP cookies, granularity of a "registered domain" (also known as "effective top-
MUST be no wider than the granularity of "effective top-level domain level domain + 1", or "eTLD+1"). An origin's "registered domain" is
(public suffix) + 1" (eTLD+1). I.e., the scope of Token Binding key the origin's host's public suffix plus the label to its left, with
pairs is no wider than the scope at which cookies can be set (see the term "public suffix" being defined in a note in Section 5.3 of
[RFC6265]), but MAY be more narrow if cookies are scoped more [RFC6265] as "a domain that is controlled by a public registry". For
narrowly. example, for "https://www.example.com", the public suffix (eTLD) is
"com", and the registered domain (eTLD+1) is "example.com". User
agents SHOULD use an up-to-date public suffix list, such as the one
maintained by Mozilla [PSL].
This means that in practice the scope of a Token Binding key pair is
no larger than the scope of a cookie allowed by a Web browser. If a
Web browser restricts cookies to a narrower scope than registered
domains, the scope of Token Binding key pairs MAY also be more
narrow. This applies to the use of Token Binding key pairs in first-
party use cases, as well as in federation use cases defined in this
specification (Section 5).
Key pairs used to bind other application tokens, such as OAuth tokens Key pairs used to bind other application tokens, such as OAuth tokens
or OpenID Connect ID Tokens, SHOULD generally adhere to the above or OpenID Connect ID Tokens, SHOULD adhere to the above eTLD+1
eTLD+1 scoping requirement for those tokens being employed in first- scoping requirement for those tokens being employed in first-party or
party or federation scenarios. Applications other than Web browsers federation scenarios. Applications other than Web browsers MAY use
MAY use different key pair scoping rules. See also Section 8.1, different key pair scoping rules. See also Section 8.1, below.
below.
Scoping rules for other HTTP-based application contexts are outside Scoping rules for other HTTP-based application contexts are outside
the scope of this specification. the scope of this specification.
3. TLS Renegotiation 3. TLS Renegotiation
Token Binding over HTTP/1.1 [RFC7230] can be performed in combination Token Binding over HTTP/1.1 [RFC7230] can be performed in combination
with TLS renegotiation. In this case, renegotiation MUST only occur with TLS renegotiation. In this case, renegotiation MUST only occur
between a client's HTTP request and the server's response, the client between a client's HTTP request and the server's response, the client
MUST NOT send any pipelined requests, and the client MUST NOT MUST NOT send any pipelined requests, and the client MUST NOT
skipping to change at page 7, line 23 skipping to change at page 7, line 26
the client has with a different server. This is, however, a common the client has with a different server. This is, however, a common
requirement in federation scenarios: For example, an Identity requirement in federation scenarios: For example, an Identity
Provider may wish to issue an identity token to a client and Provider may wish to issue an identity token to a client and
cryptographically bind that token to the TLS connection between the cryptographically bind that token to the TLS connection between the
client and a Relying Party. client and a Relying Party.
In this section, we describe mechanisms to achieve this. The common In this section, we describe mechanisms to achieve this. The common
idea among these mechanisms is that a server (called the Token idea among these mechanisms is that a server (called the Token
Consumer in this document) signals to the client that it should Consumer in this document) signals to the client that it should
reveal the Provided Token Binding ID that is used between the client reveal the Provided Token Binding ID that is used between the client
and itself, to another server (called the Token Provider in this and itself to another server (called the Token Provider in this
document). Also common across the mechanisms is how the Token document). Also common across the mechanisms is how the Token
Binding ID is revealed to the Token Provider: The client uses the Binding ID is revealed to the Token Provider: The client uses the
Token Binding Protocol [I-D.ietf-tokbind-protocol], and includes a Token Binding Protocol [I-D.ietf-tokbind-protocol], and includes a
TokenBinding structure in the Sec-Token-Binding HTTP header field TokenBinding structure in the Sec-Token-Binding HTTP header field
defined above. What differs between the various mechanisms is how defined above. What differs between the various mechanisms is how
the Token Consumer signals to the client that it should reveal the the Token Consumer signals to the client that it should reveal the
Token Binding ID to the Token Provider. Below, we specify one such Token Binding ID to the Token Provider. Below, we specify one such
mechanism, which is suitable for redirect-based interactions between mechanism, which is suitable for redirect-based interactions between
Token Consumers and Token Providers. Token Consumers and Token Providers.
skipping to change at page 9, line 38 skipping to change at page 9, line 38
Consumer, thus binding the token to the client's Token Binding key Consumer, thus binding the token to the client's Token Binding key
pair. The client proves possession of the private key when pair. The client proves possession of the private key when
communicating with the Token Consumer through the Token Binding communicating with the Token Consumer through the Token Binding
Protocol [I-D.ietf-tokbind-protocol], and uses the corresponding Protocol [I-D.ietf-tokbind-protocol], and uses the corresponding
public key of this key pair as a component of the Token Binding public key of this key pair as a component of the Token Binding
ID. Comparing the Token Binding ID from the token to the Token ID. Comparing the Token Binding ID from the token to the Token
Binding ID established with the client allows the Token Consumer Binding ID established with the client allows the Token Consumer
to verify that the token was sent to it by the legitimate client. to verify that the token was sent to it by the legitimate client.
o To allow the Token Provider to include the Token Binding ID in the o To allow the Token Provider to include the Token Binding ID in the
token, the Token Binding ID (between client and Token Consumer) token, the Token Binding ID between client and Token Consumer must
must therefore be communicated to the Token Provider along with therefore be communicated to the Token Provider along with the
the token request. Communicating a Token Binding ID involves token request. Communicating a Token Binding ID involves proving
proving possession of a private key and is described in the Token possession of a private key and is described in the Token Binding
Binding Protocol [I-D.ietf-tokbind-protocol]. Protocol [I-D.ietf-tokbind-protocol].
The client will perform this last operation (proving possession of a The client will perform this last operation only if the Token
private key that corresponds to a Token Binding ID between the client Consumer requests the client to do so.
and the Token Consumer while delivering the token request to the
Token Provider) only if the Token Consumer requests the client to do
so.
Below, we specify how Token Consumers can signal this request in Below, we specify how Token Consumers can signal this request in
redirect-based federation protocols. Note that this assumes that the redirect-based federation protocols. Note that this assumes that the
federated sign-on flow starts at the Token Consumer, or at the very federated sign-on flow starts at the Token Consumer, or at the very
least, includes a redirect from the Token Consumer to the Token least, includes a redirect from the Token Consumer to the Token
Provider. It is outside the scope of this document to specify Provider. It is outside the scope of this document to specify
similar mechanisms for flows that do not include such redirects. similar mechanisms for flows that do not include such redirects.
5.3. HTTP Redirects 5.3. HTTP Redirects
skipping to change at page 11, line 5 skipping to change at page 10, line 50
Provider and the Token Consumer fall under the same eTLD+1 and the Provider and the Token Consumer fall under the same eTLD+1 and the
provided and referred token binding IDs are the same. Note that the provided and referred token binding IDs are the same. Note that the
referred token binding is sent only on the request resulting from the referred token binding is sent only on the request resulting from the
redirect and not on any subsequent requests to the Token Provider. redirect and not on any subsequent requests to the Token Provider.
If the Include-Referred-Token-Binding-ID header field is received in If the Include-Referred-Token-Binding-ID header field is received in
response to a request that did not include the Token-Binding header response to a request that did not include the Token-Binding header
field, the client MUST ignore the Include-Referred-Token-Binding-ID field, the client MUST ignore the Include-Referred-Token-Binding-ID
header field. header field.
This header field has only meaning if the HTTP status code is 301, This header field has only meaning if the HTTP status code is a
302, 303, 307 or 308, and MUST be ignored by the client for any other redirection code (300-399), and MUST be ignored by the client for any
status codes. If the client supports the Token Binding Protocol, and other status codes. If the client supports the Token Binding
has negotiated the Token Binding Protocol with both the Token Protocol, and has negotiated the Token Binding Protocol with both the
Consumer and the Token Provider, it already sends the Sec-Token- Token Consumer and the Token Provider, it already sends the Sec-
Binding header field to the Token Provider with each HTTP request (as Token-Binding header field to the Token Provider with each HTTP
described in Section 2 above). request (as described in Section 2 above).
The TokenBindingMessage SHOULD contain a TokenBinding with The TokenBindingMessage included in the redirect request to the Token
TokenBindingType referred_token_binding. If included, this Provider SHOULD contain a TokenBinding with TokenBindingType
TokenBinding MUST be signed with the Token Binding private key used referred_token_binding. If included, this TokenBinding MUST be
by the client for connections between itself and the Token Consumer signed with the Token Binding private key used by the client for
(more specifically, the server that issued the Include-Referred- connections between itself and the Token Consumer (more specifically,
Token-Binding-ID response header field). The Token Binding ID the server that issued the Include-Referred-Token-Binding-ID response
established by this TokenBinding is called a Referred Token Binding header field). The Token Binding ID established by this TokenBinding
ID. is called a Referred Token Binding ID.
As described above, the TokenBindingMessage MUST additionally contain As described above, the TokenBindingMessage MUST additionally contain
a Provided Token Binding ID, i.e., a TokenBinding structure with a Provided Token Binding ID, i.e., a TokenBinding structure with
TokenBindingType of provided_token_binding, which MUST be signed with TokenBindingType of provided_token_binding, which MUST be signed with
the Token Binding private key used by the client for connections the Token Binding private key used by the client for connections
between itself and the Token Provider (more specifically, the server between itself and the Token Provider (more specifically, the server
that the token request is being sent to). that the token request is being sent to).
If, for some deployment-specific reason, the initial Token Provider If, for some deployment-specific reason, the initial Token Provider
("TP1") needs to redirect the client to another Token Provider ("TP1") needs to redirect the client to another Token Provider
skipping to change at page 13, line 11 skipping to change at page 13, line 11
The diagram below shows a typical HTTP Redirect-based Web Browser SSO The diagram below shows a typical HTTP Redirect-based Web Browser SSO
Profile (no artifact, no callbacks), featuring binding of, e.g., a Profile (no artifact, no callbacks), featuring binding of, e.g., a
TLS Token Binding ID into an OpenID Connect ID Token. TLS Token Binding ID into an OpenID Connect ID Token.
Legend: Legend:
+------------+------------------------------------------------------+ +------------+------------------------------------------------------+
| EKM: | TLS Exported Keying Material [RFC5705] | | EKM: | TLS Exported Keying Material [RFC5705] |
| {EKMn}Ksm: | EKM for server "n", signed by private key of TBID | | {EKMn}Ksm: | EKM for server "n", signed by private key of TBID |
| | "m", where "n" must represent server receiving the | | | "m", where "n" must represent server receiving the |
| | ETBMSG, if a conveyed TB's type is | | | ETBMSG. If a conveyed TB's type is |
| | provided_token_binding, then m = n, else if TB's | | | provided_token_binding, then m = n, else if TB's |
| | type is referred_token_binding, then m != n. E.g., | | | type is referred_token_binding, then m != n. E.g., |
| | see step 1b in diagram below. | | | see step 1b in diagram below. |
| ETBMSG: | "Sec-Token-Binding" HTTP header field conveying an | | ETBMSG: | "Sec-Token-Binding" HTTP header field conveying an |
| | EncodedTokenBindingMessage, in turn conveying | | | EncodedTokenBindingMessage, in turn conveying |
| | TokenBinding (TB)struct(s), e.g.: ETBMSG[[TB]] or | | | TokenBinding (TB)struct(s), e.g.: ETBMSG[[TB]] or |
| | ETBMSG[[TB1],[TB2]] | | | ETBMSG[[TB1],[TB2]] |
| ID Token: | the ID Token in OpenID Connect, it is the semantic | | ID Token: | the ID Token in OpenID Connect, it is the semantic |
| | equivalent of a SAML "authentication assertion". "ID | | | equivalent of a SAML "authentication assertion". "ID |
| | Token w/TBIDn" denotes a "token bound" ID Token | | | Token w/TBIDn" denotes a "token bound" ID Token |
skipping to change at page 15, line 11 skipping to change at page 15, line 11
|<------------------------------| | |<------------------------------| |
| | | | | |
| | | | | |
6. Implementation Considerations 6. Implementation Considerations
HTTPS-based applications may have multi-party use cases other than, HTTPS-based applications may have multi-party use cases other than,
or in addition to, the HTTP redirect-based signaling-and-conveyance or in addition to, the HTTP redirect-based signaling-and-conveyance
of referred token bindings, as presented above in Section 5.3. of referred token bindings, as presented above in Section 5.3.
Thus, generic Token Binding implementations intended to support any Thus, platforms (Web browsers, operating systems, etc.) that
HTTPS-based client-side application (e.g., so-called "native implement Token Binding and expose its functionality to applications
applications"), should provide means for applications to have Token should provide means for such applications to generate Token Binding
Binding messages, containing Token Binding IDs of various messages containing Token Binding IDs of various application-
application-specified Token Binding types and for application- specified Token Binding types, to be conveyed by the Sec-Token-
specified TLS connections, conveyed over an application-specified Binding header field.
HTTPS connection, i.e., within the TokenBindingMessage conveyed by
the Sec-Token-Binding header field.
However, such implementations MUST only convey Token Binding IDs to However, such platforms MUST only convey Token Binding IDs to servers
servers if signaled to do so by an application. For example, a if signaled to do so by an application. For example, a server can
server can return an Include-Referred-Token-Binding-ID HTTP response return an Include-Referred-Token-Binding-ID HTTP response header
header field to a Web browser, thus signaling to the Token Binding field to a Web browser (the platform in this case), thus signaling to
implementation in the Web browser that the server intends to convey the Token Binding implementation in the Web browser that the
the Web browser's Token Binding ID to another server. Other application intends to convey the Web browser's Token Binding ID to
signaling mechanisms are possible, and are specific to the another server. Other signaling mechanisms are possible, and are
application layer protocol, but are outside the scope of this specific to the application layer protocol, but are outside the scope
specification. of this specification.
NOTE: See Section 8 ("Privacy Considerations"), for privacy guidance NOTE: See Section 8 ("Privacy Considerations"), for privacy guidance
regarding the use of this functionality. regarding the use of this functionality.
7. Security Considerations 7. Security Considerations
7.1. Security Token Replay 7.1. Security Token Replay
The goal of the Federated Token Binding mechanisms is to prevent The goal of the Federated Token Binding mechanisms is to prevent
attackers from exporting and replaying tokens used in protocols attackers from exporting and replaying tokens used in protocols
between the client and Token Consumer, thereby impersonating between the client and Token Consumer, thereby impersonating
legitimate users and gaining access to protected resources. Although legitimate users and gaining access to protected resources. Although
bound tokens can still be replayed by any malware present in clients bound tokens can still be replayed by any malware present in clients
(which may be undetectable by a server), in order to export bound (which may be undetectable by a server), in order to export bound
tokens to other machines and successfully replay them, attackers also tokens to other machines and successfully replay them, attackers also
need to export the corresponding Token Binding private keys. Token need to export the corresponding Token Binding private keys. Token
Binding private keys are therefore high-value assets and SHOULD be Binding private keys are therefore high-value assets and SHOULD be
strongly protected, ideally by generating them in a hardware security strongly protected, ideally by generating them in a hardware security
module that prevents key export. module that prevents key export.
7.2. Triple Handshake Vulnerability in TLS 1.2 and Older TLS Versions This consideration is a special case of the Security Token Replay
security consideration laid out in the The Token Binding Protocol
The Token Binding protocol relies on the exported key material (EKM) [I-D.ietf-tokbind-protocol] specification.
value [RFC5705] to associate a TLS connection with a TLS Token
Binding. The triple handshake attack [TRIPLE-HS] is a known
vulnerability in TLS 1.2 and older TLS versions, allowing the
attacker to synchronize keying material between TLS connections. The
attacker can then successfully replay bound tokens. For this reason,
the Token Binding protocol MUST NOT be negotiated with these TLS
versions, unless the Extended Master Secret [RFC7627] and
Renegotiation Indication [RFC5746] TLS extensions have also been
negotiated.
7.3. Sensitivity of the Sec-Token-Binding Header 7.2. Sensitivity of the Sec-Token-Binding Header
The purpose of the Token Binding protocol is to convince the server The purpose of the Token Binding protocol is to convince the server
that the client that initiated the TLS connection controls a certain that the client that initiated the TLS connection controls a certain
key pair. For the server to correctly draw this conclusion after key pair. For the server to correctly draw this conclusion after
processing the Sec-Token-Binding header field, certain secrecy and processing the Sec-Token-Binding header field, certain secrecy and
integrity requirements must be met. integrity requirements must be met.
For example, the client's Token Binding private key must be kept For example, the client's Token Binding private key must be kept
secret by the client. If the private key is not secret, then another secret by the client. If the private key is not secret, then another
actor in the system could create a valid Token Binding header field, actor in the system could create a valid Token Binding header field,
skipping to change at page 17, line 22 skipping to change at page 17, line 9
If A has a pre-existing relationship with S (perhaps has an account If A has a pre-existing relationship with S (perhaps has an account
on S), it now appears to the server S as if A is connecting to it, on S), it now appears to the server S as if A is connecting to it,
even though it is really C. (If the server S does not simply use even though it is really C. (If the server S does not simply use
Token Binding IDs to identify clients, but also uses bound Token Binding IDs to identify clients, but also uses bound
authentication cookies, then A would also have to trick C into authentication cookies, then A would also have to trick C into
sending one of A's cookies to S, which it can do through a variety of sending one of A's cookies to S, which it can do through a variety of
means - inserting cookies through Javascript APIs, setting cookies means - inserting cookies through Javascript APIs, setting cookies
through related-domain attacks, etc.) In other words, A tricked C through related-domain attacks, etc.) In other words, A tricked C
into logging into A's account on S. This could lead to a loss of into logging into A's account on S. This could lead to a loss of
privacy for C, since A presumably has some other way to also access privacy for C, since A presumably has some other way to also access
the account, and can thus indirectly observe A's behavior (for the account, and can thus indirectly observe C's behavior (for
example, if S has a feature that lets account holders see their example, if S has a feature that lets account holders see their
activity history on S). activity history on S).
Therefore, we need to protect the integrity of the Sec-Token-Binding Therefore, we need to protect the integrity of the Sec-Token-Binding
header field. One eTLD+1 should not be able to set the Sec-Token- header field. One eTLD+1 should not be able to set the Sec-Token-
Binding header field (through a DOM API or otherwise) that the User Binding header field (through a DOM API or otherwise) that the User
Agent uses with another eTLD+1. Employing the "Sec-" header field Agent uses with another eTLD+1. Employing the "Sec-" header field
prefix helps to meet this requirement by denoting the header field prefix helps to meet this requirement by denoting the header field
name to be a "forbidden header name", see [fetch-spec]. name to be a "forbidden header name", see [fetch-spec].
7.4. Securing Federated Sign-On Protocols 7.3. Securing Federated Sign-On Protocols
As explained above, in a federated sign-in scenario, a client will As explained above, in a federated sign-in scenario, a client will
prove possession of two different Token Binding private keys to a prove possession of two different Token Binding private keys to a
Token Provider: One private key corresponds to the "provided" Token Token Provider: One private key corresponds to the "provided" Token
Binding ID (which the client normally uses with the Token Provider), Binding ID (which the client normally uses with the Token Provider),
and the other is the Token Binding private key corresponding to the and the other is the Token Binding private key corresponding to the
"referred" Token Binding ID (which the client normally uses with the "referred" Token Binding ID (which the client normally uses with the
Token Consumer). The Token Provider is expected to issue a token Token Consumer). The Token Provider is expected to issue a token
that is bound to the referred Token Binding ID. that is bound to the referred Token Binding ID.
skipping to change at page 20, line 38 skipping to change at page 20, line 25
Token Binding key pairs do not have an expiration time. This means Token Binding key pairs do not have an expiration time. This means
that they can potentially be used by a server to track a user for an that they can potentially be used by a server to track a user for an
extended period of time (similar to a long-lived cookie). HTTPS extended period of time (similar to a long-lived cookie). HTTPS
clients such as Web user agents SHOULD therefore provide a user clients such as Web user agents SHOULD therefore provide a user
interface for discarding Token Binding key pairs (similar to the interface for discarding Token Binding key pairs (similar to the
affordances provided to delete cookies). affordances provided to delete cookies).
If a user agent provides modes such as private browsing mode in which If a user agent provides modes such as private browsing mode in which
the user is promised that browsing state such as cookies are the user is promised that browsing state such as cookies are
discarded after the session is over, the user agent SHOULD also discarded after the session is over, the user agent MUST also discard
discard Token Binding key pairs from such modes after the session is Token Binding key pairs from such modes after the session is over.
over. Generally speaking, users should be given the same level of Generally speaking, users should be given the same level of control
control over lifetime of Token Binding key pairs as they have over over lifetime of Token Binding key pairs as they have over cookies or
cookies or other potential tracking mechanisms. other potential tracking mechanisms.
8.3. Correlation 8.3. Correlation
An application's various communicating endpoints that receive Token An application's various communicating endpoints that receive Token
Binding IDs for TLS connections other than their own, obtain Binding IDs for TLS connections other than their own obtain
information about the application's other TLS connections. (In this information about the application's other TLS connections. (In this
context, "an application" is a combination of client-side and server- context, "an application" is a combination of client-side and server-
side components, communicating over HTTPS, where the client side may side components, communicating over HTTPS, where the client side may
be either or both Web browser-based or native application-based.) be either or both Web browser-based or native application-based.)
These other Token Binding IDs can serve as correlation handles for These other Token Binding IDs can serve as correlation handles for
the endpoints of the other connections. If the receiving endpoints the endpoints of the other connections. If the receiving endpoints
are otherwise aware of these other connections, then no additional are otherwise aware of these other connections, then no additional
information is being exposed. For instance, if in a redirect-based information is being exposed. For instance, if in a redirect-based
federation protocol, the Identity Provider and Relying Party already federation protocol, the Identity Provider and Relying Party already
possess URLs for one another, also having Token Binding IDs for these possess URLs for one another, also having Token Binding IDs for these
skipping to change at page 22, line 19 skipping to change at page 22, line 5
Nadalin, Michael B. Jones, Bill Cox, Brian Campbell, and others. Nadalin, Michael B. Jones, Bill Cox, Brian Campbell, and others.
This document was produced under the chairmanship of John Bradley and This document was produced under the chairmanship of John Bradley and
Leif Johansson. The area directors included Eric Rescorla, Kathleen Leif Johansson. The area directors included Eric Rescorla, Kathleen
Moriarty and Stephen Farrell. Moriarty and Stephen Farrell.
11. References 11. References
11.1. Normative References 11.1. Normative References
[fetch-spec]
WhatWG, "Fetch", Living Standard ,
<https://fetch.spec.whatwg.org/>.
[I-D.ietf-tokbind-negotiation] [I-D.ietf-tokbind-negotiation]
Popov, A., Nystrom, M., Balfanz, D., and A. Langley, Popov, A., Nystrom, M., Balfanz, D., and A. Langley,
"Transport Layer Security (TLS) Extension for Token "Transport Layer Security (TLS) Extension for Token
Binding Protocol Negotiation", draft-ietf-tokbind- Binding Protocol Negotiation", draft-ietf-tokbind-
negotiation-12 (work in progress), May 2018. negotiation-13 (work in progress), May 2018.
[I-D.ietf-tokbind-protocol] [I-D.ietf-tokbind-protocol]
Popov, A., Nystrom, M., Balfanz, D., Langley, A., and J. Popov, A., Nystrom, M., Balfanz, D., Langley, A., and J.
Hodges, "The Token Binding Protocol Version 1.0", draft- Hodges, "The Token Binding Protocol Version 1.0", draft-
ietf-tokbind-protocol-17 (work in progress), April 2018. ietf-tokbind-protocol-18 (work in progress), May 2018.
[PSL] Mozilla, "Public Suffix List, https://publicsuffix.org/",
<https://publicsuffix.org/>.
[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>.
[RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818,
DOI 10.17487/RFC2818, May 2000, DOI 10.17487/RFC2818, May 2000,
<https://www.rfc-editor.org/info/rfc2818>. <https://www.rfc-editor.org/info/rfc2818>.
skipping to change at page 23, line 38 skipping to change at page 23, line 25
[RFC7541] Peon, R. and H. Ruellan, "HPACK: Header Compression for [RFC7541] Peon, R. and H. Ruellan, "HPACK: Header Compression for
HTTP/2", RFC 7541, DOI 10.17487/RFC7541, May 2015, HTTP/2", RFC 7541, DOI 10.17487/RFC7541, May 2015,
<https://www.rfc-editor.org/info/rfc7541>. <https://www.rfc-editor.org/info/rfc7541>.
[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>.
11.2. Informative References 11.2. Informative References
[fetch-spec]
WhatWG, "Fetch", Living Standard ,
<https://fetch.spec.whatwg.org/>.
[OASIS.saml-core-2.0-os] [OASIS.saml-core-2.0-os]
Cantor, S., Kemp, J., Philpott, R., and E. Maler, Cantor, S., Kemp, J., Philpott, R., and E. Maler,
"Assertions and Protocol for the OASIS Security Assertion "Assertions and Protocol for the OASIS Security Assertion
Markup Language (SAML) V2.0", OASIS Standard saml-core- Markup Language (SAML) V2.0", OASIS Standard saml-core-
2.0-os, March 2005, <http://docs.oasis- 2.0-os, March 2005, <http://docs.oasis-
open.org/security/saml/v2.0/saml-core-2.0-os.pdf>. open.org/security/saml/v2.0/saml-core-2.0-os.pdf>.
[OpenID.Core] [OpenID.Core]
Sakimura, N., Bradley, J., Jones, M., de Medeiros, B., and Sakimura, N., Bradley, J., Jones, M., de Medeiros, B., and
C. Mortimore, "OpenID Connect Core 1.0", August 2015, C. Mortimore, "OpenID Connect Core 1.0", August 2015,
 End of changes. 32 change blocks. 
104 lines changed or deleted 105 lines changed or added

This html diff was produced by rfcdiff 1.46. The latest version is available from http://tools.ietf.org/tools/rfcdiff/