idnits 2.17.1 draft-ietf-tokbind-protocol-09.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** There are 2 instances of too long lines in the document, the longest one being 11 characters in excess of 72. ** The abstract seems to contain references ([RFC5246]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (August 26, 2016) is 2793 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Outdated reference: A later version (-18) exists of draft-ietf-tokbind-https-05 == Outdated reference: A later version (-14) exists of draft-ietf-tokbind-negotiation-03 ** Obsolete normative reference: RFC 3447 (Obsoleted by RFC 8017) ** Obsolete normative reference: RFC 5226 (Obsoleted by RFC 8126) ** Obsolete normative reference: RFC 5246 (Obsoleted by RFC 8446) ** Obsolete normative reference: RFC 7230 (Obsoleted by RFC 9110, RFC 9112) ** Obsolete normative reference: RFC 7540 (Obsoleted by RFC 9113) Summary: 7 errors (**), 0 flaws (~~), 3 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Internet Engineering Task Force A. Popov, Ed. 3 Internet-Draft M. Nystroem 4 Intended status: Standards Track Microsoft Corp. 5 Expires: February 27, 2017 D. Balfanz 6 A. Langley 7 Google Inc. 8 J. Hodges 9 Paypal 10 August 26, 2016 12 The Token Binding Protocol Version 1.0 13 draft-ietf-tokbind-protocol-09 15 Abstract 17 This document specifies Version 1.0 of the Token Binding protocol. 18 The Token Binding protocol allows client/server applications to 19 create long-lived, uniquely identifiable TLS [RFC5246] bindings 20 spanning multiple TLS sessions and connections. Applications are 21 then enabled to cryptographically bind security tokens to the TLS 22 layer, preventing token export and replay attacks. To protect 23 privacy, the Token Binding identifiers are only transmitted encrypted 24 and can be reset by the user at any time. 26 Status of This Memo 28 This Internet-Draft is submitted in full conformance with the 29 provisions of BCP 78 and BCP 79. 31 Internet-Drafts are working documents of the Internet Engineering 32 Task Force (IETF). Note that other groups may also distribute 33 working documents as Internet-Drafts. The list of current Internet- 34 Drafts is at http://datatracker.ietf.org/drafts/current/. 36 Internet-Drafts are draft documents valid for a maximum of six months 37 and may be updated, replaced, or obsoleted by other documents at any 38 time. It is inappropriate to use Internet-Drafts as reference 39 material or to cite them other than as "work in progress." 41 This Internet-Draft will expire on February 27, 2017. 43 Copyright Notice 45 Copyright (c) 2016 IETF Trust and the persons identified as the 46 document authors. All rights reserved. 48 This document is subject to BCP 78 and the IETF Trust's Legal 49 Provisions Relating to IETF Documents 50 (http://trustee.ietf.org/license-info) in effect on the date of 51 publication of this document. Please review these documents 52 carefully, as they describe your rights and restrictions with respect 53 to this document. Code Components extracted from this document must 54 include Simplified BSD License text as described in Section 4.e of 55 the Trust Legal Provisions and are provided without warranty as 56 described in the Simplified BSD License. 58 Table of Contents 60 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 61 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 3 62 2. Token Binding Protocol Overview . . . . . . . . . . . . . . . 3 63 3. Token Binding Protocol Message . . . . . . . . . . . . . . . 4 64 3.1. TokenBinding.tokenbinding_type . . . . . . . . . . . . . 6 65 3.2. TokenBinding.tokenbindingid . . . . . . . . . . . . . . . 6 66 3.3. TokenBinding.signature . . . . . . . . . . . . . . . . . 7 67 3.4. TokenBinding.extensions . . . . . . . . . . . . . . . . . 8 68 4. Establishing a Token Binding . . . . . . . . . . . . . . . . 8 69 4.1. Client Processing Rules . . . . . . . . . . . . . . . . . 8 70 4.2. Server Processing Rules . . . . . . . . . . . . . . . . . 9 71 5. Bound Security Token Creation and Validation . . . . . . . . 10 72 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 10 73 6.1. Token Binding Key Parameters Registry . . . . . . . . . . 10 74 6.2. Token Binding Types Registry . . . . . . . . . . . . . . 11 75 6.3. Token Binding Extensions Registry . . . . . . . . . . . . 12 76 6.4. Registration of Token Binding TLS Exporter Label . . . . 12 77 7. Security Considerations . . . . . . . . . . . . . . . . . . . 13 78 7.1. Security Token Replay . . . . . . . . . . . . . . . . . . 13 79 7.2. Downgrade Attacks . . . . . . . . . . . . . . . . . . . . 13 80 7.3. Privacy Considerations . . . . . . . . . . . . . . . . . 13 81 7.4. Token Binding Key Sharing Between Applications . . . . . 14 82 7.5. Triple Handshake Vulnerability in TLS 1.2 and Older TLS 83 Versions . . . . . . . . . . . . . . . . . . . . . . . . 14 84 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 14 85 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 14 86 9.1. Normative References . . . . . . . . . . . . . . . . . . 14 87 9.2. Informative References . . . . . . . . . . . . . . . . . 16 88 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 16 90 1. Introduction 92 Servers generate various security tokens (e.g. HTTP cookies, OAuth 93 tokens) for applications to access protected resources. Any party in 94 possession of such token gains access to the protected resource. 95 Attackers export bearer tokens from the user's machine, present them 96 to the servers, and impersonate authenticated users. The idea of 97 Token Binding is to prevent such attacks by cryptographically binding 98 security tokens to the TLS layer. 100 A Token Binding is established by the user agent generating a 101 private-public key pair (possibly within a secure hardware module, 102 such as TPM) per target server, and proving possession of the private 103 key on every TLS connection to the target server. The proof of 104 possession involves signing the exported keying material [RFC5705] 105 for the TLS connection with the private key. The corresponding 106 public key is included in the Token Binding identifier structure 107 (described in the Section 3.2 "TokenBinding.tokenbindingid"). Token 108 Bindings are long-lived, i.e. they encompass multiple TLS connections 109 and TLS sessions between a given client and server. To protect 110 privacy, Token Binding IDs are never transmitted in clear text and 111 can be reset by the user at any time, e.g. when clearing browser 112 cookies. 114 When issuing a security token to a client that supports Token 115 Binding, a server includes the client's Token Binding ID in the 116 token. Later on, when a client presents a security token containing 117 a Token Binding ID, the server makes sure the ID in the token matches 118 the ID of the Token Binding established with the client. In the case 119 of a mismatch, the server discards the token. 121 In order to successfully export and replay a bound security token, 122 the attacker needs to also be able to export the client's private 123 key, which is hard to do in the case of the key generated in a secure 124 hardware module. 126 1.1. Requirements Language 128 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 129 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 130 document are to be interpreted as described in [RFC2119]. 132 2. Token Binding Protocol Overview 134 The client and server use the Token Binding Negotiation TLS Extension 135 [I-D.ietf-tokbind-negotiation] to negotiate the Token Binding 136 protocol version and the parameters (signature algorithm, length) of 137 the Token Binding key. This negotiation does not require additional 138 round-trips. 140 The Token Binding protocol consists of one message sent by the client 141 to the server, proving possession of one or more client-generated 142 asymmetric keys. This message is only sent if the client and server 143 agree on the use of the Token Binding protocol and the key 144 parameters. The Token Binding message is sent with the application 145 protocol data in TLS application_data records. 147 A server receiving the Token Binding message verifies that the key 148 parameters in the message match the Token Binding parameters 149 negotiated via [I-D.ietf-tokbind-negotiation], and then validates the 150 signatures contained in the Token Binding message. If either of 151 these checks fails, the server terminates the connection, otherwise 152 the Token Binding is successfully established with the ID contained 153 in the Token Binding message. 155 When a server supporting the Token Binding protocol receives a bound 156 token, the server compares the Token Binding ID in the security token 157 with the Token Binding ID established with the client. If the bound 158 token came from a TLS connection without a Token Binding, or if the 159 IDs don't match, the token is discarded. 161 This document defines the format of the Token Binding protocol 162 message, the process of establishing a Token Binding, the format of 163 the Token Binding ID, and the process of validating a security token. 164 Token Binding Negotiation TLS Extension 165 [I-D.ietf-tokbind-negotiation] describes the negotiation of the Token 166 Binding protocol and key parameters. Token Binding over HTTP 167 [I-D.ietf-tokbind-https] explains how the Token Binding message is 168 encapsulated within HTTP/1.1 [RFC7230] or HTTP/2 [RFC7540] messages. 169 [I-D.ietf-tokbind-https] also describes Token Binding between 170 multiple communicating parties: User Agent, Identity Provider and 171 Relying Party. 173 3. Token Binding Protocol Message 175 The Token Binding message is sent by the client to prove possession 176 of one or more private keys held by the client. This message MUST be 177 sent if the client and server successfully negotiated the use of the 178 Token Binding protocol via [I-D.ietf-tokbind-negotiation], and MUST 179 NOT be sent otherwise. This message MUST be sent in the client's 180 first application protocol message. This message MAY also be sent in 181 subsequent application protocol messages, proving possession of 182 additional private keys held by the same client, which can be used to 183 facilitate token binding between more than two communicating parties. 184 For example, Token Binding over HTTP [I-D.ietf-tokbind-https] 185 specifies an encapsulation of the Token Binding message in HTTP 186 application protocol messages, as well as scenarios involving more 187 than two communicating parties. 189 The Token Binding message format is defined using TLS Presentation 190 Language (see Section 4 of [RFC5246]): 192 struct { 193 uint8 major; 194 uint8 minor; 195 } ProtocolVersion; 197 enum { 198 rsa2048_pkcs1.5(0), rsa2048_pss(1), ecdsap256(2), (255) 199 } TokenBindingKeyParameters; 201 struct { 202 opaque modulus<1..2^16-1>; 203 opaque publicexponent<1..2^8-1>; 204 } RSAPublicKey; 206 struct { 207 opaque point <1..2^8-1>; 208 } ECPoint; 210 struct { 211 TokenBindingKeyParameters key_parameters; 212 uint16 key_length; /* Length (in bytes) of the following 213 TokenBindingID.TokenBindingPublicKey */ 214 select (key_parameters) { 215 case rsa2048_pkcs1.5: 216 case rsa2048_pss: 217 RSAPublicKey rsapubkey; 218 case ecdsap256: 219 ECPoint point; 220 } TokenBindingPublicKey; 221 } TokenBindingID; 223 enum { 224 (255) /* No initial ExtensionType registrations */ 225 } ExtensionType; 227 struct { 228 ExtensionType extension_type; 229 opaque extension_data<0..2^16-1>; 230 } Extension; 232 enum { 233 provided_token_binding(0), referred_token_binding(1), (255) 234 } TokenBindingType; 236 struct { 237 TokenBindingType tokenbinding_type; 238 TokenBindingID tokenbindingid; 239 opaque signature<0..2^16-1>; /* Signature over the SHA256 hash of 240 (ASCII "Token Binding" + ProtocolVersion + 241 tokenbinding_type + key_parameters + EKM) */ 242 Extension extensions<0..2^16-1>; 243 } TokenBinding; 245 struct { 246 TokenBinding tokenbindings<0..2^16-1>; 247 } TokenBindingMessage; 249 The Token Binding message consists of a series of TokenBinding 250 structures, each containing the type of the token binding, the 251 TokenBindingID, a signature using the Token Binding key, optionally 252 followed by Extension structures. 254 3.1. TokenBinding.tokenbinding_type 256 This document defines two Token Binding types: 258 o provided_token_binding - used to establish a Token Binding when 259 connecting to a server. 261 o referred_token_binding - used when requesting tokens to be 262 presented to a different server. 264 Token Binding over HTTP [I-D.ietf-tokbind-https] describes a use case 265 for referred_token_binding where Token Bindings are established 266 between multiple communicating parties: User Agent, Identity Provider 267 and Relying Party. User Agent sends referred_token_binding to the 268 Identity Provider in order to prove possession of the Token Binding 269 key it uses with the Relying Party. The Identity Provider can then 270 bind the token it is supplying (for presentation to the Relying 271 Party) to the Token Binding ID contained in the 272 referred_token_binding. Such bound token enjoys the protections 273 discussed below in Section 7 "Security Considerations". 275 3.2. TokenBinding.tokenbindingid 277 The ID of the Token Binding established as a result of Token Binding 278 message processing contains the identifier of the key parameters 279 negotiated via [I-D.ietf-tokbind-negotiation], the length (in bytes) 280 of the Token Binding public key, and the Token Binding public key 281 itself. Token Binding ID can be obtained from the TokenBinding 282 structure by discarding the Token Binding type, signature and 283 extensions. 285 When an rsa2048_pkcs1.5 or rsa2048_pss key is used, 286 RSAPublicKey.modulus and RSAPublicKey.publicexponent contain the 287 modulus and exponent of the RSA public key represented in big-endian 288 format, with leading zero bytes omitted. 290 When an ecdsap256 key is used, ECPoint.point contains the X 291 coordinate followed by the Y coordinate. The X and Y coordinates are 292 unsigned 32-byte integers encoded in big-endian format, preserving 293 any leading zero bytes. Future specifications may define Token 294 Binding keys using other elliptic curves with their corresponding 295 signature and point formats. 297 Token Binding protocol implementations SHOULD make Token Binding IDs 298 available to the application as opaque byte sequences. E.g. server 299 applications will use Token Binding IDs when generating and verifying 300 bound tokens. 302 3.3. TokenBinding.signature 304 When an rsa2048_pkcs1.5 or rsa2048_pss key is used, 305 TokenBinding.signature contains the signature generated using, 306 respectively, the RSASSA-PKCS1-v1_5 or RSASSA-PSS signature scheme 307 defined in [RFC3447]. Both RSASSA-PKCS1-v1_5 and RSASSA-PSS 308 signature schemes MUST use the SHA256 hash algorithm. For RSASSA- 309 PSS, MGF1 with SHA256 MUST be used as the mask generation function, 310 and the salt length MUST equal 32 bytes. 312 When an ecdsap256 key is used, TokenBinding.signature contains a pair 313 of 32-byte integers, R followed by S, generated using Curve P-256 as 314 defined in [ANSI.X9-62.2005] and [FIPS.186-4.2013]. R and S are 315 encoded in big-endian format, preserving any leading zero bytes. 317 The signature is computed over the SHA256 hash of the byte string 318 representing the concatenation of: 320 o The ASCII string "Token Binding" with no terminating NUL; 322 o A ProtocolVersion structure representing the negotiated version of 323 the Token Binding protocol, e.g. 0x01 0x00 for Token Binding 1.0; 325 o TokenBindingType value contained in the 326 TokenBinding.tokenbinding_type field; 328 o TokenBindingKeyParameters value contained in the 329 TokenBindingID.key_parameters field; 331 o Exported keying material (EKM) value obtained from the current TLS 332 connection. 334 The EKM is obtained using the Keying Material Exporters for TLS 335 defined in [RFC5705], by supplying the following input values: 337 o Label: The ASCII string "EXPORTER-Token-Binding" with no 338 terminating NUL. 340 o Context value: NULL (no application context supplied). 342 o Length: 32 bytes. 344 3.4. TokenBinding.extensions 346 A Token Binding message may optionally contain a series of Extension 347 structures, each consisting of an extension_type and extension_data. 348 The structure and meaning of extension_data depends on the specific 349 extension_type. 351 Initially, no extension types are defined (see Section 6.3 352 "Token Binding Extensions Registry"). One of the possible uses of 353 extensions envisioned at the time of this writing is attestation: 354 cryptographic proof that allows the server to verify that the Token 355 Binding key is hardware-bound. The definitions of such Token Binding 356 protocol extensions are outside the scope of this specification. 358 An implementation MUST ignore any unknown Token Binding types. 360 4. Establishing a Token Binding 362 4.1. Client Processing Rules 364 The client MUST include at least one TokenBinding structure in the 365 Token Binding message. The key parameters used in the 366 provided_token_binding MUST match those negotiated with the server 367 via [I-D.ietf-tokbind-negotiation]. 369 The client SHOULD generate and store Token Binding keys in a secure 370 manner that prevents key export. In order to prevent cooperating 371 servers from linking user identities, different keys SHOULD be used 372 by the client for connections to different servers, according to the 373 token scoping rules of the application protocol. 375 When the client needs to send a referred_token_binding to the 376 Identity Provider, the client SHALL construct the referred 377 TokenBinding structure in the following manner: 379 o Set TokenBinding.tokenbinding_type to referred_token_binding. 381 o Set TokenBinding.tokenbindingid to the Token Binding ID used with 382 the Relying Party. 384 o Generate TokenBinding.signature, using the EKM value of the TLS 385 connection to the Identity Provider, the Token Binding key 386 established with the Relying Party and the signature algorithm 387 indicated by the associated key parameters. Note that these key 388 parameters may differ from the key parameters negotiated with the 389 Identity Provider. 391 Conveying referred Token Bindings in this fashion allows the Identity 392 Provider to verify that the client controls the Token Binding key 393 used with the Relying Party. 395 4.2. Server Processing Rules 397 The triple handshake vulnerability in TLS 1.2 and older TLS versions 398 affects the security of the Token Binding protocol, as described in 399 Section 7 "Security Considerations". Therefore, the server MUST NOT 400 negotiate the use of the Token Binding protocol with these TLS 401 versions, unless the server also negotiates the Extended Master 402 Secret [RFC7627] TLS extension. In addition, the server MUST NOT 403 initiate or allow TLS renegotiation, unless the Renegotiation 404 Indication [RFC5746] TLS extension has been negotiated. 406 The server MUST terminate the connection if the use of the Token 407 Binding protocol was not negotiated, but the client sends the Token 408 Binding message. If the Token Binding type is 409 "provided_token_binding", the server MUST verify that the signature 410 algorithm (including elliptic curve in the case of ECDSA) and key 411 length in the Token Binding message match those negotiated via 412 [I-D.ietf-tokbind-negotiation]. In the case of a mismatch, the 413 server MUST terminate the connection. Token Bindings of type 414 "referred_token_binding" may use different key parameters than those 415 negotiated with this client. 417 If the Token Binding message does not contain at least one 418 TokenBinding structure, or if a signature contained in any 419 TokenBinding structure is invalid, the server MUST terminate the 420 connection. 422 Servers MUST ignore any unknown extensions. Initially, no extension 423 types are defined (see Section 6.3 424 "Token Binding Extensions Registry"). 426 If all checks defined above have passed successfully, the Token 427 Binding between this client and server is established. The Token 428 Binding ID(s) conveyed in the Token Binding Message can be provided 429 to the server-side application. The application may then use the 430 Token Binding IDs for bound security token creation and validation, 431 see Section 5. 433 5. Bound Security Token Creation and Validation 435 Security tokens can be bound to the TLS layer either by embedding the 436 Token Binding ID in the token, or by maintaining a database mapping 437 tokens to Token Binding IDs. The specific method of generating bound 438 security tokens is application-defined and beyond the scope of this 439 document. Note that applicable security considerations are outlined 440 in Section 7. 442 Either or both clients and servers MAY create bound security tokens. 443 For example, HTTPS servers employing Token Binding for securing their 444 HTTP cookies will bind the cookies. In the case of a server- 445 initiated challenge-response protocol employing Token Binding and 446 TLS, the client can, for example, incorporate the Token Binding ID 447 within the signed object it returns, thus binding the object. 449 Upon receipt of a security token, the server attempts to retrieve 450 Token Binding ID information from the token and from the TLS 451 connection with the client. Application-provided policy determines 452 whether to honor non-bound (bearer) tokens. If the token is bound 453 and a Token Binding has not been established for the client 454 connection, the server MUST discard the token. If the Token Binding 455 ID for the token does not match the Token Binding ID established for 456 the client connection, the server MUST discard the token. 458 6. IANA Considerations 460 This section establishes three IANA registries: "Token Binding Key 461 Parameters", "Token Binding Types" and "Token Binding Extensions". 462 It also registers a new TLS exporter label in the TLS Exporter Label 463 Registry. 465 6.1. Token Binding Key Parameters Registry 467 This document establishes a registry for identifiers of Token Binding 468 key parameters entitled "Token Binding Key Parameters" under the 469 "Token Binding Protocol" heading. 471 Entries in this registry require the following fields: 473 o Value: The octet value that identifies a set of Token Binding key 474 parameters (0-255). 476 o Description: The description of the Token Binding key parameters. 478 o Specification: A reference to a specification that defines the 479 Token Binding key parameters. 481 This registry operates under the "Expert Review" policy as defined in 482 [RFC5226]. The designated expert is advised to encourage the 483 inclusion of a reference to a permanent and readily available 484 specification that enables the creation of interoperable 485 implementations using the identified set of Token Binding key 486 parameters. 488 An initial set of registrations for this registry follows: 490 Value: 0 492 Description: rsa2048_pkcs1.5 494 Specification: this document 496 Value: 1 498 Description: rsa2048_pss 500 Specification: this document 502 Value: 2 504 Description: ecdsap256 506 Specification: this document 508 6.2. Token Binding Types Registry 510 This document establishes a registry for Token Binding type 511 identifiers entitled "Token Binding Types" under the "Token Binding 512 Protocol" heading. 514 Entries in this registry require the following fields: 516 o Value: The octet value that identifies the Token Binding type 517 (0-255). 519 o Description: The description of the Token Binding type. 521 o Specification: A reference to a specification that defines the 522 Token Binding type. 524 This registry operates under the "Expert Review" policy as defined in 525 [RFC5226]. The designated expert is advised to encourage the 526 inclusion of a reference to a permanent and readily available 527 specification that enables the creation of interoperable 528 implementations using the identified Token Binding type. 530 An initial set of registrations for this registry follows: 532 Value: 0 534 Description: provided_token_binding 536 Specification: this document 538 Value: 1 540 Description: referred_token_binding 542 Specification: this document 544 6.3. Token Binding Extensions Registry 546 This document establishes a registry for Token Binding extensions 547 entitled "Token Binding Extensions" under the "Token Binding 548 Protocol" heading. 550 Entries in this registry require the following fields: 552 o Value: The octet value that identifies the Token Binding extension 553 (0-255). 555 o Description: The description of the Token Binding extension. 557 o Specification: A reference to a specification that defines the 558 Token Binding extension. 560 This registry operates under the "Expert Review" policy as defined in 561 [RFC5226]. The designated expert is advised to encourage the 562 inclusion of a reference to a permanent and readily available 563 specification that enables the creation of interoperable 564 implementations using the identified Token Binding extension. This 565 document creates no initial registrations in the "Token Binding 566 Extensions" registry. 568 6.4. Registration of Token Binding TLS Exporter Label 570 This document adds a registration for the "EXPORTER-Token-Binding" 571 value in the TLS Exporter Label Registry to correspond to this 572 specification. 574 7. Security Considerations 576 7.1. Security Token Replay 578 The goal of the Token Binding protocol is to prevent attackers from 579 exporting and replaying security tokens, thereby impersonating 580 legitimate users and gaining access to protected resources. Bound 581 tokens can still be replayed by the malware present in the User 582 Agent. In order to export the token to another machine and 583 successfully replay it, the attacker also needs to export the 584 corresponding private key. Token Binding private keys are therefore 585 high-value assets and SHOULD be strongly protected, ideally by 586 generating them in a hardware security module that prevents key 587 export. 589 The manner in which a token is bound to the TLS layer is application- 590 defined and beyond the scope of this document. However, the 591 resulting bound token needs to be integrity-protected, so that an 592 attacker cannot remove the binding or substitute a Token Binding ID 593 of their choice without detection. 595 7.2. Downgrade Attacks 597 The Token Binding protocol is only used when negotiated via 598 [I-D.ietf-tokbind-negotiation] within the TLS handshake. TLS 599 prevents active attackers from modifying the messages of the TLS 600 handshake, therefore it is not possible for the attacker to remove or 601 modify the Token Binding Negotiation TLS Extension used to negotiate 602 the Token Binding protocol and key parameters. The signature 603 algorithm and key length used in the TokenBinding of type 604 "provided_token_binding" MUST match the parameters negotiated via 605 [I-D.ietf-tokbind-negotiation]. 607 7.3. Privacy Considerations 609 The Token Binding protocol uses persistent, long-lived Token Binding 610 IDs. To protect privacy, Token Binding IDs are never transmitted in 611 clear text and can be reset by the user at any time, e.g. when 612 clearing browser cookies. Some applications offer a special privacy 613 mode where they don't store or use tokens supplied by the server, 614 e.g. "in private" browsing. When operating in this special privacy 615 mode, applications SHOULD use newly generated Token Binding keys and 616 delete them when exiting this mode, or else SHOULD NOT negotiate 617 Token Binding at all. 619 In order to prevent cooperating servers from linking user identities, 620 different keys MUST be used by the client for connections to 621 different servers, according to the token scoping rules of the 622 application protocol. 624 A server can use tokens and Token Binding IDs to track clients. 625 Client applications that automatically limit the lifetime or scope of 626 tokens to maintain user privacy SHOULD apply the same validity time 627 and scope limits to Token Binding keys. 629 7.4. Token Binding Key Sharing Between Applications 631 Existing systems provide a variety of platform-specific mechanisms 632 for certain applications to share tokens, e.g. to enable single sign- 633 on scenarios. For these scenarios to keep working with bound tokens, 634 the applications that are allowed to share tokens will need to also 635 share Token Binding keys. Care must be taken to restrict the sharing 636 of Token Binding keys to the same group(s) of applications that share 637 the same tokens. 639 7.5. Triple Handshake Vulnerability in TLS 1.2 and Older TLS Versions 641 The Token Binding protocol relies on the exported keying material 642 (EKM) to associate a TLS connection with a Token Binding. The triple 643 handshake attack [TRIPLE-HS] is a known vulnerability in TLS 1.2 and 644 older TLS versions, allowing the attacker to synchronize keying 645 material between TLS connections. The attacker can then successfully 646 replay bound tokens. For this reason, the Token Binding protocol 647 MUST NOT be negotiated with these TLS versions, unless the Extended 648 Master Secret [RFC7627] TLS extension has also been negotiated. In 649 addition, TLS renegotiation MUST NOT be initiated or allowed, unless 650 the Renegotiation Indication [RFC5746] TLS extension has been 651 negotiated. 653 8. Acknowledgements 655 This document incorporates comments and suggestions offered by Eric 656 Rescorla, Gabriel Montenegro, Martin Thomson, Vinod Anupam, Anthony 657 Nadalin, Michael B. Jones, Bill Cox, Nick Harper, Brian Campbell, 658 and others. 660 9. References 662 9.1. Normative References 664 [ANSI.X9-62.2005] 665 American National Standards Institute, "Public Key 666 Cryptography for the Financial Services Industry, The 667 Elliptic Curve Digital Signature Algorithm (ECDSA)", 668 ANSI X9.62, 2005. 670 [FIPS.186-4.2013] 671 National Institute of Standards and Technology, "Digital 672 Signature Standard (DSS)", FIPS 186-4, 2013. 674 [I-D.ietf-tokbind-https] 675 Popov, A., Nystrom, M., Balfanz, D., Langley, A., and J. 676 Hodges, "Token Binding over HTTP", draft-ietf-tokbind- 677 https-05 (work in progress), July 2016. 679 [I-D.ietf-tokbind-negotiation] 680 Popov, A., Nystrom, M., Balfanz, D., and A. Langley, 681 "Transport Layer Security (TLS) Extension for Token 682 Binding Protocol Negotiation", draft-ietf-tokbind- 683 negotiation-03 (work in progress), July 2016. 685 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 686 Requirement Levels", BCP 14, RFC 2119, 687 DOI 10.17487/RFC2119, March 1997, 688 . 690 [RFC3447] Jonsson, J. and B. Kaliski, "Public-Key Cryptography 691 Standards (PKCS) #1: RSA Cryptography Specifications 692 Version 2.1", RFC 3447, DOI 10.17487/RFC3447, February 693 2003, . 695 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 696 IANA Considerations Section in RFCs", BCP 26, RFC 5226, 697 DOI 10.17487/RFC5226, May 2008, 698 . 700 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 701 (TLS) Protocol Version 1.2", RFC 5246, 702 DOI 10.17487/RFC5246, August 2008, 703 . 705 [RFC5705] Rescorla, E., "Keying Material Exporters for Transport 706 Layer Security (TLS)", RFC 5705, DOI 10.17487/RFC5705, 707 March 2010, . 709 [RFC5746] Rescorla, E., Ray, M., Dispensa, S., and N. Oskov, 710 "Transport Layer Security (TLS) Renegotiation Indication 711 Extension", RFC 5746, DOI 10.17487/RFC5746, February 2010, 712 . 714 [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 715 Protocol (HTTP/1.1): Message Syntax and Routing", 716 RFC 7230, DOI 10.17487/RFC7230, June 2014, 717 . 719 [RFC7540] Belshe, M., Peon, R., and M. Thomson, Ed., "Hypertext 720 Transfer Protocol Version 2 (HTTP/2)", RFC 7540, 721 DOI 10.17487/RFC7540, May 2015, 722 . 724 [RFC7627] Bhargavan, K., Ed., Delignat-Lavaud, A., Pironti, A., 725 Langley, A., and M. Ray, "Transport Layer Security (TLS) 726 Session Hash and Extended Master Secret Extension", 727 RFC 7627, DOI 10.17487/RFC7627, September 2015, 728 . 730 9.2. Informative References 732 [TRIPLE-HS] 733 Bhargavan, K., Delignat-Lavaud, A., Fournet, C., Pironti, 734 A., and P. Strub, "Triple Handshakes and Cookie Cutters: 735 Breaking and Fixing Authentication over TLS. IEEE 736 Symposium on Security and Privacy", 2014. 738 Authors' Addresses 740 Andrei Popov (editor) 741 Microsoft Corp. 742 USA 744 Email: andreipo@microsoft.com 746 Magnus Nystroem 747 Microsoft Corp. 748 USA 750 Email: mnystrom@microsoft.com 752 Dirk Balfanz 753 Google Inc. 754 USA 756 Email: balfanz@google.com 758 Adam Langley 759 Google Inc. 760 USA 762 Email: agl@google.com 763 Jeff Hodges 764 Paypal 765 USA 767 Email: Jeff.Hodges@paypal.com