draft-ietf-tokbind-https-18.txt | rfc8473.txt | |||
---|---|---|---|---|
Internet Engineering Task Force A. Popov | Internet Engineering Task Force (IETF) A. Popov | |||
Internet-Draft M. Nystroem | Request for Comments: 8473 M. Nystroem | |||
Intended status: Standards Track Microsoft Corp. | Category: Standards Track Microsoft Corp. | |||
Expires: December 28, 2018 D. Balfanz, Ed. | ISSN: 2070-1721 D. Balfanz, Ed. | |||
A. Langley | ||||
N. Harper | N. Harper | |||
Google Inc. | Google Inc. | |||
J. Hodges | J. Hodges | |||
PayPal | Kings Mountain Systems | |||
June 26, 2018 | October 2018 | |||
Token Binding over HTTP | Token Binding over HTTP | |||
draft-ietf-tokbind-https-18 | ||||
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 that it issues to a client -- and that the client | |||
subsequently returns to the server, to the TLS connection between the | subsequently returns to the server -- to the TLS connection between | |||
client and server. Such bound security tokens are protected from | the client and the server. Such bound security tokens are protected | |||
misuse since the server can generally detect if they are replayed | from misuse, since the server can generally detect if they are | |||
inappropriately, e.g., over other TLS connections. | replayed inappropriately, e.g., over other TLS connections. | |||
Federated token bindings, on the other hand, allow servers to | Federated Token Bindings, on the other hand, allow servers to | |||
cryptographically bind security tokens to a TLS connection that the | cryptographically bind security tokens to a TLS connection that the | |||
client has with a different server than the one issuing the token. | client has with a different server than the one issuing the token. | |||
This document is a companion document to The Token Binding Protocol. | This document is a companion document to "The Token Binding Protocol | |||
Version 1.0" (RFC 8471). | ||||
Status of This Memo | Status of This Memo | |||
This Internet-Draft is submitted in full conformance with the | This is an Internet Standards Track document. | |||
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 | This document is a product of the Internet Engineering Task Force | |||
and may be updated, replaced, or obsoleted by other documents at any | (IETF). It represents the consensus of the IETF community. It has | |||
time. It is inappropriate to use Internet-Drafts as reference | received public review and has been approved for publication by the | |||
material or to cite them other than as "work in progress." | Internet Engineering Steering Group (IESG). Further information on | |||
Internet Standards is available in Section 2 of RFC 7841. | ||||
This Internet-Draft will expire on December 28, 2018. | Information about the current status of this document, any errata, | |||
and how to provide feedback on it may be obtained at | ||||
https://www.rfc-editor.org/info/rfc8473. | ||||
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 | |||
skipping to change at page 2, line 29 ¶ | skipping to change at page 2, line 25 ¶ | |||
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 . . . . . . . . . . . . . . . . . . 3 | 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 . . . . . . . . . . . . . . . . . . . . 7 | |||
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 . . . . . . . . . . . . . . . . . . . 13 | |||
6. Implementation Considerations . . . . . . . . . . . . . . . . 15 | 6. Implementation Considerations . . . . . . . . . . . . . . . . 15 | |||
7. Security Considerations . . . . . . . . . . . . . . . . . . . 15 | 7. Security Considerations . . . . . . . . . . . . . . . . . . . 16 | |||
7.1. Security Token Replay . . . . . . . . . . . . . . . . . . 15 | 7.1. Security Token Replay . . . . . . . . . . . . . . . . . . 16 | |||
7.2. Sensitivity of the Sec-Token-Binding Header . . . . . . . 15 | 7.2. Sensitivity of the Sec-Token-Binding Header . . . . . . . 16 | |||
7.3. Securing Federated Sign-On Protocols . . . . . . . . . . 17 | 7.3. Securing Federated Sign-On Protocols . . . . . . . . . . 17 | |||
8. Privacy Considerations . . . . . . . . . . . . . . . . . . . 19 | 8. Privacy Considerations . . . . . . . . . . . . . . . . . . . 20 | |||
8.1. Scoping of Token Binding Key Pairs . . . . . . . . . . . 19 | 8.1. Scoping of Token Binding Key Pairs . . . . . . . . . . . 20 | |||
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 . . . . . . . . . . . . . . . . . . . . . . . 21 | |||
9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 21 | 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 22 | |||
10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 21 | 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 22 | |||
11. References . . . . . . . . . . . . . . . . . . . . . . . . . 21 | 10.1. Normative References . . . . . . . . . . . . . . . . . . 22 | |||
11.1. Normative References . . . . . . . . . . . . . . . . . . 21 | 10.2. Informative References . . . . . . . . . . . . . . . . . 23 | |||
11.2. Informative References . . . . . . . . . . . . . . . . . 23 | Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 25 | |||
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 25 | ||||
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 24 | ||||
1. Introduction | 1. Introduction | |||
The Token Binding Protocol [I-D.ietf-tokbind-protocol] defines a | The Token Binding protocol [RFC8471] defines a Token Binding ID for a | |||
Token Binding ID for a TLS connection between a client and a server. | TLS connection between a client and a server. The Token Binding ID | |||
The Token Binding ID of a TLS connection is constructed using the | of a TLS connection is constructed using the public key of a | |||
public key of a private-public key pair. The client proves | private-public key pair. The client proves possession of the | |||
possession of the corresponding private key. This Token Binding key | corresponding private key. This Token Binding key pair is | |||
pair is long-lived. I.e., subsequent TLS connections between the | long-lived. That is, subsequent TLS connections between the same | |||
same client and server have the same Token Binding ID, unless | client and server have the same Token Binding ID, unless specifically | |||
specifically reset, e.g., by the user. When issuing a security token | reset, e.g., by the user. When issuing a security token (e.g., an | |||
(e.g., an HTTP cookie or an OAuth token [RFC6749]) to a client, the | HTTP cookie or an OAuth token [RFC6749]) to a client, the server can | |||
server can include the Token Binding ID in the token, thus | include the Token Binding ID in the token, thus cryptographically | |||
cryptographically binding the token to TLS connections between that | binding the token to TLS connections between that particular client | |||
particular client and server, and inoculating the token against abuse | and server, and inoculating the token against abuse (reuse, attempted | |||
(re-use, attempted impersonation, etc.) by attackers. | impersonation, etc.) by attackers. | |||
While the Token Binding Protocol [I-D.ietf-tokbind-protocol] defines | While the Token Binding protocol [RFC8471] defines a message format | |||
a message format for establishing a Token Binding ID, it does not | for establishing a Token Binding ID, it does not specify how this | |||
specify how this message is embedded in higher-level protocols. The | message is embedded in higher-level protocols. The purpose of this | |||
purpose of this specification is to define how TokenBindingMessages | specification is to define how TokenBindingMessages are embedded in | |||
are embedded in HTTP (both versions 1.1 [RFC7230] and 2 [RFC7540]). | HTTP (both versions 1.1 [RFC7230] and 2 [RFC7540]). Note that | |||
Note that TokenBindingMessages are only defined if the underlying | TokenBindingMessages are only defined if the underlying transport | |||
transport uses TLS. This means that Token Binding over HTTP is only | uses TLS. This means that Token Binding over HTTP is only defined | |||
defined when the HTTP protocol is layered on top of TLS (commonly | when HTTP is layered on top of TLS (commonly referred to as HTTPS | |||
referred to as HTTPS [RFC2818]). | [RFC2818]). | |||
HTTP clients establish a Token Binding ID with a server by including | HTTP clients establish a Token Binding ID with a server by including | |||
a special HTTP header field in HTTP requests. The HTTP header field | a special HTTP header field in HTTP requests. The HTTP header field | |||
value is a base64url-encoded TokenBindingMessage. | value is a base64url-encoded TokenBindingMessage. | |||
TokenBindingMessages allow clients to establish multiple Token | A TokenBindingMessage allows a client to establish multiple Token | |||
Binding IDs with the server, by including multiple TokenBinding | Binding IDs with the server by including multiple TokenBinding | |||
structures in the TokenBindingMessage. By default, a client will | structures. By default, a client will establish a Provided Token | |||
establish a provided Token Binding ID with the server, indicating a | Binding ID with the server, indicating a Token Binding ID that the | |||
Token Binding ID that the client will persistently use with the | client will persistently use with the server. Under certain | |||
server. Under certain conditions, the client can also include a | conditions, the client can also include a Referred Token Binding ID | |||
referred Token Binding ID in the TokenBindingMessage, indicating a | in the TokenBindingMessage, indicating a Token Binding ID that the | |||
Token Binding ID that the client is using with a different server | client is using with a different server than the one that the | |||
than the one that the TokenBindingMessage is sent to. This is useful | TokenBindingMessage is sent to. This is useful in federation | |||
in federation scenarios. | scenarios. | |||
1.1. Requirements Language | 1.1. Requirements Language | |||
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | |||
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and | "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and | |||
"OPTIONAL" in this document are to be interpreted as described in BCP | "OPTIONAL" in this document are to be interpreted as described in | |||
14 [RFC2119] [RFC8174] when, and only when, they appear in all | BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all | |||
capitals, as shown here. | capitals, as shown here. | |||
2. The Sec-Token-Binding HTTP Request Header Field | 2. The Sec-Token-Binding HTTP Request Header Field | |||
Once a client and server have negotiated the Token Binding Protocol | Once a client and server have negotiated the Token Binding protocol | |||
with HTTP/1.1 or HTTP/2 (see [I-D.ietf-tokbind-protocol] and | with HTTP/1.1 or HTTP/2 (see [RFC8471] and [RFC8472]), clients MUST | |||
[I-D.ietf-tokbind-negotiation]), clients MUST include a Sec-Token- | include a Sec-Token-Binding header field in their HTTP requests and | |||
Binding header field in their HTTP requests, and MUST include only | MUST include only one such header field per HTTP request. Also, the | |||
one such header field per HTTP request. Also, The Sec-Token-Binding | Sec-Token-Binding header field MUST NOT be included in HTTP | |||
header field MUST NOT be included in HTTP responses. The ABNF of the | responses. The ABNF of the Sec-Token-Binding header field is (per | |||
Sec-Token-Binding header field is (in [RFC7230] style, see also | the style of [RFC7230]; 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]. The | TokenBindingMessage, as defined in [RFC8471]. The base64url encoding | |||
base64url encoding uses the URL- and filename-safe character set | uses the URL and filename safe character set described in Section 5 | |||
described in Section 5 of [RFC4648], with all trailing padding | of [RFC4648], with all trailing padding characters (i.e., "=") | |||
characters '=' omitted and without the inclusion of any line breaks, | omitted and without the inclusion of any line breaks, whitespace, or | |||
whitespace, or other additional characters. | 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 | (Note that the backslashes and line breaks are provided to ease | |||
readability, they are not part of the actual encoded message.) | 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 | |||
Binding header field: | Sec-Token-Binding header field: | |||
SHOULD NOT be stored by origin servers on PUT requests, | o SHOULD NOT be stored by origin servers on PUT requests, | |||
MAY be listed by a server in a Vary response header field, and, | o MAY be listed by a server in a Vary response header field, and | |||
MUST NOT be used in HTTP trailers. | o MUST NOT be used in HTTP trailers. | |||
The TokenBindingMessage MUST contain exactly one TokenBinding | The TokenBindingMessage MUST contain exactly one TokenBinding | |||
structure with TokenBindingType of provided_token_binding, which MUST | structure with a TokenBindingType value of provided_token_binding, | |||
be signed with the Token Binding private key used by the client for | which MUST be signed with the Token Binding private key used by the | |||
connections between itself and the server that the HTTP request is | client for connections between itself and the server that the HTTP | |||
sent to (clients use different Token Binding key pairs for different | request is sent to (clients use different Token Binding key pairs for | |||
servers, see Section 2.1 below). The Token Binding ID established by | different servers; see Section 2.1 below). The Token Binding ID | |||
this TokenBinding is called a Provided Token Binding ID. | established by 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 a TokenBindingType value 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 specific to the use case in question; such use | |||
outside the scope of this specification. | cases are 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 [RFC8471]. If validation | |||
[I-D.ietf-tokbind-protocol]. If validation fails and a Token Binding | fails and a Token Binding is rejected, any associated bound tokens | |||
is rejected, any associated bound tokens MUST also be rejected by the | MUST also be rejected by the server. HTTP requests containing | |||
server. HTTP requests containing invalid tokens MUST be rejected. | invalid tokens MUST be rejected. In this case, the server | |||
In this case, the server application MAY return HTTP status code 400 | application MAY return HTTP status code 400 (Bad Request) or proceed | |||
(Bad Request) or proceed with an application-specific invalid token | with an application-specific "invalid token" response (e.g., | |||
response (e.g., directing the client to re-authenticate and present a | directing the client to re-authenticate and present a different | |||
different token), or terminate the connection. | 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 that | web browsing is one such HTTP-based application context. Within that | |||
context, HTTP cookies [RFC6265] are typically utilized for state | context, HTTP cookies [RFC6265] are typically utilized for 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 | |||
the purpose of binding HTTP cookies MUST be no wider than the | the purpose of binding HTTP cookies MUST be no wider than the | |||
granularity of a "registered domain" (also known as "effective top- | granularity of a "registered domain" (also known as "effective | |||
level domain + 1", or "eTLD+1"). An origin's "registered domain" is | top-level domain + 1", or "eTLD+1"). An origin's "registered domain" | |||
the origin's host's public suffix plus the label to its left, with | is the origin's host's public suffix plus the label to its left | |||
the term "public suffix" being defined in a note in Section 5.3 of | (where the term "public suffix" is defined in the "NOTE:" paragraph | |||
[RFC6265] as "a domain that is controlled by a public registry". For | in Section 5.3 of [RFC6265] as "a domain that is controlled by a | |||
example, for "https://www.example.com", the public suffix (eTLD) is | public registry"). For example, for "https://www.example.com", the | |||
"com", and the registered domain (eTLD+1) is "example.com". User | public suffix (eTLD) is "com", and the registered domain (eTLD+1) is | |||
agents SHOULD use an up-to-date public suffix list, such as the one | "example.com". User Agents SHOULD use an up-to-date public suffix | |||
maintained by Mozilla [PSL]. | list, such as the one maintained by Mozilla [PSL]. | |||
This means that in practice the scope of a Token Binding key pair is | 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 | 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 | web browser restricts cookies to a narrower scope than registered | |||
domains, the scope of Token Binding key pairs MAY also be more | domains, the scope of Token Binding key pairs MAY also be narrower. | |||
narrow. This applies to the use of Token Binding key pairs in first- | This applies to the use of Token Binding key pairs in first-party use | |||
party use cases, as well as in federation use cases defined in this | cases, as well as in federation use cases defined in this | |||
specification (Section 5). | 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 adhere to the above eTLD+1 | or "OpenID Connect" ID Tokens [OpenID.Core], SHOULD adhere to the | |||
scoping requirement for those tokens being employed in first-party or | above eTLD+1 scoping requirement for those tokens being employed in | |||
federation scenarios. Applications other than Web browsers MAY use | first-party or federation scenarios. Applications other than web | |||
different key pair scoping rules. See also Section 8.1, below. | browsers MAY use different key-pair scoping rules. See also | |||
Section 8.1 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 | |||
initiate renegotiation. (I.e., the client may only send a | initiate renegotiation. (That is, the client may only send a | |||
renegotiation ClientHello in response to the server's HelloRequest.) | renegotiation ClientHello in response to the server's HelloRequest.) | |||
These conditions ensure that both the client and the server can | These conditions ensure that both the client and the server can | |||
clearly identify which TLS Exported Keying Material value [RFC5705] | clearly identify which TLS Exported Keying Material value [RFC5705] | |||
to use when generating or verifying the TokenBindingMessage. This | to use when generating or verifying the TokenBindingMessage. This | |||
also prevents a TokenBindingMessage from being split across TLS | also prevents a TokenBindingMessage from being split across TLS | |||
renegotiation boundaries. (I.e., due to TLS message fragmentation - | renegotiation boundaries due to TLS message fragmentation; see | |||
see Section 6.2.1 of [RFC5246].) | Section 6.2.1 of [RFC5246]. | |||
(Note: This document deals with TLS 1.2 and therefore refers to | ||||
RFC 5246 (which has been obsoleted by RFC 8446); [TOKENBIND-TLS13] | ||||
addresses Token Binding in TLS 1.3.) | ||||
4. First-Party Use Cases | 4. First-Party Use Cases | |||
In a first-party use case (also known as a "same-site" use case), an | In a first-party use case (also known as a "same-site" use case), an | |||
HTTP server issues a security token such as a cookie (or similar) to | HTTP server issues a security token such as a cookie (or similar) to | |||
a client, and expects the client to return the security token at a | a client and expects the client to return the security token at a | |||
later time, e.g., in order to authenticate. Binding the security | later time, e.g., in order to authenticate. Binding the security | |||
token to the TLS connection between client and server protects the | token to the TLS connection between the client and the server | |||
security token from misuse, since the server can detect if the | protects the security token from misuse, since the server can detect | |||
security token is replayed inappropriately, e.g., over other TLS | if the security token is replayed inappropriately, e.g., over other | |||
connections. | TLS connections. | |||
See Section 5 of [I-D.ietf-tokbind-protocol] for general guidance | See Section 5 of [RFC8471] for general guidance regarding the binding | |||
regarding binding of security tokens and their subsequent validation. | of security tokens and their subsequent validation. | |||
5. Federation Use Cases | 5. Federation Use Cases | |||
5.1. Introduction | 5.1. Introduction | |||
For privacy reasons, clients use different Token Binding key pairs to | For privacy reasons, clients use different Token Binding key pairs to | |||
establish Provided Token Binding IDs with different servers. As a | establish Provided Token Binding IDs with different servers. As a | |||
result, a server cannot bind a security token (such as an OAuth token | result, a server cannot bind a security token (such as an OAuth token | |||
or an OpenID Connect ID Token [OpenID.Core]) to a TLS connection that | or an OpenID Connect ID Token [OpenID.Core]) to a TLS connection that | |||
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 [RFC8471] and includes a TokenBinding | |||
TokenBinding structure in the Sec-Token-Binding HTTP header field | structure in the Sec-Token-Binding HTTP header field defined above. | |||
defined above. What differs between the various mechanisms is how | What differs between the various mechanisms is how the Token Consumer | |||
the Token Consumer signals to the client that it should reveal the | signals to the client that it should reveal the Token Binding ID to | |||
Token Binding ID to the Token Provider. Below, we specify one such | the Token Provider. Below, we specify one such mechanism, which is | |||
mechanism, which is suitable for redirect-based interactions between | suitable for redirect-based interactions between Token Consumers and | |||
Token Consumers and Token Providers. | Token Providers. | |||
Client Token Consumer Token Provider | Client Token Consumer Token Provider | |||
+--------+ +----+ +-----+ | +--------+ +----+ +-----+ | |||
| Client | | TC | | TP | | | Client | | TC | | TP | | |||
+--------+ +----+ +-----+ | +--------+ +----+ +-----+ | |||
| | | | | | | | |||
| | | | | | | | |||
| | | | | | | | |||
| Client interacts w/TC | | | | Client interacts w/TC | | | |||
| using TokenBindingID TBID1: | | | | using TokenBindingID TBID1: | | | |||
| TBMSG[[provided_token_binding,| | | | TBMSG[[provided_token_binding,| | | |||
| TBID1, signature]] | | | | TBID1, signature]] | | | |||
|------------------------------>| | | |------------------------------>| | | |||
| | | | | | | | |||
| Client interacts w/TP | | | Client interacts w/TP | | |||
| using TokenBindingID TBID2: | | | using TokenBindingID TBID2: | | |||
| TBMSG[[provided_token_binding, | | | TBMSG[[provided_token_binding, | | |||
| TBID2, signature]] | | | TBID2, signature]] | | |||
|----------------------------------------------------->| | |----------------------------------------------------->| | |||
| | | | | | |||
| | | | | | | | |||
| TC signals permission to | | | | TC signals permission to | | | |||
| reveal TBID1 to TP | | | | reveal TBID1 to TP | | | |||
|<------------------------------| | | |<------------------------------| | | |||
| | | | | | | | |||
| | | | | | |||
| Client interacts w/TP | | | Client interacts w/TP | | |||
| using TokenBindingID TBID1 and TBID2: | | | using TokenBindingID TBID1 and TBID2: | | |||
| TBMSG[[provided_token_binding, | | | TBMSG[[provided_token_binding, | | |||
| TBID2, signature], | | | TBID2, signature], | | |||
| [referred_token_binding, | | | [referred_token_binding, | | |||
| TBID1, signature]] | | | TBID1, signature]] | | |||
|----------------------------------------------------->| | |----------------------------------------------------->| | |||
| | | | | | |||
| | | | | | | | |||
| | | | | | | | |||
5.2. Overview | 5.2. Overview | |||
In a Federated Sign-On protocol, an Identity Provider issues an | In a federated sign-on protocol, an Identity Provider issues an | |||
identity token to a client, which sends the identity token to a | identity token to a client, which sends the identity token to a | |||
Relying Party to authenticate itself. Examples of this include | Relying Party to authenticate itself. Examples of this include | |||
OpenID Connect (in which the identity token is called an "ID Token") | OpenID Connect (in which the identity token is called an "ID Token") | |||
and SAML [OASIS.saml-core-2.0-os] (in which the identity token is a | and the Security Assertion Markup Language (SAML) | |||
SAML assertion). | [OASIS.saml-core-2.0-os] (in which the identity token is a SAML | |||
assertion). | ||||
To better protect the security of the identity token, the Identity | To better protect the security of the identity token, the Identity | |||
Provider may wish to bind the identity token to the TLS connection | Provider may wish to bind the identity token to the TLS connection | |||
between the client and the Relying Party, thus ensuring that only | between the client and the Relying Party, thus ensuring that only | |||
said client can use the identity token. The Relying Party will | said client can use the identity token. The Relying Party will | |||
compare the Token Binding ID (or a cryptographic hash of it) in the | compare the Token Binding ID (or a cryptographic hash of it) in the | |||
identity token with the Token Binding ID (or a hash thereof) of the | identity token with the Token Binding ID (or a hash thereof) of the | |||
TLS connection between this Relying Party and the client. | TLS connection between this Relying Party and the client. | |||
This is an example of a federation scenario, which more generally can | This is an example of a federation scenario, which more generally can | |||
skipping to change at page 9, line 22 ¶ | skipping to change at page 9, line 26 ¶ | |||
o A Token Consumer causes the client to issue a token request to the | o A Token Consumer causes the client to issue a token request to the | |||
Token Provider. The goal is for the client to obtain a token and | Token Provider. The goal is for the client to obtain a token and | |||
then use it with the Token Consumer. | then use it with the Token Consumer. | |||
o The client delivers the token request to the Token Provider. | o The client delivers the token request to the Token Provider. | |||
o The Token Provider issues the token. The token is issued for the | o The Token Provider issues the token. The token is issued for the | |||
specific Token Consumer who requested it (thus preventing | specific Token Consumer who requested it (thus preventing | |||
malicious Token Consumers from using tokens with other Token | malicious Token Consumers from using tokens with other Token | |||
Consumers). The token is, however, typically a bearer token, | Consumers). The token is, however, typically a bearer token, | |||
meaning that any client can use it with the Token Consumer, not | meaning that any client can use it with the Token Consumer -- not | |||
just the client to which it was issued. | just the client to which it was issued. | |||
o Therefore, in the previous step, the Token Provider may want to | o Therefore, in the previous step, the Token Provider may want to | |||
include in the token the Token Binding ID (or a cryptographic hash | include in the token the Token Binding ID (or a cryptographic hash | |||
of it) that the client uses when communicating with the Token | of it) that the client uses when communicating with the Token | |||
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 [RFC8471] and uses the corresponding public key of this | |||
public key of this key pair as a component of the Token Binding | key pair as a component of the Token Binding ID. Comparing the | |||
ID. Comparing the Token Binding ID from the token to the Token | Token Binding ID from the token to the Token Binding ID | |||
Binding ID established with the client allows the Token Consumer | established with the client allows the Token Consumer to verify | |||
to verify that the token was sent to it by the legitimate client. | 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 must | token, the Token Binding ID between the client and the Token | |||
therefore be communicated to the Token Provider along with the | Consumer must therefore be communicated to the Token Provider | |||
token request. Communicating a Token Binding ID involves proving | along with the token request. Communicating a Token Binding ID | |||
possession of a private key and is described in the Token Binding | involves proving possession of a private key and is described in | |||
Protocol [I-D.ietf-tokbind-protocol]. | the Token Binding protocol [RFC8471]. | |||
The client will perform this last operation only if the Token | The client will perform this last operation only if the Token | |||
Consumer requests the client to do so. | 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 | |||
When a Token Consumer redirects the client to a Token Provider as a | When a Token Consumer redirects the client to a Token Provider as a | |||
means to deliver the token request, it SHOULD include an Include- | means to deliver the token request, it SHOULD include an | |||
Referred-Token-Binding-ID HTTP response header field in its HTTP | Include-Referred-Token-Binding-ID HTTP response header field in its | |||
response. The ABNF of the Include-Referred-Token-Binding-ID header | HTTP response. The ABNF of the Include-Referred-Token-Binding-ID | |||
is (in [RFC7230] style, see also Section 8.3 of [RFC7231]): | header is (per the style of [RFC7230]; see also Section 8.3 of | |||
[RFC7231]): | ||||
Include-Referred-Token-Binding-ID = "true" | Include-Referred-Token-Binding-ID = "true" | |||
Where the header field name is "Include-Referred-Token-Binding-ID", | Where the header field name is "Include-Referred-Token-Binding-ID" | |||
and the field-value of "true" is case-insensitive. For example: | and the field value of "true" is case insensitive. For example: | |||
Include-Referred-Token-Binding-ID: true | Include-Referred-Token-Binding-ID: true | |||
Including this response header field signals to the client that it | Including this response header field signals to the client that it | |||
should reveal, to the Token Provider, the Token Binding ID used | should reveal, to the Token Provider, the Token Binding ID used | |||
between itself and the Token Consumer. In the absence of this | between itself and the Token Consumer. In the absence of this | |||
response header field, the client will not disclose any information | response header field, the client will not disclose any information | |||
about the Token Binding used between the client and the Token | about the Token Binding used between the client and the Token | |||
Consumer to the Token Provider. | Consumer to the Token Provider. | |||
As illustrated in Section 5.5, when a client receives this header | As illustrated in Section 5.5, when a client receives this header | |||
field, it should take the TokenBindingID of the provided TokenBinding | field, it should take the TokenBindingID [RFC8471] of the provided | |||
from the referrer and create a referred TokenBinding with it to | TokenBinding from the referrer and create a referred TokenBinding | |||
include in the TokenBindingMessage on the redirect request. In other | with it to include in the TokenBindingMessage in the redirect | |||
words, the Token Binding message in the redirect request to the Token | request. In other words, the Token Binding message in the redirect | |||
Provider now includes one provided binding and one referred binding, | request to the Token Provider now includes one provided binding and | |||
the latter constructed from the binding between the client and the | one referred binding, the latter constructed from the binding between | |||
Token Consumer. | the client and the Token Consumer. | |||
When a client receives the Include-Referred-Token-Binding-ID header, | When a client receives the Include-Referred-Token-Binding-ID header, | |||
it includes the referred token binding even if both the Token | it includes the referred Token Binding even if both the Token | |||
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. | provided and Referred Token Binding IDs are the same. | |||
The referred token binding is sent only on the initial request | The referred Token Binding is sent only in the initial request | |||
resulting from the HTTP response that included the Include-Referred- | resulting from the HTTP response that included the | |||
Token-Binding-ID header. Should the response to that initial request | Include-Referred-Token-Binding-ID header. Should the response to | |||
be a further redirect, the original referred token binding is no | that initial request be a further redirect, the original referred | |||
longer included in subsequent requests. (A new referred token | Token Binding is no longer included in subsequent requests. (A new | |||
binding may be included if the redirecting endpoint itself responded | referred Token Binding may be included if the redirecting endpoint | |||
with a Include-Referred-Token-Binding-ID response header.) | itself responded with an Include-Referred-Token-Binding-ID response | |||
If the Include-Referred-Token-Binding-ID header field is received in | header.) | |||
response to a request that did not include the Token-Binding header | ||||
field, the client MUST ignore the Include-Referred-Token-Binding-ID | ||||
header field. | ||||
This header field has only meaning if the HTTP status code is a | If the Include-Referred-Token-Binding-ID header field is | |||
redirection code (300-399), and MUST be ignored by the client for any | received in response to a request that did not include the | |||
other status codes. If the client supports the Token Binding | Sec-Token-Binding header field, the client MUST ignore the | |||
Protocol, and has negotiated the Token Binding Protocol with both the | Include-Referred-Token-Binding-ID header field. | |||
Token Consumer and the Token Provider, it already sends the Sec- | ||||
Token-Binding header field to the Token Provider with each HTTP | This header field only has meaning if the HTTP status code is a | |||
request (as described in Section 2 above). | redirection code (300-399) and MUST be ignored by the client for any | |||
other status codes. As described in Section 2, if the client | ||||
supports the Token Binding protocol and has negotiated the Token | ||||
Binding protocol with both the Token Consumer and the Token Provider, | ||||
it sends the Sec-Token-Binding header field to the Token Provider | ||||
with each HTTP request. | ||||
The TokenBindingMessage included in the redirect request to the Token | The TokenBindingMessage included in the redirect request to the Token | |||
Provider SHOULD contain a TokenBinding with TokenBindingType | Provider SHOULD contain a TokenBinding with a TokenBindingType value | |||
referred_token_binding. If included, this TokenBinding MUST be | of referred_token_binding. If included, this TokenBinding MUST be | |||
signed with the Token Binding private key used by the client for | signed with the Token Binding private key used by the client for | |||
connections between itself and the Token Consumer (more specifically, | connections between itself and the Token Consumer (more specifically, | |||
the server that issued the Include-Referred-Token-Binding-ID response | the server that issued the Include-Referred-Token-Binding-ID response | |||
header field). The Token Binding ID established by this TokenBinding | header field). The Token Binding ID established by this TokenBinding | |||
is called a Referred Token Binding 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 a | |||
TokenBindingType of provided_token_binding, which MUST be signed with | TokenBindingType value of provided_token_binding, which MUST be | |||
the Token Binding private key used by the client for connections | signed with the Token Binding private key used by the client for | |||
between itself and the Token Provider (more specifically, the server | connections between itself and the Token Provider (more specifically, | |||
that the token request is being sent to). | the server 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 | |||
("TP2"), rather than directly back to the Token Consumer, it can be | ("TP2") rather than directly back to the Token Consumer, it can be | |||
accommodated using the header fields defined in this specification in | accommodated using the header fields defined in this specification in | |||
the following fashion ("the redirect-chain approach"): | the following fashion ("the redirect-chain approach"): | |||
Initially, the client is redirected to TP1 by the Token Consumer | Initially, the client is redirected to TP1 by the Token Consumer | |||
("TC"), as described above. Upon receiving the client's request, | ("TC"), as described above. Upon receiving a client's request | |||
containing a TokenBindingMessage which contains both provided and | that contains a TokenBindingMessage that in turn contains both | |||
referred TokenBindings (for TP1 and TC, respectively), TP1 | provided and referred TokenBindings (for TP1 and TC, | |||
responds to the client with a redirect response containing the | respectively), TP1 responds to the client with a redirect response | |||
Include-Referred-Token-Binding-ID header field and directing the | that (1) contains the Include-Referred-Token-Binding-ID header | |||
client to send a request to TP2. This causes the client to follow | field and (2) directs the client to send a request to TP2. This | |||
the same pattern and send a request containing a | causes the client to follow the same pattern and send a request | |||
TokenBindingMessage which contains both provided and referred | containing a TokenBindingMessage that contains both provided and | |||
TokenBindings (for TP2 and TP1, respectively) to TP2. Note that | referred TokenBindings (for TP2 and TP1, respectively) to TP2. | |||
this pattern can continue to further Token Providers. In this | Note that this pattern can continue to additional Token Providers. | |||
case, TP2 issues a security token, bound to the client's | In this case, TP2 issues a security token, bound to the client's | |||
TokenBinding with TP1, and sends a redirect response to the client | TokenBinding with TP1, and sends a redirect response to the client | |||
pointing to TP1. TP1 in turn constructs a security token for the | pointing to TP1. TP1 in turn constructs a security token for the | |||
Token Consumer, bound to the TC's referred TokenBinding which had | Token Consumer, bound to the TC's referred TokenBinding that had | |||
been conveyed earlier, and sends a redirect response pointing to | been conveyed earlier, and sends a redirect response pointing to | |||
the TC, containing the bound security token, to the client. | the TC, containing the bound security token, to the client. | |||
The above is intended as only a non-normative example. Details are | The above is intended as only a non-normative example. Details are | |||
specific to deployment contexts. Other approaches are possible, but | specific to deployment contexts. Other approaches are possible but | |||
are outside the scope of this specification. | are outside the scope of this specification. | |||
5.4. Negotiated Key Parameters | 5.4. Negotiated Key Parameters | |||
The TLS Extension for Token Binding Protocol Negotiation | The TLS extension for Token Binding protocol negotiation [RFC8472] | |||
[I-D.ietf-tokbind-negotiation] allows the server and client to | allows the server and client to negotiate the parameters (signature | |||
negotiate the parameters (signature algorithm, length) of the Token | algorithm, length) of the Token Binding key pair. It is possible | |||
Binding key pair. It is possible that the Token Binding ID used | that the Token Binding ID used between the client and the Token | |||
between the client and the Token Consumer, and the Token Binding ID | Consumer, and the Token Binding ID used between the client and the | |||
used between the client and Token Provider, use different key | Token Provider, use different key parameters. The client MUST use | |||
parameters. The client MUST use the key parameters negotiated with | the key parameters negotiated with the Token Consumer in the | |||
the Token Consumer in the referred_token_binding TokenBinding of the | referred_token_binding TokenBinding of the TokenBindingMessage, even | |||
TokenBindingMessage, even if those key parameters are different from | if those key parameters are different from the ones negotiated with | |||
the ones negotiated with the server that the header field is sent to. | the server that the header field is sent to. | |||
Token Providers SHOULD support all the Token Binding key parameters | Token Providers SHOULD support all the Token Binding key parameters | |||
specified in [I-D.ietf-tokbind-protocol]. If a token provider does | specified in [RFC8471]. If a Token Provider does not support the key | |||
not support the key parameters specified in the | parameters specified in the referred_token_binding TokenBinding in | |||
referred_token_binding TokenBinding in the TokenBindingMessage, it | the TokenBindingMessage, it MUST NOT issue a bound token. | |||
MUST NOT issue a bound token. | ||||
5.5. Federation Example | 5.5. Federation Example | |||
The diagram below shows a typical HTTP Redirect-based Web Browser SSO | The diagram below shows a typical HTTP redirect-based web browser | |||
Profile (no artifact, no callbacks), featuring binding of, e.g., a | single sign-on (SSO) profile (Section 4.1 of | |||
TLS Token Binding ID into an OpenID Connect ID Token. | [OASIS.saml-prof-2.0-os]) (no artifact, no callbacks), featuring the | |||
binding of, for example, a 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 | | | | | | |||
| | "m", where "n" must represent server receiving the | | | {EKMn}Ksm: | EKM for server "n", signed by the private key of | | |||
| | ETBMSG. If a conveyed TB's type is | | | | TBID "m", where "n" must represent the server | | |||
| | receiving the 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. For | | |||
| | see step 1b in diagram below. | | | | example, see step 1b in the 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 | | | | | | |||
| | equivalent of a SAML "authentication assertion". "ID | | | ID Token: | the ID Token in OpenID Connect. It is the semantic | | |||
| | Token w/TBIDn" denotes a "token bound" ID Token | | | | equivalent of a SAML "authentication assertion". | | |||
| | "ID Token w/TBIDn" denotes a "token bound" ID Token | | ||||
| | containing TBIDn. | | | | containing TBIDn. | | |||
| Ks & Kp: | private (aka secret) key, and public key, | | | | | | |||
| | respectively, of client-side Token Binding key pair | | | Ks and Kp: | private (aka secret) key and public key, | | |||
| | respectively, of the client-side Token Binding key | | ||||
| | pair | | ||||
| | | | ||||
| OIDC: | OpenID Connect | | | OIDC: | OpenID Connect | | |||
| TB: | TokenBinding struct containing signed EKM, TBID, and | | | | | | |||
| | TB type, e.g.: | | | TB: | TokenBinding struct containing a signed EKM, TBID, | | |||
| | and TB type, e.g., | | ||||
| | [{EKM1}Ks1,TBID1,provided_token_binding] | | | | [{EKM1}Ks1,TBID1,provided_token_binding] | | |||
| | | | ||||
| TBIDn: | Token Binding ID for client and server n's token- | | | TBIDn: | Token Binding ID for client and server n's token- | | |||
| | bound TLS association. TBIDn contains Kpn. | | | | bound TLS association. TBIDn contains Kpn. | | |||
+------------+------------------------------------------------------+ | +------------+------------------------------------------------------+ | |||
Client, Token Consumer, Token Provider, | Client, aka Token Consumer, aka Token Provider, aka | |||
aka: aka: aka: | User Agent OpenID Client, OpenID Provider, | |||
User Agent OpenID Client, OpenID Provider, | OIDC Relying Party, OIDC Provider, | |||
OIDC Relying Party, OIDC Provider, | SAML Relying Party SAML Identity Provider | |||
SAML Relying Party SAML Identity Provider | [ server "1" ] [ server "2" ] | |||
[ server "1" ] [ server "2" ] | +--------+ +----+ +-----+ | |||
+--------+ +----+ +-----+ | | Client | | TC | | TP | | |||
| Client | | TC | | TP | | +--------+ +----+ +-----+ | |||
+--------+ +----+ +-----+ | | | | | |||
| | | | | | | | |||
| | | | | | | | |||
| | | | | 0. Client interacts w/TC | | | |||
| 0. Client interacts w/TC | | | | over HTTPS, establishes Ks1 and Kp1, TBID1 | | |||
| over HTTPS, establishes Ks1 & Kp1, TBID1 | | | ETBMSG[[{EKM1}Ks1,TBID1,provided_token_binding]] | | |||
| ETBMSG[[{EKM1}Ks1,TBID1,provided_token_binding]] | | |------------------------------>| | | |||
|------------------------------>| | | | | | | |||
| | | | | | | | |||
| | | | | | | | |||
| | | | | 1a. OIDC ID Token request, aka| | | |||
| 1a. OIDC ID Token request, aka| | | | "Authentication Request", conveyed with | | |||
| "Authentication Request", conveyed with | | | an HTTP response header field of | | |||
| HTTP response header field of: | | | Include-Referred-Token-Binding-ID:true. | | |||
| Include-Referred-Token-Binding-ID:true | | | Any security-relevant cookies | | | |||
| any security-relevant cookies | | | | should contain TBID1. | | | |||
| should contain TBID1 | | | +<- - - - - - - - - - - - - - - - | | | |||
+<- - - - - - - - - - - - - - - - | | | . | (redirect to TP via 301, 302, | | | |||
. | (redirect to TP via 301, 302, | | | . | 303, 307, or 308) | | | |||
. | 303, 307, or 308) | | | . | | | | |||
. | | | | +------------------------------------------------------->| | |||
+------------------------------------------------------->| | | 1b. opens HTTPS w/TP, | | |||
| 1b. opens HTTPS w/TP, | | | establishes Ks2, Kp2, TBID2; | | |||
| establishes Ks2, Kp2, TBID2; | | | sends a GET or POST with | | |||
| sends GET or POST with | | | ETBMSG[[{EKM2}Ks2,TBID2,provided_token_binding], | | |||
| ETBMSG[[{EKM2}Ks2,TBID2,provided_token_binding], | | | [{EKM2}Ks1,TBID1,referred_token_binding]] | | |||
| [{EKM2}Ks1,TBID1,referred_token_binding]] | | | as well as the ID Token request | | |||
| as well as the ID Token request | | | | | | |||
| | | | | | | | |||
| | | | | | | | |||
| | | | | 2. user authentication (if applicable; | | |||
| 2. user authentication (if applicable, | | | methods vary; particulars are out of scope) | | |||
| methods vary, particulars are out of scope) | | |<====================================================>| | |||
|<====================================================>| | | (TP generates ID Token for TC containing TBID1; may | | |||
| (TP generates ID Token for TC containing TBID1, may | | | also set cookie(s) containing TBID2 and/or TBID1; | | |||
| also set cookie(s) containing TBID2 and/or TBID1, | | | details vary; particulars are out of scope) | | |||
| details vary, particulars are out of scope) | | | | | | |||
| | | | | | | | |||
| | | | | | | | |||
| | | | | 3a. ID Token containing Kp1, issued for TC, | | |||
| 3a. ID Token containing Kp1, issued for TC, | | | conveyed via OIDC "Authentication Response" | | |||
| conveyed via OIDC "Authentication Response" | | +<- - - - - - - - - - - - - - - - - - - - - - - - - - - -| | |||
+<- - - - - - - - - - - - - - - - - - - - - - - - - - - -| | . | (redirect to TC) | | | |||
. | (redirect to TC) | | | . | | | | |||
. | | | | . | | | | |||
. | | | | +-------------------------------->| | | |||
+-------------------------------->| | | | 3b. HTTPS GET or POST with | | |||
| 3b. HTTPS GET or POST with | | | ETBMSG[[{EKM1}Ks1,TBID1,provided_token_binding]] | | |||
| ETBMSG[[{EKM1}Ks1,TBID1,provided_token_binding]] | | | conveying an Authentication Response containing | | |||
| conveying Authn Response containing | | | an ID Token w/TBID1, issued for TC | | |||
| ID Token w/TBID1, issued for TC | | | | | | |||
| | | | | | | | |||
| | | | | | | | |||
| | | | | 4. user is signed on; any security-relevant cookie(s)| | |||
| 4. user is signed-on, any security-relevant cookie(s)| | | that is set SHOULD contain TBID1 | | |||
| that are set SHOULD contain TBID1 | | |<------------------------------| | | |||
|<------------------------------| | | | | | | |||
| | | | | | | | |||
| | | | ||||
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, Token Binding implementations should provide APIs for such | Thus, Token Binding implementations should provide APIs for such | |||
applications to generate Token Binding messages containing Token | applications to generate Token Binding messages containing Token | |||
Binding IDs of various application-specified Token Binding types, to | Binding IDs of various application-specified Token Binding types, to | |||
be conveyed by the Sec-Token-Binding header field. | be conveyed by the Sec-Token-Binding header field. | |||
However, Token Binding implementations MUST only convey Token Binding | However, Token Binding implementations MUST only convey Token Binding | |||
IDs to servers if signaled to do so by an application. For example, | IDs to servers if signaled to do so by an application. Signaling | |||
a server can return an Include-Referred-Token-Binding-ID HTTP | mechanisms other than the Include-Referred-Token-Binding-ID HTTP | |||
response header field to an application, which then signals to the | response header field are possible, but these mechanisms are outside | |||
Token Binding implementation that it intends to convey the Token | the scope of this specification. | |||
Binding ID used with this server to another server. Other signaling | ||||
mechanisms are possible, and are specific to the application layer | ||||
protocol, but are outside the scope 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 the 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 to 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. | |||
This consideration is a special case of the Security Token Replay | This consideration is a special case of the scenario described in | |||
security consideration laid out in the The Token Binding Protocol | Section 7.1 ("Security Token Replay") of [RFC8471]. | |||
[I-D.ietf-tokbind-protocol] specification. | ||||
7.2. 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 must keep its Token Binding private key | |||
secret by the client. If the private key is not secret, then another | secret. If the private key is not secret, then another actor in the | |||
actor in the system could create a valid Token Binding header field, | system could create a valid Token Binding header field and thereby | |||
impersonating the client. This can render the main purpose of the | impersonate the client. This can render the main purpose of the | |||
protocol - to bind bearer tokens to certain clients - moot. | protocol -- to bind bearer tokens to certain clients -- moot. | |||
Consider, for example, an attacker who obtained (perhaps through a | Consider, for example, an attacker who obtained (perhaps through a | |||
network intrusion) an authentication cookie that a client uses with a | network intrusion) an authentication cookie that a client uses with a | |||
certain server. Consider further that the server bound that cookie | certain server. Consider further that the server bound that cookie | |||
to the client's Token Binding ID precisely to thwart misuse of the | to the client's Token Binding ID precisely to thwart misuse of the | |||
cookie. If the attacker were to come into possession of the client's | cookie. If the attacker were to come into possession of the client's | |||
private key, he could then establish a TLS connection with the server | private key, they could then establish a TLS connection with the | |||
and craft a Sec-Token-Binding header field that matches the binding | server and craft a Sec-Token-Binding header field that matches the | |||
present in the cookie, thus successfully authenticating as the | binding present in the cookie, thus successfully authenticating as | |||
client, and gaining access to the client's data at the server. The | the client and gaining access to the client's data at the server. | |||
Token Binding protocol, in this case, did not successfully bind the | The Token Binding protocol, in this case, did not successfully bind | |||
cookie to the client. | the cookie to the client. | |||
Likewise, we need integrity protection of the Sec-Token-Binding | Likewise, we need integrity protection of the Sec-Token-Binding | |||
header field. A client should not be tricked into sending a Sec- | header field. A client should not be tricked into sending to a | |||
Token-Binding header field to a server that contains Token Binding | server a Sec-Token-Binding header field that contains Token Bindings | |||
messages about key pairs that the client does not control. Consider | signed with any Token Binding keys that the client does not control. | |||
an attacker A that somehow has knowledge of the exported keying | ||||
material (EKM) for a TLS connection between a client C and a server | ||||
S. (While that is somewhat unlikely, it is also not entirely out of | ||||
the question, since the client might not treat the EKM as a secret - | ||||
after all, a pre-image-resistant hash function has been applied to | ||||
the TLS master secret, making it impossible for someone knowing the | ||||
EKM to recover the TLS master secret. Such considerations might lead | ||||
some clients to not treat the EKM as a secret.) Such an attacker A | ||||
could craft a Sec-Token-Binding header field with A's key pair over | ||||
C's EKM. If the attacker could now trick C into sending such a | ||||
header field to S, it would appear to S as if C controls a certain | ||||
key pair, when in fact it does not (the attacker A controls the key | ||||
pair). | ||||
If A has a pre-existing relationship with S (perhaps has an account | Consider an attacker A that somehow has knowledge of the Exported | |||
on S), it now appears to the server S as if A is connecting to it, | Keying Material (EKM) for a TLS connection between a client C and a | |||
even though it is really C. (If the server S does not simply use | server S. (While that is somewhat unlikely, it is also not entirely | |||
Token Binding IDs to identify clients, but also uses bound | out of the question, since the client might not treat the EKM as a | |||
secret -- after all, a pre-image-resistant hash function has been | ||||
applied to the TLS master secret, making it impossible for someone | ||||
knowing the EKM to recover the TLS master secret. Such | ||||
considerations might lead some clients to not treat the EKM as a | ||||
secret.) Such an attacker A could craft a Sec-Token-Binding header | ||||
field with A's key pair over C's EKM. If the attacker could now | ||||
trick C into sending such a header field to S, it would appear to S | ||||
as if C controls a certain key pair, when in fact it does not (the | ||||
attacker A controls the key pair). | ||||
If A has a pre-existing relationship with S (e.g., perhaps has an | ||||
account 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 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, in this | |||
into logging into A's account on S. This could lead to a loss of | scenario, A can trick C into logging into A's account on S. This | |||
privacy for C, since A presumably has some other way to also access | could lead to a loss of privacy for C, since A presumably has some | |||
the account, and can thus indirectly observe C's behavior (for | other way to also access the account and can thus indirectly observe | |||
example, if S has a feature that lets account holders see their | C's behavior (for example, if S has a feature that lets account | |||
activity history on S). | holders see their 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 | |||
Binding header field (through a DOM API or otherwise) that the User | Sec-Token-Binding header field (through a Document Object Model (DOM) | |||
API [W3C.REC-DOM-Level-3-Core-20040407] 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 as a "forbidden header name"; see [fetch-spec]. | |||
7.3. 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-on 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. | |||
Both proofs (that of the provided Token Binding private key and that | Both proofs (that of the provided Token Binding private key and that | |||
of the referred Token Binding private key) are necessary. To show | of the referred Token Binding private key) are necessary. To show | |||
this, consider the following scenario: | this, consider the following scenario: | |||
o The client has an authentication token with the Token Provider | o The client has an authentication token with the Token Provider | |||
that is bound to the client's Token Binding ID used with that | that is bound to the client's Token Binding ID used with that | |||
Token Provider. | Token Provider. | |||
o The client wants to establish a secure (i.e., free of men-in-the- | o The client wants to establish a secure (i.e., free of men-in-the- | |||
middle) authenticated session with the Token Consumer, but has not | middle) authenticated session with the Token Consumer but has not | |||
done so yet (in other words, we are about to run the federated | yet done so (in other words, we are about to run the federated | |||
sign-on protocol). | sign-on protocol). | |||
o A man-in-the-middle is allowed to intercept the connection between | o A man-in-the-middle is allowed to intercept the connection between | |||
client and Token Consumer or between Client and Token Provider (or | the client and the Token Consumer or between the client and the | |||
both). | Token Provider (or both). | |||
The goal is to detect the presence of the man-in-the-middle in these | The goal is to detect the presence of the man-in-the-middle in these | |||
scenarios. | scenarios. | |||
First, consider a man-in-the-middle between the client and the Token | First, consider a man-in-the-middle between the client and the Token | |||
Provider. Recall that we assume that the client possesses a bound | Provider. Recall that we assume that the client possesses a bound | |||
authentication token (e.g., cookie) for the Token Provider. The man- | authentication token (e.g., cookie) for the Token Provider. The | |||
in-the-middle can intercept and modify any message sent by the client | man-in-the-middle can intercept and modify any message sent by the | |||
to the Token Provider, and any message sent by the Token Provider to | client to the Token Provider and any message sent by the Token | |||
the client. (This means, among other things, that the man-in-the- | Provider to the client. (This means, among other things, that the | |||
middle controls the Javascript running at the client in the origin of | man-in-the-middle controls the JavaScript running at the client in | |||
the Token Provider.) It is not, however, in possession of the | the origin of the Token Provider.) It is not, however, in possession | |||
client's Token Binding private key. Therefore, it can either choose | of the client's Token Binding private key. Therefore, it can choose | |||
to replace the Token Binding ID in requests from the client to the | to either (1) replace the Token Binding ID in requests from the | |||
Token Provider, and create a Sec-Token-Binding header field that | client to the Token Provider and create a Sec-Token-Binding header | |||
matches the TLS connection between the man-in-the-middle and the | field that matches the TLS connection between the man-in-the-middle | |||
Token Provider, or it can choose to leave the Sec-Token-Binding | and the Token Provider or (2) leave the Sec-Token-Binding header | |||
header field unchanged. If it chooses the latter, the signature in | field unchanged. If it chooses the latter, the signature in the | |||
the Token Binding message (created by the original client on the | Token Binding message (created by the original client on the EKM for | |||
exported keying material (EKM) for the connection between client and | the connection between the client and the man-in-the-middle) will not | |||
man-in-the-middle) will not match a signature on the EKM between man- | match a signature on the EKM between the man-in-the-middle and the | |||
in-the-middle and the Token Provider. If it chooses the former (and | Token Provider. If it chooses the former (and creates its own | |||
creates its own signature, using its own Token Binding private key, | signature, using its own Token Binding private key, over the EKM for | |||
over the EKM for the connection between itself, the man-in-the- | the connection between itself, the man-in-the-middle, and the Token | |||
middle, and Token Provider), then the Token Binding message will | Provider), then the Token Binding message will match the connection | |||
match the connection between man-in-the-middle and Token Provider, | between the man-in-the-middle and the Token Provider, but the Token | |||
but the Token Binding ID in the message will not match the Token | Binding ID in the message will not match the Token Binding ID that | |||
Binding ID that the client's authentication token is bound to. | the client's authentication token is bound to. Either way, the | |||
Either way, the man-in-the-middle is detected by the Token Provider, | man-in-the-middle is detected by the Token Provider, but only if the | |||
but only if the proof of possession of the provided Token Binding | proof of possession of the provided Token Binding private key is | |||
private key is required in the protocol (as is done above). | required in the protocol (as is done above). | |||
Next, consider the presence of a man-in-the-middle between client and | Next, consider the presence of a man-in-the-middle between the client | |||
Token Consumer. That man-in-the-middle can intercept and modify any | and the Token Consumer. That man-in-the-middle can intercept and | |||
message sent by the client to the Token Consumer and any message sent | modify any message sent by the client to the Token Consumer and any | |||
by the Token Consumer to the client. The Token Consumer is the party | message sent by the Token Consumer to the client. The Token Consumer | |||
that redirects the client to the Token Provider. In this case, the | is the party that redirects the client to the Token Provider. In | |||
man-in-the-middle controls the redirect URL and can tamper with any | this case, the man-in-the-middle controls the redirect URL and can | |||
redirect URL issued by the Token Consumer (as well as with any | tamper with any redirect URL issued by the Token Consumer (as well as | |||
Javascript running in the origin of the Token Consumer). The goal of | with any JavaScript running in the origin of the Token Consumer). | |||
the man-in-the-middle is to trick the Token Provider into issuing a | The goal of the man-in-the-middle is to trick the Token Provider into | |||
token bound to its Token Binding ID, not to the Token Binding ID of | issuing a token bound to its Token Binding ID and not to the Token | |||
the legitimate client. To thwart this goal of the man-in-the-middle, | Binding ID of the legitimate client. To thwart this goal of the | |||
the client's referred Token Binding ID must be communicated to the | man-in-the-middle, the client's Referred Token Binding ID must be | |||
Token Producer in a manner that cannot be affected by the man-in-the- | communicated to the Token Provider in a manner that cannot be | |||
middle (who, as we recall, can modify redirect URLs and Javascript at | affected by the man-in-the-middle (who, as mentioned above, can | |||
the client). Including the referred Token Binding structure in the | modify redirect URLs and JavaScript at the client). Including the | |||
Sec-Token-Binding header field (as opposed to, say, including the | referred TokenBinding structure in the Sec-Token-Binding header field | |||
referred Token Binding ID in an application-level message as part of | (as opposed to, say, including the Referred Token Binding ID in an | |||
the redirect URL) is one way to assure that the man-in-the-middle | application-level message as part of the redirect URL) is one way to | |||
between client and Token Consumer cannot affect the communication of | assure that the man-in-the-middle between the client and the Token | |||
the referred Token Binding ID to the Token Provider. | Consumer cannot affect the communication of the Referred Token | |||
Binding ID to the Token Provider. | ||||
Therefore, the Sec-Token-Binding header field in the federated sign- | Therefore, the Sec-Token-Binding header field in the federated | |||
on use case contains both: a proof of possession of the provided | sign-on use case contains both a proof of possession of the provided | |||
Token Binding key, as well as a proof of possession of the referred | Token Binding key and a proof of possession of the referred Token | |||
Token Binding key. | Binding key. | |||
Note that the presence of Token Binding does not relieve the Token | Note that the presence of Token Binding does not relieve the Token | |||
Provider and Token Consumer from performing various checks to ensure | Provider and Token Consumer from performing various checks to ensure | |||
the security of clients during federated sign-on protocols. These | the security of clients during the use of federated sign-on | |||
include the following: | protocols. These include the following: | |||
o The Token Provider should not issue tokens to Token Consumers that | o The Token Provider should not issue tokens to Token Consumers that | |||
have been shown to act maliciously. To aid in this, the | have been shown to act maliciously. To aid in this, the | |||
federation protocol should identify the Token Consumer to the | federation protocol should identify the Token Consumer to the | |||
Token Provider (e.g., through OAuth client IDs or similar | Token Provider (e.g., through OAuth client IDs or similar | |||
mechanisms), and the Token Provider should ensure that tokens are | mechanisms), and the Token Provider should ensure that tokens are | |||
indeed issued to the Token Consumer identified in the token | indeed issued to the Token Consumer identified in the token | |||
request (e.g., by verifying that the redirect URI is associated | request (e.g., by verifying that the redirect URI is associated | |||
with the OAuth client ID.) | with the OAuth client ID). | |||
o The Token Consumer should verify that the tokens were issued for | o The Token Consumer should verify that the tokens were issued for | |||
it, and not some other token consumer. To aid in this, the | it and not for some other Token Consumer. To aid in this, the | |||
federation protocol should include an audience parameter in the | federation protocol should include an audience parameter in the | |||
token response, or apply equivalent mechanisms (the implicit OAuth | token response or apply equivalent mechanisms (the implicit OAuth | |||
flow requires Token Consumers to identify themselves when they | flow requires Token Consumers to identify themselves when they | |||
exchange OAuth authorization codes for OAuth refresh tokens, | exchange OAuth authorization codes for OAuth refresh tokens, | |||
leaving it up to the Token Provider to verify that the OAuth | leaving it up to the Token Provider to verify that the OAuth | |||
authorization was delivered to the correct Token Consumer). | authorization was delivered to the correct Token Consumer). | |||
8. Privacy Considerations | 8. Privacy Considerations | |||
8.1. Scoping of Token Binding Key Pairs | 8.1. Scoping of Token Binding Key Pairs | |||
Clients use different Token Binding key pairs for different servers, | Clients use different Token Binding key pairs for different servers, | |||
so as to not allow Token Binding to become a tracking tool across | so as to not allow Token Binding to become a tracking tool across | |||
different servers. However, the scoping of the Token Binding key | different servers. However, the scoping of the Token Binding key | |||
pairs to servers varies according to the scoping rules of the | pairs to servers varies according to the scoping rules of the | |||
application protocol (Section 4.1 of [I-D.ietf-tokbind-protocol]). | application protocol (Section 4.1 of [RFC8471]). | |||
In the case of HTTP cookies, servers may use Token Binding to secure | In the case of HTTP cookies, servers may use Token Binding to secure | |||
their cookies. These cookies can be attached to any sub-domain of | their cookies. These cookies can be attached to any subdomain of | |||
effective top-level domains (eTLDs), and clients therefore should use | effective top-level domains (eTLDs), and clients therefore should use | |||
the same Token Binding key pair across such subdomains. This will | the same Token Binding key pair across such subdomains. This will | |||
ensure that any server capable of receiving the cookie will see the | ensure that any server capable of receiving the cookie will see the | |||
same Token Binding ID from the client, and thus be able to verify the | same Token Binding ID from the client and thus be able to verify the | |||
token binding of the cookie. See Section 2.1, above. | Token Binding of the cookie. See Section 2.1 above. | |||
If the client application is not a Web browser, it may have | If the client application is not a web browser, it may have | |||
additional knowledge about the relationship between different | additional knowledge about the relationship between different | |||
servers. For example, the client application might be aware of the | servers. For example, the client application might be aware of the | |||
fact that two servers play the role of Relying Party and Identity | fact that two servers play the roles of Relying Party and Identity | |||
Provider in a federated sign-on protocol, and that they therefore | Provider, respectively, in a federated sign-on protocol and that they | |||
share the identity of the user. In such cases, it is permissible to | therefore share the identity of the user. In such cases, it is | |||
use different Token Binding key pair scoping rules, such as using the | permissible to use different Token Binding key-pair scoping rules, | |||
same Token Binding key pair for both the Relying Party and the | such as using the same Token Binding key pair for both the Relying | |||
Identity Provider. Absent such special knowledge, conservative key- | Party and the Identity Provider. Absent such special knowledge, | |||
scoping rules should be used, assuring that clients use different | conservative key-pair scoping rules should be used, assuring that | |||
Token Binding key pairs with different servers. | clients use different Token Binding key pairs with different servers. | |||
8.2. Lifetime of Token Binding Key Pairs | 8.2. Lifetime of Token Binding Key Pairs | |||
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). | controls provided for deleting 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 MUST also discard | discarded after the session is over, the User Agent MUST also discard | |||
Token Binding key pairs from such modes after the session is over. | Token Binding key pairs from such modes after the session is over. | |||
Generally speaking, users should be given the same level of control | Generally speaking, users should be given the same level of control | |||
over lifetime of Token Binding key pairs as they have over cookies or | over the lifetime of Token Binding key pairs as they have over | |||
other potential tracking mechanisms. | cookies or 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 | |||
side components, communicating over HTTPS, where the client side may | server-side components, communicating over HTTPS, where the client | |||
be either or both Web browser-based or native application-based.) | side may be web-browser-based, native-application-based, or both.) | |||
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, then also having Token Binding IDs for | |||
connections does not provide additional correlation information. If | these connections does not provide additional correlation | |||
not, then, by providing the other Token Binding IDs, additional | information. If not, by providing the other Token Binding IDs, | |||
information is exposed that can be used to correlate the other | additional information is then exposed that can be used to correlate | |||
endpoints. In such cases, a privacy analysis of enabled correlations | the other endpoints. In such cases, a privacy analysis of enabled | |||
and their potential privacy impacts should be performed as part of | correlations and their potential privacy impacts should be performed | |||
the application design decisions of how, and whether, to utilize | as part of the application design decisions of how, and whether, to | |||
Token Binding. | utilize Token Binding. | |||
Also, Token Binding implementations must take care to only reveal | Also, Token Binding implementations must take care to only reveal | |||
Token Binding IDs to other endpoints if the application associated | Token Binding IDs to other endpoints if signaled to do so by the | |||
with a Token Binding ID signals to do so, see Section 6 | application associated with a Token Binding ID; see Section 6 | |||
("Implementation Considerations"). | ("Implementation Considerations"). | |||
Finally, care should be taken to ensure that unrelated applications | Finally, care should be taken to ensure that unrelated applications | |||
do not obtain information about each other's Token Bindings. For | do not obtain information about each other's Token Bindings. For | |||
instance, a Token Binding implementation shared between multiple | instance, a Token Binding implementation shared between multiple | |||
applications on a given system should prevent unrelated applications | applications on a given system should prevent unrelated applications | |||
from obtaining each other's Token Binding information. This may be | from obtaining each other's Token Binding information. This may be | |||
accomplished by using techniques such as application isolation and | accomplished by using techniques such as application isolation and | |||
key segregation, depending upon system capabilities. | key segregation, depending upon system capabilities. | |||
9. IANA Considerations | 9. IANA Considerations | |||
Below are the Internet Assigned Numbers Authority (IANA) Permanent | Below is the Internet Assigned Numbers Authority (IANA) "Permanent | |||
Message Header Field registration information per [RFC3864]. | Message Header Field Names" registration information per [RFC3864]. | |||
Header field name: Sec-Token-Binding | ||||
Applicable protocol: HTTP | ||||
Status: standard | ||||
Author/Change controller: IETF | ||||
Specification document(s): this one | ||||
Header field name: Include-Referred-Token-Binding-ID | ||||
Applicable protocol: HTTP | ||||
Status: standard | ||||
Author/Change controller: IETF | ||||
Specification document(s): this one | ||||
10. Acknowledgements | ||||
This document incorporates comments and suggestions offered by Eric | ||||
Rescorla, Gabriel Montenegro, Martin Thomson, Vinod Anupam, Anthony | ||||
Nadalin, Michael B. Jones, Bill Cox, Brian Campbell, and others. | ||||
This document was produced under the chairmanship of John Bradley and | ||||
Leif Johansson. The area directors included Eric Rescorla, Kathleen | ||||
Moriarty and Stephen Farrell. | ||||
11. References | Header Field name: Sec-Token-Binding | |||
Protocol: HTTP | ||||
Status: standard | ||||
Reference: This document | ||||
11.1. Normative References | Header Field name: Include-Referred-Token-Binding-ID | |||
Protocol: HTTP | ||||
Status: standard | ||||
Reference: This document | ||||
[I-D.ietf-tokbind-negotiation] | 10. References | |||
Popov, A., Nystrom, M., Balfanz, D., and A. Langley, | ||||
"Transport Layer Security (TLS) Extension for Token | ||||
Binding Protocol Negotiation", draft-ietf-tokbind- | ||||
negotiation-14 (work in progress), May 2018. | ||||
[I-D.ietf-tokbind-protocol] | 10.1. Normative References | |||
Popov, A., Nystrom, M., Balfanz, D., Langley, A., and J. | ||||
Hodges, "The Token Binding Protocol Version 1.0", draft- | ||||
ietf-tokbind-protocol-19 (work in progress), May 2018. | ||||
[PSL] Mozilla, "Public Suffix List, https://publicsuffix.org/", | [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 13 ¶ | skipping to change at page 23, line 27 ¶ | |||
<https://www.rfc-editor.org/info/rfc7231>. | <https://www.rfc-editor.org/info/rfc7231>. | |||
[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 | [RFC8471] Popov, A., Ed., Nystroem, M., Balfanz, D., and J. Hodges, | |||
"The Token Binding Protocol Version 1.0", RFC 8471, | ||||
DOI 10.17487/RFC8471, October 2018, | ||||
<https://www.rfc-editor.org/info/rfc8471>. | ||||
[RFC8472] Popov, A., Ed., Nystroem, M., and D. Balfanz, "Transport | ||||
Layer Security (TLS) Extension for Token Binding Protocol | ||||
Negotiation", RFC 8472, DOI 10.17487/RFC8472, October | ||||
2018, <https://www.rfc-editor.org/info/rfc8472>. | ||||
10.2. Informative References | ||||
[fetch-spec] | [fetch-spec] | |||
WhatWG, "Fetch", Living Standard , | WhatWG, "Fetch", Living Standard, | |||
<https://fetch.spec.whatwg.org/>. | <https://fetch.spec.whatwg.org/>. | |||
[I-D.ietf-tokbind-tls13] | ||||
Harper, N., "Token Binding for Transport Layer Security | ||||
(TLS) Version 1.3 Connections", draft-ietf-tokbind- | ||||
tls13-01 (work in progress), May 2018. | ||||
[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 Protocols for the OASIS Security Assertion | |||
Markup Language (SAML) V2.0", OASIS Standard saml-core- | Markup Language (SAML) V2.0", OASIS Standard | |||
2.0-os, March 2005, <http://docs.oasis- | saml-core-2.0-os, March 2005, <http://docs.oasis-open.org/ | |||
open.org/security/saml/v2.0/saml-core-2.0-os.pdf>. | security/saml/v2.0/saml-core-2.0-os.pdf>. | |||
[OASIS.saml-prof-2.0-os] | ||||
Hughes, J., Ed., Cantor, S., Ed., Hodges, J., Ed., Hirsch, | ||||
F., Ed., Mishra, P., Ed., Philpott, R., Ed., and E. Maler, | ||||
Ed., "Profiles for the OASIS Security Assertion Markup | ||||
Language (SAML) V2.0", OASIS Standard | ||||
OASIS.saml-profiles-2.0-os, March 2005, | ||||
<http://docs.oasis-open.org/security/ | ||||
saml/v2.0/saml-profiles-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 incorporating | |||
errata set 1", November 2014, | ||||
<http://openid.net/specs/openid-connect-core-1_0.html>. | <http://openid.net/specs/openid-connect-core-1_0.html>. | |||
[RFC5746] Rescorla, E., Ray, M., Dispensa, S., and N. Oskov, | ||||
"Transport Layer Security (TLS) Renegotiation Indication | ||||
Extension", RFC 5746, DOI 10.17487/RFC5746, February 2010, | ||||
<https://www.rfc-editor.org/info/rfc5746>. | ||||
[RFC6749] Hardt, D., Ed., "The OAuth 2.0 Authorization Framework", | [RFC6749] Hardt, D., Ed., "The OAuth 2.0 Authorization Framework", | |||
RFC 6749, DOI 10.17487/RFC6749, October 2012, | RFC 6749, DOI 10.17487/RFC6749, October 2012, | |||
<https://www.rfc-editor.org/info/rfc6749>. | <https://www.rfc-editor.org/info/rfc6749>. | |||
[RFC7540] Belshe, M., Peon, R., and M. Thomson, Ed., "Hypertext | [RFC7540] Belshe, M., Peon, R., and M. Thomson, Ed., "Hypertext | |||
Transfer Protocol Version 2 (HTTP/2)", RFC 7540, | Transfer Protocol Version 2 (HTTP/2)", RFC 7540, | |||
DOI 10.17487/RFC7540, May 2015, | DOI 10.17487/RFC7540, May 2015, | |||
<https://www.rfc-editor.org/info/rfc7540>. | <https://www.rfc-editor.org/info/rfc7540>. | |||
[RFC7627] Bhargavan, K., Ed., Delignat-Lavaud, A., Pironti, A., | [TOKENBIND-TLS13] | |||
Langley, A., and M. Ray, "Transport Layer Security (TLS) | Harper, N., "Token Binding for Transport Layer Security | |||
Session Hash and Extended Master Secret Extension", | (TLS) Version 1.3 Connections", Work in Progress, | |||
RFC 7627, DOI 10.17487/RFC7627, September 2015, | draft-ietf-tokbind-tls13-01, May 2018. | |||
<https://www.rfc-editor.org/info/rfc7627>. | ||||
[TRIPLE-HS] | [W3C.REC-DOM-Level-3-Core-20040407] | |||
Bhargavan, K., Delignat-Lavaud, A., Fournet, C., Pironti, | Le Hors, A., Ed., Le Hegaret, P., Ed., Wood, L., Ed., | |||
A., and P. Strub, "Triple Handshakes and Cookie Cutters: | Nicol, G., Ed., Robie, J., Ed., Champion, M., Ed., and S. | |||
Breaking and Fixing Authentication over TLS. IEEE | Byrne, Ed., "Document Object Model (DOM) Level 3 Core | |||
Symposium on Security and Privacy", 2014. | Specification", World Wide Web Consortium Recommendation | |||
REC-DOM-Level-3-Core-20040407, April 2004, | ||||
<https://www.w3.org/TR/2004/ | ||||
REC-DOM-Level-3-Core-20040407>. | ||||
Acknowledgements | ||||
This document incorporates comments and suggestions offered by Eric | ||||
Rescorla, Gabriel Montenegro, Martin Thomson, Vinod Anupam, Anthony | ||||
Nadalin, Michael B. Jones, Bill Cox, Brian Campbell, and others. | ||||
This document was produced under the chairmanship of John Bradley and | ||||
Leif Johansson. The area directors included Eric Rescorla, Kathleen | ||||
Moriarty, and Stephen Farrell. | ||||
Authors' Addresses | Authors' Addresses | |||
Andrei Popov | Andrei Popov | |||
Microsoft Corp. | Microsoft Corp. | |||
USA | United States of America | |||
Email: andreipo@microsoft.com | Email: andreipo@microsoft.com | |||
Magnus Nystroem | Magnus Nystroem | |||
Microsoft Corp. | Microsoft Corp. | |||
USA | United States of America | |||
Email: mnystrom@microsoft.com | Email: mnystrom@microsoft.com | |||
Dirk Balfanz (editor) | Dirk Balfanz (editor) | |||
Google Inc. | Google Inc. | |||
USA | United States of America | |||
Email: balfanz@google.com | Email: balfanz@google.com | |||
Adam Langley | ||||
Google Inc. | ||||
USA | ||||
Email: agl@google.com | ||||
Nick Harper | Nick Harper | |||
Google Inc. | Google Inc. | |||
USA | United States of America | |||
Email: nharper@google.com | Email: nharper@google.com | |||
Jeff Hodges | Jeff Hodges | |||
PayPal | Kings Mountain Systems | |||
USA | United States of America | |||
Email: Jeff.Hodges@paypal.com | Email: Jeff.Hodges@KingsMountain.com | |||
End of changes. 145 change blocks. | ||||
592 lines changed or deleted | 597 lines changed or added | |||
This html diff was produced by rfcdiff 1.47. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |