idnits 2.17.1 draft-schmaus-kitten-sasl-ht-06.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 : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (May 6, 2019) is 1816 days in the past. Is this intentional? Checking references for intended status: Experimental ---------------------------------------------------------------------------- ** Obsolete normative reference: RFC 5246 (Obsoleted by RFC 8446) ** Obsolete normative reference: RFC 6125 (Obsoleted by RFC 9525) Summary: 2 errors (**), 0 flaws (~~), 1 warning (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Common Authentication Technology Next Generation F. Schmaus 3 Internet-Draft C. Egger 4 Intended status: Experimental University of Erlangen-Nuremberg 5 Expires: November 7, 2019 May 6, 2019 7 The Hashed Token SASL Mechanism 8 draft-schmaus-kitten-sasl-ht-06 10 Abstract 12 This document specifies the family of Hashed Token SASL mechanisms 13 which enable a proof-of-possession-based authentication scheme and 14 are meant to be used for quick re-authentication of a previous 15 session. The Hashed Token SASL mechanism's authentication sequence 16 consists of only one round-trip. The usage of short-lived, 17 exclusively ephemeral hashed tokens is achieving the single round- 18 trip property. The SASL mechanism specified herin further provides 19 hash agility, mutual authentication and is secured by channel 20 binding. 22 Status of This Memo 24 This Internet-Draft is submitted in full conformance with the 25 provisions of BCP 78 and BCP 79. 27 Internet-Drafts are working documents of the Internet Engineering 28 Task Force (IETF). Note that other groups may also distribute 29 working documents as Internet-Drafts. The list of current Internet- 30 Drafts is at https://datatracker.ietf.org/drafts/current/. 32 Internet-Drafts are draft documents valid for a maximum of six months 33 and may be updated, replaced, or obsoleted by other documents at any 34 time. It is inappropriate to use Internet-Drafts as reference 35 material or to cite them other than as "work in progress." 37 This Internet-Draft will expire on November 7, 2019. 39 Copyright Notice 41 Copyright (c) 2019 IETF Trust and the persons identified as the 42 document authors. All rights reserved. 44 This document is subject to BCP 78 and the IETF Trust's Legal 45 Provisions Relating to IETF Documents 46 (https://trustee.ietf.org/license-info) in effect on the date of 47 publication of this document. Please review these documents 48 carefully, as they describe your rights and restrictions with respect 49 to this document. Code Components extracted from this document must 50 include Simplified BSD License text as described in Section 4.e of 51 the Trust Legal Provisions and are provided without warranty as 52 described in the Simplified BSD License. 54 Table of Contents 56 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 57 1.1. Conventions and Terminology . . . . . . . . . . . . . . . 3 58 1.2. Applicability . . . . . . . . . . . . . . . . . . . . . . 3 59 2. The HT Family of Mechanisms . . . . . . . . . . . . . . . . . 4 60 3. The HT Authentication Exchange . . . . . . . . . . . . . . . 5 61 3.1. Initiator First Message . . . . . . . . . . . . . . . . . 5 62 3.2. Initiator Authentication . . . . . . . . . . . . . . . . 6 63 3.3. Final Responder Message . . . . . . . . . . . . . . . . . 6 64 4. Compliance with SASL Mechanism Requirements . . . . . . . . . 6 65 5. Requirements for the Application-Protocol Extension . . . . . 7 66 6. Security Considerations . . . . . . . . . . . . . . . . . . . 7 67 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 68 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 8 69 8.1. Normative References . . . . . . . . . . . . . . . . . . 8 70 8.2. Informative References . . . . . . . . . . . . . . . . . 10 71 Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . 10 72 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 11 74 1. Introduction 76 This specification describes the family of Hashed Token (HT) Simple 77 Authentication and Security Layer (SASL) [RFC4422] mechanisms, which 78 enable a proof-of-possession-based authentication scheme. The HT 79 mechanism is designed to be used with short-lived, exclusively 80 ephemeral tokens, called SASL-HT tokens, and allow for quick, one 81 round-trip, re-authentication of a previous session. 83 Further properties of the HT mechanism are 1) hash agility, 2) mutual 84 authentication, and 3) being secured by channel binding. 86 Clients are supposed to request SASL-HT tokens from the server after 87 being authenticated using a "strong" SASL mechanism like SCRAM 88 [RFC5802]. Hence a typical sequence of actions using HT may look 89 like the following: 91 A) Client authenticates using a strong mechanism (e.g., SCRAM) 92 B) Client requests secret SASL-HT token 93 C) Service returns SASL-HT token 94 95 D) Connection between client and server gets interrupted, 96 for example because of a WiFi <-> GSM switch 97 E) Client resumes the previous session using HT and token from C) 98 F) Service revokes the successfully used SASL-HT token 99 [goto B] 101 The HT mechanism requires an accompanying, application protocol 102 specific, extension, which allows clients to requests a new SASL-HT 103 token (see Section 5). One example for such an application protocol 104 specific extension based on HT is [XEP-0397]. This XMPP [RFC6120] 105 extension protocol allows, amongst other things, B) and C), 107 Since the SASL-HT token is not salted, and only one hash iteration is 108 used, the HT mechanism is not suitable to protect long-lived shared 109 secrets (e.g. "passwords"). You may want to look at [RFC5802] for 110 that. 112 1.1. Conventions and Terminology 114 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 115 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 116 "OPTIONAL" in this document are to be interpreted as described in BCP 117 14 [RFC2119] [RFC8174] when, and only when, they appear in all 118 capitals, as shown here. 120 1.2. Applicability 122 Because this mechanism transports information that should not be 123 controlled by an attacker, the HT mechanism MUST only be used over 124 channels protected by Transport Layer Security (TLS, see [RFC5246]), 125 or over similar integrity-protected and authenticated channels. 126 Also, the application protcol specific extension which requests a new 127 SASL-HT token SHOULD only be used over similarly protected channels. 129 Also, when TLS is used, the client MUST successfully validate the 130 server's certificate ([RFC5280], [RFC6125]). 132 The family of HT mechanisms is not applicable for proxy 133 authentication since they can not carry an authorization identity 134 string (authzid). 136 2. The HT Family of Mechanisms 138 Each mechanism in this family differs by choice of the hash algorithm 139 and the choice of the channel binding [RFC5929] type. 141 An HT mechanism name is a string beginning with "HT-" followed by the 142 capitalised name of the used hash, followed by "-", and suffixed by 143 one of 'ENDP' and 'UNIQ'. 145 Hence each HT mechanism has a name of the following form: 147 HT-- 149 Where is the capitalised "Hash Name String" of the IANA 150 "Named Information Hash Algorithm Registry" [iana-hash-alg] as 151 specified in [RFC6920], and is one of 'ENDP' or 'UNIQ' 152 denoting the channel binding type. In the case of 'ENDP', the tls- 153 server-end-point channel binding type is used. In the case of 154 'UNIQ', the tls-unique channel binding type is used. Valid channel 155 binding types are defined in the IANA "Channel-Binding Types" 156 registry [iana-cbt] as specified in [RFC5056]. 158 +---------+----------------------+ 159 | cb-type | Channel Binding Type | 160 +---------+----------------------+ 161 | ENDP | tls-server-end-point | 162 | UNIQ | tls-unique | 163 +---------+----------------------+ 165 Mapping of cb-type to Channel Binding Types 167 The following table lists the HT SASL mechanisms registered by this 168 document. 170 +------------------+------------------+-----------------------------+ 171 | Mechanism Name | HT Hash | Channel-binding unique | 172 | | Algorithm | prefix | 173 +------------------+------------------+-----------------------------+ 174 | HT-SHA-512-ENDP | SHA-512 | tls-server-end-point | 175 | HT-SHA-512-UNIQ | SHA-512 | tls-unique | 176 | HT-SHA3-512-ENDP | SHA3-512 | tls-server-end-point | 177 | HT-SHA-256-UNIQ | SHA-256 | tls-unique | 178 +------------------+------------------+-----------------------------+ 180 Defined HT SASL mechanisms 182 3. The HT Authentication Exchange 184 The mechanism consists of a simple exchange of precisely two messages 185 between the initiator and responder. 187 The following syntax specifications use the Augmented Backus-Naur 188 form (ABNF) notation as specified in [RFC5234]. 190 3.1. Initiator First Message 192 The HT mechanism starts with the initiator-msg, send by the initiator 193 to the responder. The following lists the ABNF grammar for the 194 initiator-msg: 196 initiator-msg = authcid NUL initiator-hashed-token 197 authcid = 1*SAFE ; MUST accept up to 255 octets 198 initiator-hashed-token = 1*OCTET 200 NUL = %0x00 ; The null octet 201 SAFE = UTF1 / UTF2 / UTF3 / UTF4 202 ;; any UTF-8 encoded Unicode character except NUL 204 UTF1 = %x01-7F ;; except NUL 205 UTF2 = %xC2-DF UTF0 206 UTF3 = %xE0 %xA0-BF UTF0 / %xE1-EC 2(UTF0) / 207 %xED %x80-9F UTF0 / %xEE-EF 2(UTF0) 208 UTF4 = %xF0 %x90-BF 2(UTF0) / %xF1-F3 3(UTF0) / 209 %xF4 %x80-8F 2(UTF0) 210 UTF0 = %x80-BF 212 The initiator first message starts with the authentication identity 213 (authcid, see[RFC4422]) as UTF-8 [RFC3629] encoded string. It is 214 followed by initiator-hashed-token separated by as single null octet. 216 The value of the initiator-hashed-token is defined as follows: 218 initiator-hashed-token := HMAC(token, "Initiator" || cb-data) 220 HMAC() is the function defined in [RFC2104] with H being the selected 221 HT hash algorithm, 'cb-data' represents the data provided by the 222 selected channel binding type, and 'token' are the UTF-8 encoded 223 octets of the SASL-HT token string which acts as a shared secret 224 between initiator and responder. 226 The initiator-msg MAY be included in TLS 1.3 0-RTT early data, as 227 specified in [RFC8446]. If this is the case, then the initiating 228 entity MUST NOT include any further application protocol payload in 229 the early data besides the HT initiator-msg and potential required 230 framing of the SASL profile. The responder MUST abort the SASL 231 authentication if the early data contains additional application 232 protocol payload. 234 TODO: It should be possible to exploit TLS 1.3 early data for 235 "0.5" RTT resumption of the application protocol's session. That 236 is, on resumption the initiating entity MUST NOT send any 237 application protocol payload together with first flight data, 238 besides the HT initiator-msg. But if the responding entity is 239 able to verify the TLS 1.3 early data, then it can send additional 240 application protocol payload right away together with the 241 "resumption successful" response to the initiating entity. 243 TODO: Add note why HMAC() is always involved, even if HMAC() is 244 usually not required when modern hash algorithms are used. 246 3.2. Initiator Authentication 248 Upon receiving the initiator-msg, the responder calculates itself the 249 value of initiator-hashed-token and compares it with the received 250 value found in the initiator-msg. If both values are equal, then the 251 initiator has been successfully authenticated. Otherwise, if both 252 values are not equal, then authentication MUST fail. 254 If the responder was able to authenticate the initiator, then the 255 used token MUST be revoked immediately. 257 3.3. Final Responder Message 259 After the initiator was authenticated the responder continues the 260 SASL authentication by sending the responder-msg to the initiator. 262 The ABNF for responder-msg is: 264 responder-msg = 1*OCTET 266 The responder-msg value is defined as follows: 268 responder-msg := HMAC(token, "Responder" || cb-data) 270 The initiating entity MUST verify the responder-msg to achieve mutual 271 authentication. 273 4. Compliance with SASL Mechanism Requirements 275 This section describes compliance with SASL mechanism requirements 276 specified in Section 5 of [RFC4422]. 278 1. "HT-SHA-256-ENDP", "HT-SHA-256-UNIQ", "HT-SHA-3-512-ENDP" and 279 "HT-SHA-3-512-UNIQ". 281 2. Definition of server-challenges and client-responses: 283 a HT is a client-first mechanism. 285 b HT does send additional data with success (the responder-msg). 287 3. HT is not capable of transferring authorization identities from 288 the client to the server. 290 4. HT does not offer any security layers (HT offers channel binding 291 instead). 293 5. HT does not protect the authorization identity. 295 5. Requirements for the Application-Protocol Extension 297 It is REQUIRED that the application-protocol specific extension 298 provides a mechanism to request a SASL-HT token in form of a Unicode 299 string. The returned token MUST have been newly generated by a 300 cryptographically secure random number generator and MUST contain at 301 least 128 bit of entropy. 303 It is RECOMMENDED that the protocol allows the requestor to signal 304 the name of the SASL mechanism which he intends to use with the 305 token. If a token is used with a different mechanism than the one 306 which was signalled upon requesting the token, then the 307 authentication MUST fail. This allows pinning the token to a SASL 308 mechanism, which increases the security because it makes it 309 impossible for an attacker to downgrade the SASL mechanism. 311 6. Security Considerations 313 To be secure, the HT mechanism MUST be used over a TLS channel that 314 has had the session hash extension [RFC7627] negotiated, or session 315 resumption MUST NOT have been used. 317 It is RECOMMENDED that implementations periodically require a full 318 authentication using a strong SASL mechanism which does not use the 319 SASL-HT token. 321 It is of vital importance that the SASL-HT token is generated by a 322 cryptographically secure random generator. See [RFC4086] for more 323 information about Randomness Requirements for Security. 325 7. IANA Considerations 327 IANA has added the following family of SASL mechanisms to the SASL 328 Mechanism registry established by [RFC4422]: 330 To: iana@iana.org 331 Subject: Registration of a new SASL family HT 333 SASL mechanism name (or prefix for the family): HT-* 334 Security considerations: 335 Section FIXME of draft-schmaus-kitten-sasl-ht 336 Published specification (optional, recommended): 337 draft-schmaus-kitten-sasl-ht-XX (TODO) 338 Person & email address to contact for further information: 339 IETF SASL WG 340 Intended usage: COMMON 341 Owner/Change controller: IESG 342 Note: Members of this family MUST be explicitly registered 343 using the "IETF Review" [@!RFC5226] registration procedure. 344 Reviews MUST be requested on the Kitten WG mailing list 345 (or a successor designated by the responsible 346 Security AD). 348 8. References 350 8.1. Normative References 352 [iana-cbt] 353 Williams, N., "IANA Channel-Binding Types", 2010, 354 . 357 [iana-hash-alg] 358 Williams, N., "IANA Named Information Hash Algorithm 359 Registry", 2010, . 362 [RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- 363 Hashing for Message Authentication", RFC 2104, 364 DOI 10.17487/RFC2104, February 1997, 365 . 367 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 368 Requirement Levels", BCP 14, RFC 2119, 369 DOI 10.17487/RFC2119, March 1997, 370 . 372 [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 373 10646", STD 63, RFC 3629, DOI 10.17487/RFC3629, November 374 2003, . 376 [RFC4086] Eastlake 3rd, D., Schiller, J., and S. Crocker, 377 "Randomness Requirements for Security", BCP 106, RFC 4086, 378 DOI 10.17487/RFC4086, June 2005, 379 . 381 [RFC4422] Melnikov, A., Ed. and K. Zeilenga, Ed., "Simple 382 Authentication and Security Layer (SASL)", RFC 4422, 383 DOI 10.17487/RFC4422, June 2006, 384 . 386 [RFC5056] Williams, N., "On the Use of Channel Bindings to Secure 387 Channels", RFC 5056, DOI 10.17487/RFC5056, November 2007, 388 . 390 [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 391 Specifications: ABNF", STD 68, RFC 5234, 392 DOI 10.17487/RFC5234, January 2008, 393 . 395 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 396 (TLS) Protocol Version 1.2", RFC 5246, 397 DOI 10.17487/RFC5246, August 2008, 398 . 400 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 401 Housley, R., and W. Polk, "Internet X.509 Public Key 402 Infrastructure Certificate and Certificate Revocation List 403 (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008, 404 . 406 [RFC5929] Altman, J., Williams, N., and L. Zhu, "Channel Bindings 407 for TLS", RFC 5929, DOI 10.17487/RFC5929, July 2010, 408 . 410 [RFC6125] Saint-Andre, P. and J. Hodges, "Representation and 411 Verification of Domain-Based Application Service Identity 412 within Internet Public Key Infrastructure Using X.509 413 (PKIX) Certificates in the Context of Transport Layer 414 Security (TLS)", RFC 6125, DOI 10.17487/RFC6125, March 415 2011, . 417 [RFC6920] Farrell, S., Kutscher, D., Dannewitz, C., Ohlman, B., 418 Keranen, A., and P. Hallam-Baker, "Naming Things with 419 Hashes", RFC 6920, DOI 10.17487/RFC6920, April 2013, 420 . 422 [RFC7627] Bhargavan, K., Ed., Delignat-Lavaud, A., Pironti, A., 423 Langley, A., and M. Ray, "Transport Layer Security (TLS) 424 Session Hash and Extended Master Secret Extension", 425 RFC 7627, DOI 10.17487/RFC7627, September 2015, 426 . 428 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 429 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 430 May 2017, . 432 [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol 433 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, 434 . 436 8.2. Informative References 438 [RFC5802] Newman, C., Menon-Sen, A., Melnikov, A., and N. Williams, 439 "Salted Challenge Response Authentication Mechanism 440 (SCRAM) SASL and GSS-API Mechanisms", RFC 5802, 441 DOI 10.17487/RFC5802, July 2010, 442 . 444 [RFC6120] Saint-Andre, P., "Extensible Messaging and Presence 445 Protocol (XMPP): Core", RFC 6120, DOI 10.17487/RFC6120, 446 March 2011, . 448 [XEP-0397] 449 Schmaus, F., "XEP-0397: Instant Stream Resumption", 2018, 450 . 452 Appendix A. Acknowledgments 454 This document benefited from discussions on the KITTEN WG mailing 455 list. The authors would like to especially thank Thijs Alkemade, Sam 456 Whited and Alexey Melnikov for their comments on this topic. 457 Furthermore, we would like to thank Alexander Wuerstlein, who came up 458 with the idea to pin the token to a SASL mechanism for increased 459 security. 461 Authors' Addresses 463 Florian Schmaus 464 University of Erlangen-Nuremberg 466 Email: schmaus@cs.fau.de 468 Christoph Egger 469 University of Erlangen-Nuremberg 471 Email: egger@cs.fau.de