draft-ietf-tokbind-https-00.txt   draft-ietf-tokbind-https-01.txt 
Internet Engineering Task Force A. Popov Internet Engineering Task Force A. Popov
Internet-Draft M. Nystroem Internet-Draft M. Nystroem
Intended status: Standards Track Microsoft Corp. Intended status: Standards Track Microsoft Corp.
Expires: September 28, 2015 D. Balfanz, Ed. Expires: January 1, 2016 D. Balfanz, Ed.
A. Langley A. Langley
Google Inc. Google Inc.
March 27, 2015 June 30, 2015
Token Binding over HTTP Token Binding over HTTP
draft-ietf-tokbind-https-00 draft-ietf-tokbind-https-01
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 authentication tokens (such as servers to cryptographically bind authentication tokens (such as
cookies and OAuth tokens) to a TLS [RFC5246] connection. cookies and OAuth tokens) to a TLS [RFC5246] connection.
We describe both _first-party_ as well as _federated_ scenarios. In We describe both _first-party_ as well as _federated_ scenarios. In
a first-party scenario, an HTTP server issues a security token (such a first-party scenario, an HTTP server issues a security token (such
as a cookie) to a client, and expects the client to send the security as a cookie) to a client, and expects the client to send the security
skipping to change at page 2, line 4 skipping to change at page 2, line 4
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on September 28, 2015. This Internet-Draft will expire on January 1, 2016.
Copyright Notice Copyright Notice
Copyright (c) 2015 IETF Trust and the persons identified as the Copyright (c) 2015 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
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1. Requirements Language . . . . . . . . . . . . . . . . . . 3 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 3
2. The Token-Binding Header . . . . . . . . . . . . . . . . . . 3 2. The Sec-Token-Binding Header . . . . . . . . . . . . . . . . 3
3. Federation Use Cases . . . . . . . . . . . . . . . . . . . . 4 3. Federation Use Cases . . . . . . . . . . . . . . . . . . . . 4
3.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 4 3.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 4
3.2. Overview . . . . . . . . . . . . . . . . . . . . . . . . 4 3.2. Overview . . . . . . . . . . . . . . . . . . . . . . . . 4
3.3. HTTP Redirects . . . . . . . . . . . . . . . . . . . . . 5 3.3. HTTP Redirects . . . . . . . . . . . . . . . . . . . . . 6
3.4. Cross-Origin Resource Sharing . . . . . . . . . . . . . . 6 3.4. Negotiated Key Parameters . . . . . . . . . . . . . . . . 6
3.5. Negotiated Key Parameters . . . . . . . . . . . . . . . . 7
4. Security Considerations . . . . . . . . . . . . . . . . . . . 7 4. Security Considerations . . . . . . . . . . . . . . . . . . . 7
4.1. Security Token Replay . . . . . . . . . . . . . . . . . . 7 4.1. Security Token Replay . . . . . . . . . . . . . . . . . . 7
4.2. Privacy Considerations . . . . . . . . . . . . . . . . . 7 4.2. Privacy Considerations . . . . . . . . . . . . . . . . . 7
4.3. Triple Handshake Vulnerability in TLS . . . . . . . . . . 8 4.3. Triple Handshake Vulnerability in TLS . . . . . . . . . . 7
5. References . . . . . . . . . . . . . . . . . . . . . . . . . 8 5. References . . . . . . . . . . . . . . . . . . . . . . . . . 8
5.1. Normative References . . . . . . . . . . . . . . . . . . 8 5.1. Normative References . . . . . . . . . . . . . . . . . . 8
5.2. Informative References . . . . . . . . . . . . . . . . . 9 5.2. Informative References . . . . . . . . . . . . . . . . . 8
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 9 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 9
1. Introduction 1. Introduction
The Token Binding Protocol [TBPROTO] defines a Token Binding ID for a The Token Binding Protocol [TBPROTO] defines a Token Binding ID for a
TLS connection between a client and a server. The Token Binding ID TLS connection between a client and a server. The Token Binding ID
of a TLS connection is related to a private key that the client of a TLS connection is related to a private key that the client
proves possession of to the server, and is long-lived (i.e., proves possession of to the server, and is long-lived (i.e.,
subsequent TLS connections between the same client and server have subsequent TLS connections between the same client and server have
the same Token Binding ID). When issuing a security token (e.g. an the same Token Binding ID). When issuing a security token (e.g. an
skipping to change at page 3, line 38 skipping to change at page 3, line 36
Token Binding ID that the client is using with a _different_ server Token Binding ID that the client is using with a _different_ server
than the one that the TokenBindingMessage is sent to. This is useful than the one that the TokenBindingMessage is sent to. This is useful
in federation scenarios. in federation 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", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [RFC2119]. document are to be interpreted as described in [RFC2119].
2. The Token-Binding Header 2. The Sec-Token-Binding Header
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 The Token Binding Protocol [TBPROTO]), with HTTP/1.1 or HTTP/2 (see The Token Binding Protocol [TBPROTO]),
clients MUST include the following header in their HTTP requests: clients MUST include the Sec-Token-Binding header in their HTTP
requests. The ABNF of the Sec-Token-Binding header is:
Token-Binding: EncodedTokenBindingMessage Sec-Token-Binding = "Sec-Token-Binding" ":" [CFWS] EncodedTokenBindingMessage
The EncodedTokenBindingMessage is a web-safe Base64-encoding of the The EncodedTokenBindingMessage is a web-safe Base64-encoding of the
TokenBindingMessage as defined in the TokenBindingProtocol [TBPROTO]. TokenBindingMessage as defined in the TokenBindingProtocol [TBPROTO].
The TokenBindingMessage MUST contain a TokenBinding with The TokenBindingMessage MUST contain a TokenBinding with
TokenBindingType provided_token_binding, which MUST be signed with TokenBindingType provided_token_binding, which MUST be signed with
the Token Binding key used by the client for connections between the Token Binding key used by the client for connections between
itself and the server that the HTTP request is sent to (clients use itself and the server that the HTTP request is sent to (clients use
different Token Binding keys for different servers). The Token different Token Binding keys for different servers). The Token
Binding ID established by this TokenBinding is called a _Provided Binding ID established by this TokenBinding is called a _Provided
skipping to change at page 4, line 35 skipping to change at page 4, line 33
that token to the TLS connection between the client and a Relying that token to the TLS connection between the client and a Relying
Party. 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) gives the client permission to reveal the Consumer_ in this document) gives the client permission to reveal the
Provided Token Binding ID that is used between the client and itself, Provided Token Binding ID that is used between the client and itself,
to another server (called the _Token Provider_ in this document). to another server (called the _Token Provider_ in this document).
Also common across the mechanisms is how the Token Binding ID is Also common across the mechanisms is how the Token Binding ID is
revealed to the Token Provider: The client uses the Token Binding revealed to the Token Provider: The client uses the Token Binding
Protocol [TBPROTO], and includes a TokenBinding structure in the Protocol [TBPROTO], and includes a TokenBinding structure in the Sec-
Token-Binding HTTP header defined above. What differs between the Token-Binding HTTP header defined above. What differs between the
various mechanisms is _how_ the Token Consumer grants the permission various mechanisms is _how_ the Token Consumer grants the permission
to reveal the Token Binding ID to the Token Provider. to reveal the Token Binding ID to the Token Provider. Below we
specify one such mechanism, which is suitable for redirect-based
interactions between Token Consumers and Token Providers.
3.2. Overview 3.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 (where the identity token is called "ID Token") and OpenID Connect (where the identity token is called "ID Token") and
SAML (where the identity token is a SAML assertion). SAML (where 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
skipping to change at page 5, line 24 skipping to change at page 5, line 24
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 the Token Binding ID of the TLS connection between the include in the token the Token-Binding public key that the client
client and the Token Consumer in the token. uses when communicating with the Token Consumer, thus _binding_
the token to client's Token-Binding keypair. The client proves
possession of the private key when communicating with the Token
Consumer through the Token Binding Protocol [TBPROTO], and reveals
the corresponding public key of this keypair as part of the Token
Binding ID. Comparing the public key from the token with the
public key from the Token Binding ID allows the Token Consumer to
verify that the token was sent to it by the legitimate client.
o That Token Binding ID must therefore be communicated to the Token o To allow the Token Provider to include the Token-Binding public
Provider along with the token request. Communicating a Token key in the token, the Token Binding ID (between client and Token
Binding ID involves proving possession of a private key and is Consumer) must therefore be communicated to the Token Provider
described in the Token Binding Protocol [TBPROTO]. along with the token request. Communicating a Token Binding ID
involves proving possession of a private key and is described in
the Token Binding Protocol [TBPROTO].
The client will perform this last operation (proving possession of a The client will perform this last operation (proving possession of a
private key that corresponds to a Token Binding ID between the client private key that corresponds to a Token Binding ID between the client
and the Token Consumer while delivering the token request to the and the Token Consumer while delivering the token request to the
Token Provider) only if the Token Consumer permits the client to do Token Provider) only if the Token Consumer permits the client to do
so. so.
Below, we will enumerate a number of mechanisms available to Token Below, we specify how Token Consumers can grant this permission.
Consumers to grant this permission. during redirect-based federation protocols.
3.3. HTTP Redirects 3.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 the following means to deliver the token request, it SHOULD include a Include-
HTTP response header in its HTTP response: Referer-Token-Binding-ID HTTP response header in its HTTP response.
The ABNF of the Include-Referer-Token-Binding-ID header is:
Include-Referer-Token-Binding-ID: true Include-Referer-Token-Binding-ID = "Include-Referer-Token-Binding-ID" ":"
[CFWS] %x74.72.75.65 ; "true", case-sensitive
Including this response header signals to the client that it should Including this response header signals to the client that it should
reveal the Token Binding ID used between the client and the Token reveal the Token Binding ID used between the client and the Token
Consumer to the Token Provider. In the absence of this response Consumer to the Token Provider. In the absence of this response
header, the client will not disclose any information about the Token header, the client will not disclose any information about the Token
Binding used between the client and the Token Consumer to the Token Binding used between the client and the Token Consumer to the Token
Provider. Provider.
This header has only meaning if the HTTP status code is 302 or 301, This header has only meaning if the HTTP status code is 302 or 301,
and MUST be ignored by the client for any other status codes. If the and MUST be ignored by the client for any other status codes. If the
client supports the Token Binding Protocol, and has negotiated the client supports the Token Binding Protocol, and has negotiated the
Token Binding Protocol with both the Token Consumer and the Token Token Binding Protocol with both the Token Consumer and the Token
Provider, it already sends the following header to the Token Provider Provider, it already sends the following header to the Token Provider
with each HTTP request (see above): with each HTTP request (see above):
Token-Binding: EncodedTokenBindingMessage Sec-Token-Binding: EncodedTokenBindingMessage
The TokenBindingMessage SHOULD contain a TokenBinding with The TokenBindingMessage SHOULD contain a TokenBinding with
TokenBindingType referred_token_binding. If included, this TokenBindingType referred_token_binding. If included, this
TokenBinding MUST be signed with the Token Binding key used by the TokenBinding MUST be signed with the Token Binding key used by the
client for connections between itself and the Token Consumer (more client for connections between itself and the Token Consumer (more
specifically, the web origin that issued the Include-Referer-Token- specifically, the web origin that issued the Include-Referer-Token-
Binding-ID response header). The Token Binding ID established by Binding-ID response header). The Token Binding ID established by
this TokenBinding is called a _Referred Token Binding ID_. this TokenBinding is called a _Referred Token Binding ID_.
As described above, the TokenBindingMessage MUST additionally contain As described above, the TokenBindingMessage MUST additionally contain
a Provided Token Binding ID, i.e., a TokenBinding structure with a Provided Token Binding ID, i.e., a TokenBinding structure with
TokenBindingType provided_token_binding, which MUST be signed with TokenBindingType provided_token_binding, which MUST be signed with
the Token Binding key used by the client for connections between the Token Binding key used by the client for connections between
itself and the Token Privider (more specifically, the web origin that itself and the Token Privider (more specifically, the web origin that
the token request sent to). the token request sent to).
3.4. Cross-Origin Resource Sharing 3.4. Negotiated Key Parameters
When issuing an XML HTTP request across origins to a Token Provider,
a Token Consumer can reveal its Token Binding ID through the
withRefererTokenBindingID property of the XmlHttpRequest object.
Example:
var xhr = new XMLHttpRequest();
xhr.withCredentials = true; // send cookies
xhr.withRefererTokenBindingID = true;
xhr.open(method, url, true);
The client SHOULD include the Token-Binding: header to the outgoing
request as described above if:
o the withRefererTokenBindingID property of the XmlHttpRequest
object is set to true, and
o the client has negotiated the Token Binding Protocol both with the
web origin that issued the XmlHttpRequest, and the web origin to
which the XmlHttpRequest is addressed.
3.5. Negotiated Key Parameters
The Token Binding Protocol [TBPROTO] allows the server and client to The Token Binding Protocol [TBPROTO] allows the server and client to
negotiate a signature algorithm used in the TokenBindingMessage. It negotiate a signature algorithm used in the TokenBindingMessage. It
is possible that the Token Binding ID used between the client and the is possible that the Token Binding ID used between the client and the
Token Consumer, and the Token Binding ID used between the client and Token Consumer, and the Token Binding ID used between the client and
Token Provider, use different signature algorithms. The client MUST Token Provider, use different signature algorithms. The client MUST
use the signature algorithm negotiated with the Token Consumer in the use the signature algorithm negotiated with the Token Consumer in the
referred_token_binding TokenBinding of the TokenBindingMessage, even referred_token_binding TokenBinding of the TokenBindingMessage, even
if that signature algorithm is different from the one negotiated with if that signature algorithm is different from the one negotiated with
the origin that the header is sent to. the origin that the header is sent to.
skipping to change at page 9, line 16 skipping to change at page 8, line 52
[I-D.ietf-httpbis-http2] [I-D.ietf-httpbis-http2]
Belshe, M., Peon, R., and M. Thomson, "Hypertext Transfer Belshe, M., Peon, R., and M. Thomson, "Hypertext Transfer
Protocol version 2", draft-ietf-httpbis-http2-17 (work in Protocol version 2", draft-ietf-httpbis-http2-17 (work in
progress), February 2015. progress), February 2015.
[I-D.ietf-tls-session-hash] [I-D.ietf-tls-session-hash]
Bhargavan, K., Delignat-Lavaud, A., Pironti, A., Langley, Bhargavan, K., Delignat-Lavaud, A., Pironti, A., Langley,
A., and M. Ray, "Transport Layer Security (TLS) Session A., and M. Ray, "Transport Layer Security (TLS) Session
Hash and Extended Master Secret Extension", draft-ietf- Hash and Extended Master Secret Extension", draft-ietf-
tls-session-hash-04 (work in progress), March 2015. tls-session-hash-05 (work in progress), April 2015.
[TRIPLE-HS] [TRIPLE-HS]
Bhargavan, K., Delignat-Lavaud, A., Fournet, C., Pironti, Bhargavan, K., Delignat-Lavaud, A., Fournet, C., Pironti,
A., and P. Strub, "Triple Handshakes and Cookie Cutters: A., and P. Strub, "Triple Handshakes and Cookie Cutters:
Breaking and Fixing Authentication over TLS. IEEE Breaking and Fixing Authentication over TLS. IEEE
Symposium on Security and Privacy", 2014. Symposium on Security and Privacy", 2014.
Authors' Addresses Authors' Addresses
Andrei Popov Andrei Popov
 End of changes. 21 change blocks. 
51 lines changed or deleted 42 lines changed or added

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