idnits 2.17.1 draft-ietf-kitten-sasl-openid-02.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 (April 27, 2011) is 4748 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Possible downref: Non-RFC (?) normative reference: ref. 'OpenID' ** Obsolete normative reference: RFC 2616 (Obsoleted by RFC 7230, RFC 7231, RFC 7232, RFC 7233, RFC 7234, RFC 7235) ** Obsolete normative reference: RFC 5246 (Obsoleted by RFC 8446) ** Obsolete normative reference: RFC 6125 (Obsoleted by RFC 9525) -- Obsolete informational reference (is this intentional?): RFC 3501 (Obsoleted by RFC 9051) -- Obsolete informational reference (is this intentional?): RFC 3920 (Obsoleted by RFC 6120) Summary: 3 errors (**), 0 flaws (~~), 1 warning (==), 4 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group E. Lear 3 Internet-Draft Cisco Systems GmbH 4 Intended status: Standards Track H. Tschofenig 5 Expires: October 29, 2011 Nokia Siemens Networks 6 H. Mauldin 7 Cisco Systems, Inc. 8 S. Josefsson 9 SJD AB 10 April 27, 2011 12 A SASL & GSS-API Mechanism for OpenID 13 draft-ietf-kitten-sasl-openid-02 15 Abstract 17 OpenID has found its usage on the Internet for Web Single Sign-On. 18 Simple Authentication and Security Layer (SASL) and the Generic 19 Security Service Application Program Interface (GSS-API) are 20 application frameworks to generalize authentication. This memo 21 specifies a SASL and GSS-API mechanism for OpenID that allows the 22 integration of existing OpenID Identity Providers with applications 23 using SASL and GSS-API. 25 Status of this Memo 27 This Internet-Draft is submitted in full conformance with the 28 provisions of BCP 78 and BCP 79. 30 Internet-Drafts are working documents of the Internet Engineering 31 Task Force (IETF). Note that other groups may also distribute 32 working documents as Internet-Drafts. The list of current Internet- 33 Drafts is at http://datatracker.ietf.org/drafts/current/. 35 Internet-Drafts are draft documents valid for a maximum of six months 36 and may be updated, replaced, or obsoleted by other documents at any 37 time. It is inappropriate to use Internet-Drafts as reference 38 material or to cite them other than as "work in progress." 40 This Internet-Draft will expire on October 29, 2011. 42 Copyright Notice 44 Copyright (c) 2011 IETF Trust and the persons identified as the 45 document authors. All rights reserved. 47 This document is subject to BCP 78 and the IETF Trust's Legal 48 Provisions Relating to IETF Documents 49 (http://trustee.ietf.org/license-info) in effect on the date of 50 publication of this document. Please review these documents 51 carefully, as they describe your rights and restrictions with respect 52 to this document. Code Components extracted from this document must 53 include Simplified BSD License text as described in Section 4.e of 54 the Trust Legal Provisions and are provided without warranty as 55 described in the Simplified BSD License. 57 Table of Contents 59 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 60 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4 61 1.2. Applicability . . . . . . . . . . . . . . . . . . . . . . 4 62 2. Applicability for non-HTTP Use Cases . . . . . . . . . . . . . 5 63 2.1. Binding SASL to OpenID in the Relying Party . . . . . . . 8 64 2.2. Discussion . . . . . . . . . . . . . . . . . . . . . . . . 8 65 3. OpenID SASL Mechanism Specification . . . . . . . . . . . . . 10 66 3.1. Advertisement . . . . . . . . . . . . . . . . . . . . . . 10 67 3.2. Initiation . . . . . . . . . . . . . . . . . . . . . . . . 10 68 3.3. Authentication Request . . . . . . . . . . . . . . . . . . 10 69 3.4. Server Response . . . . . . . . . . . . . . . . . . . . . 11 70 4. OpenID GSS-API Mechanism Specification . . . . . . . . . . . . 12 71 4.1. GSS-API Principal Name Types for OpenID . . . . . . . . . 12 72 5. Example . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 73 6. Security Considerations . . . . . . . . . . . . . . . . . . . 16 74 6.1. Binding OpenIDs to Authorization Identities . . . . . . . 16 75 6.2. RP redirected by malicious URL to take an improper 76 action . . . . . . . . . . . . . . . . . . . . . . . . . . 16 77 6.3. Session Swapping (Cross-Site Request Forgery) . . . . . . 16 78 6.4. User Privacy . . . . . . . . . . . . . . . . . . . . . . . 17 79 6.5. Collusion between RPs . . . . . . . . . . . . . . . . . . 17 80 7. Room for Improvement . . . . . . . . . . . . . . . . . . . . . 18 81 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 19 82 9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 20 83 10. References . . . . . . . . . . . . . . . . . . . . . . . . . . 21 84 10.1. Normative References . . . . . . . . . . . . . . . . . . . 21 85 10.2. Informative References . . . . . . . . . . . . . . . . . . 22 86 Appendix A. Changes . . . . . . . . . . . . . . . . . . . . . . . 23 87 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 24 89 1. Introduction 91 OpenID [OpenID] is a web-based three-party protocol that provides a 92 means for a user to offer identity assertions and other attributes to 93 a web server (Relying Party) via the help of an identity provider. 94 The purpose of this system is to provide a way to verify that an end 95 user controls an identifier. 97 Simple Authentication and Security Layer (SASL) [RFC4422] (SASL) is 98 used by application protocols such IMAP [RFC3501], POP [RFC1939] and 99 XMPP [RFC3920], with the goal of modularizing authentication and 100 security layers, so that newer mechanisms can be added as needed. 101 This memo specifies just such a mechanism. 103 The Generic Security Service Application Program Interface (GSS-API) 104 [RFC2743] provides a framework for applications to support multiple 105 authentication mechanisms through a unified interface. This document 106 defines a pure SASL mechanism for OpenID, but it conforms to the new 107 bridge between SASL and the GSS-API called GS2 [I-D.ietf-sasl-gs2]. 108 This means that this document defines both a SASL mechanism and a 109 GSS-API mechanism. We want to point out that the GSS-API interface 110 is optional for SASL implementers, and the GSS-API considerations can 111 be avoided in environments that uses SASL directly without GSS-API. 113 As currently envisioned, this mechanism is to allow the interworking 114 between SASL and OpenID in order to assert identity and other 115 attributes to relying parties. As such, while servers (as relying 116 parties) will advertise SASL mechanisms, clients will select the 117 OpenID mechanism. 119 The OpenID mechanism described in this memo aims to re-use the OpenID 120 mechanism to the maximum extent and therefore does not establish a 121 separate authentication, integrity and confidentiality mechanism. It 122 is anticipated that existing security layers, such as Transport Layer 123 Security(TLS) [RFC5246], will continued to be used. This 124 specification is appropriate for use when a browser is available. 126 Figure 1 describes the interworking between OpenID and SASL. This 127 document requires enhancements to the Relying Party and to the Client 128 (as the two SASL communication end points) but no changes to the 129 OpenID Provider (OP) are necessary. To accomplish this goal indirect 130 messaging required by the OpenID specification is tunneled within 131 SASL. 133 +-----------+ 134 | | 135 >| Relying | 136 / | Party | 137 // | | 138 // +-----------+ 139 // ^ 140 OpenID // +--|--+ 141 // | O| | 142 / S | p| | 143 // A | e| | 144 // S | n| | 145 // L | I| | 146 // | D| | 147 | Client | 152 | | | | 153 +------------+ +----------+ 155 Figure 1: Interworking Architecture 157 1.1. Terminology 159 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 160 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 161 document are to be interpreted as described in RFC 2119 [RFC2119]. 163 The reader is assumed to be familiar with the terms used in the 164 OpenID 2.0 specification. 166 1.2. Applicability 168 Because this mechanism transports information that should not be 169 controlled by an attacker, the OpenID mechanism MUST only be used 170 over channels protected by TLS, and the client MUST successfully 171 validate the server certificate, or similar integrity protected and 172 authenticated channels.[RFC5280][RFC6125] 174 2. Applicability for non-HTTP Use Cases 176 OpenID was originally envisioned for HTTP [RFC2616]/HTML 177 [W3C.REC-html401-19991224] based communications, and with the 178 associated semantic, the idea being that the user would be redirected 179 by the Relying Party to an identity provider who authenticates the 180 user, and then sends identity information and other attributes 181 (either directly or indirectly) to the Relying Party. The identity 182 provider in the OpenID specifications is referred to as an OpenID 183 Provider (OP). The actual protocol flow, as copied from the OpenID 184 2.0 specification, is as follows: 186 1. The end user initiates authentication by presenting a User- 187 Supplied Identifier to the Relying Party via their User-Agent 188 (e.g., http://user.example.com). 190 2. After normalizing the User-Supplied Identifier as described in 191 Section 7.2 of [OpenID], the Relying Party performs discovery on 192 it and establishes the OP Endpoint URL that the end user uses for 193 authentication. It should be noted that the User-Supplied 194 Identifier may be an OP Identifier, which allows selection of a 195 Claimed Identifier at the OP or for the protocol to proceed 196 without a Claimed Identifier if something else useful is being 197 done via an extension. 199 3. The Relying Party and the OP optionally establish an association 200 -- a shared secret established using Diffie-Hellman Key Exchange. 201 The OP uses an association to sign subsequent messages and the 202 Relying Party to verify those messages; this removes the need for 203 subsequent direct requests to verify the signature after each 204 authentication request/response. This process is desccribed in 205 Section 8 of [OpenID]. 207 4. The Relying Party redirects the end user's User-Agent to the OP 208 with an OpenID Authentication request. This occurs as stated in 209 Section 10.3 of [RFC2616]. 211 5. The OP authenticates the end user and establishes whether the end 212 user will authenticate to, and share specific attributes with, 213 the Relying Party. For instance, the OP often asks the user what 214 to do. The manner in which the end user authenticates to their 215 OP and any policies surrounding such authentication is out of 216 scope of OpenID. 218 6. The OP redirects the end user's User-Agent back to the Relying 219 Party with either an assertion that authentication is approved or 220 a message that authentication failed. 222 7. The Relying Party verifies the information received from the OP 223 including checking the Return URL, verifying the discovered 224 information, checking the nonce, and verifying the signature by 225 using either the shared key established during the association or 226 by sending a direct request to the OP. 228 When considering this flow in the context of SASL, we note that while 229 the RP and the client both must change their code to implement this 230 SASL mechanism, it is a design constraint that the OP behavior remain 231 untouched, in order for implementations to interoperate with existing 232 IdPs. Hence, an analog flow that interfaces the three parties needs 233 to be created. In the analog, we note that unlike a web server, the 234 SASL server already has some sort of session (probably a TCP 235 connection) established with the client. However, it may be 236 necessary to redirect a SASL client to another application. This 237 will be discussed below. By doing so, we externalize much of the 238 authentiction from SASL. 240 The steps are shown from below: 242 1. The Relying Party or SASL server advertises support for the SASL 243 OpenID mechanism to the client. 245 2. The client initiates a SASL authentication and transmits the 246 User-Supplied Identifier. 248 3. After normalizing the User-Supplied Identifier as discussed in 249 [OpenID], the Relying Party performs discovery on it and 250 establishes the OP Endpoint URL that the end user uses for 251 authentication. 253 4. The Relying Party and the OP optionally establish an association 254 -- a shared secret established using Diffie-Hellman Key 255 Exchange. The OP uses an association to sign subsequent 256 messages and the Relying Party to verify those messages; this 257 removes the need for subsequent direct requests to verify the 258 signature after each authentication request/response. 260 5. The Relying Party transmits an authentication request to the OP 261 to obtain an assertion in the form of an indirect request. 262 These messages are passed through the client rather than 263 directly between the RP and the OP. OpenID defines two methods 264 for indirect communication, namely HTTP redirects and HTML form 265 submission. Both mechanisms are not directly applicable for 266 usage with SASL. To ensure that a standard OpenID 2.0 capable 267 OP can be used a new method is defined in this document that 268 requires the OpenID message content to be encoded using a 269 Universal Resource Idenitifier (URI). [RFC3986] 271 6. The SASL client now sends an empty response, as authentication 272 continues via the normal OpenID flow. 274 7. At this point the client application MUST construct a URL 275 containing the content received in the previous message from the 276 RP. This URL is transmitted to the OP either by the SASL client 277 application or an appropriate handler, such as a browser. 279 8. Next the client optionally authenticates to the OP and then 280 approves or disapproves authentication to the Relying Party. 281 The manner in which the end user is authenticated to their 282 respective OP and any policies surrounding such authentication 283 is out of scope of OpenID and and hence also out of scope for 284 this specification. This step happens out of band from SASL. 286 9. The OP will convey information about the success or failure of 287 the authentication phase back to the RP, again using an indirect 288 response via the client browser or handler. The client 289 transmits over HTTP the redirect of the OP result to the RP. 290 This step happens out of band from SASL. 292 10. The RP MAY send an OpenID check_authentication request directly 293 to the OP, if no association has been established, and the OP 294 should be expected to respond. Again this step happens out of 295 band from SASL. 297 11. The SASL server sends an appropriate SASL response to the 298 client, with optional Open Simple Registry (SREG) attributes. 300 SASL Serv. Client OP 301 |>-----(1)----->| | Advertisement 302 | | | 303 |<-----(2)-----<| | Initiation 304 | | | 305 |> - - (3) - - - - - - - - - ->| Discovery 306 | | 307 |>- - -(4)- - - - - - - - - - >| Association 308 |<- - -(4)- - - - - - - - - - <| 309 | | | 310 |>-----(5)----->| | Indirect Auth Request 311 | | | 312 |<-----(6)-----<| | Client Empty Response 313 | | | 314 | |>- - (7)- - ->| Client GET to the OP (ext) 315 | | | 316 | |<- - (8)- - ->| Client / OP Auth. (ext.) 317 | | | 318 |<- - -(9)- - - + - - - - - - <| HTTP(s) Indirect id_res 319 | | | 320 |<- - -(10)- - - - - - - - - ->| Optional check_authenticate 321 | | | 322 |>-----(11)---->| | SASL completion with status 324 ----- = SASL 325 - - - = HTTP or HTTPS 327 Note the directionality in SASL is such that the client MUST send an 328 empty response. Specifically, it processes the redirect and then 329 awaits a final SASL decision, while the rest of the OpenID 330 authentication process continues. 332 2.1. Binding SASL to OpenID in the Relying Party 334 To ensure that a specific request is bound, and in particular to ease 335 interprocess communication, it may be necessary for the relying party 336 to encode some sort of nonce in the URIs it transmits through the 337 client for success or failure. This can be done in any number of 338 ways. Examples would include making changes to the base URI or 339 otherwise including an additional fragment. 341 2.2. Discussion 343 As mentioned above OpenID is primarily designed to interact with web- 344 based applications. Portions of the authentication stream are only 345 defined in the crudest sense. That is, when one is prompted to 346 approve or disapprove an authentication, anything that one might find 347 on a browser is allowed, including JavaScript, fancy style-sheets, 348 etc. Because of this lack of structure, implementations will need to 349 invoke a fairly rich browser in order to insure that the 350 authentication can be completed. 352 Once there is an outcome, the SASL server needs to know about it. 353 The astute will hopefully by now have noticed an empty client SASL 354 challenge. This is not to say that nothing is happening, but rather 355 that authentication flow has shifted from SASL to OpenID, and will 356 return when the server has an outcome to hand to the client. The 357 alternative to this flow is some signal from the HTML browser to the 358 SASL client of the results that is in turn passed to the SASL server. 359 The IPC issue this raises is substantial. Better, we conclude, to 360 externalize the authentication to the browser, and have an empty 361 client challenge. 363 OpenID is also meant to be used in serial within the web. As such, 364 there are no transaction-ids within the protocol. A transaction id, 365 can be included by the RP by appending it to the return_to URL. 367 3. OpenID SASL Mechanism Specification 369 Based on the previous figure, the following operations are performed 370 with the OpenId SASL mechanism: 372 3.1. Advertisement 374 To advertise that a server supports OpenID, during application 375 session initiation, it displays the name "OPENID20" in the list of 376 supported SASL mechanisms. 378 3.2. Initiation 380 A client initiates an OpenID authentication with SASL by sending the 381 GS2 header followed by the XRI or URI, as specified in the OpenID 382 specification. The GS2 header carries the optional authorization 383 identity. 385 initial-response = gs2-header Auth-Identifier 386 Auth-Identifier = Identifier ; authentication identifier 387 Identifier = URI / XRI ; Identifier is specified in 388 ; Sec. 7.2 of the OpenID 2.0 spec. 390 The "gs2-header" is specified in [I-D.ietf-sasl-gs2], and it is used 391 as follows. The "gs2-nonstd-flag" MUST NOT be present. The "gs2-cb- 392 flag" MUST be "n" because channel binding is not supported by this 393 mechanism. The "gs2-authzid" carries the optional authorization 394 identity. 396 The XRI syntax is defined in [XRI2.0]. URI is specified in 397 [RFC3986]. 399 3.3. Authentication Request 401 The SASL Server sends an OpenID message that contains an openid.mode 402 of either "checkid_immediate" or "checkid_setup", as specified in 403 Section 9.1 of the OpenID 2.0 specification. 405 As part of this request, the SASL server MUST append a unique 406 transaction id to the "return_to" portion of the request. The form 407 of this transaction is left to the RP to decide, but SHOULD be large 408 enough to be resistant to being guessed or attacked. 410 The client now sends that request via an HTTP GET to the OP, as if 411 redirected to do so from an HTTP server. 413 The client MUST handle both user authentication to the OP and 414 confirmation or rejection of the authentiation of the RP. 416 After all authentication has been completed by the OP, and after the 417 response has been sent to the client, the client will relay the 418 response to the Relying Party via HTTP or SSL, as specified 419 previously in the transaction. 421 3.4. Server Response 423 The Relying Party now validates the response it received from the 424 client via HTTP or HTTPS, as specified in the OpenID specification, 425 using the URI given previsiously in the transaction. 427 The response by the Relying Party consists of an application specific 428 response code indicating success or failure of authentication. In 429 the additional data, the server MAY include OpenID Simple Registry 430 (SREG) attributes that are listed in Section 4 of [SREG1.0]. They 431 are encoded as follows: 433 1. Strip "openid.sreg." from each attribute name. 435 2. Treat the concatentation of results as URI parameters that are 436 separated by an ambersand (&) and encode as one would a URI, 437 absent the scheme, authority, and the question mark. 439 For example: email=lear@example.com&fullname=Eliot%20Lear 441 More formally: 443 outcome_data = [ sreg_avp *( "," sreg_avp ) ] 444 sreg_avp = sreg_attr "=" sreg_val 445 sreg_attr = sreg_word 446 sreg_val = sreg_word 447 sreg_word = 1* ( unreserved / pct-encoded ) 448 ; pct-encoded from Section 2.1 of RFC 3986 449 ; unreserved from Section 2.3 of RFC 3986 451 In the case of failures, openid.error and openid.error_code and any 452 other appropriate diagnostic information SHOULD be reported to the 453 user, when possible, through the application protocol. 455 4. OpenID GSS-API Mechanism Specification 457 This section and its sub-sections and all normative references of it 458 not referenced elsewhere in this document are INFORMATIONAL for SASL 459 implementors, but they are NORMATIVE for GSS-API implementors. 461 The OpenID SASL mechanism is actually also a GSS-API mechanism. The 462 messages are the same, but a) the GS2 header on the client's first 463 message and channel binding data is excluded when OpenID is used as a 464 GSS-API mechanism, and b) the RFC2743 section 3.1 initial context 465 token header is prefixed to the client's first authentication message 466 (context token). 468 The GSS-API mechanism OID for OpenID is 1.3.6.1.4.1.11591.4.5. 470 OpenID security contexts always have the mutual_state flag 471 (GSS_C_MUTUAL_FLAG) set to TRUE. OpenID does not support credential 472 delegation, therefore OpenID security contexts alway have the 473 deleg_state flag (GSS_C_DELEG_FLAG) set to FALSE. 475 The OpenID mechanism does not support per-message tokens or 476 GSS_Pseudo_random. 478 4.1. GSS-API Principal Name Types for OpenID 480 OpenID supports standard generic name syntaxes for acceptors such as 481 GSS_C_NT_HOSTBASED_SERVICE (see [RFC2743], Section 4.1). 483 OpenID supports only a single name type for initiators: 484 GSS_C_NT_USER_NAME. GSS_C_NT_USER_NAME is the default name type for 485 OpenID. 487 OpenID name normalization is covered by the OpenID specification, see 488 [OpenID] section 7.2. 490 The query, display, and exported name syntaxes for OpenID principal 491 names are all the same. There are no OpenID-specific name syntaxes 492 -- applications should use generic GSS-API name types such as 493 GSS_C_NT_USER_NAME and GSS_C_NT_HOSTBASED_SERVICE (see [RFC2743], 494 Section 4). The exported name token does, of course, conform to 495 [RFC2743], Section 3.2, but the "NAME" part of the token should be 496 treated as a potential input string to the OpenID name normalization 497 rules. 499 GSS-API name attributes may be defined in the future to hold the 500 normalized OpenID Identifier. 502 5. Example 504 Suppose one has an OpenID of http://openid.example, and wishes to 505 authenticate his IMAP connection to mail.example (where .example is 506 the top level domain specified in [RFC2606]). The user would input 507 his Openid into his mail user agent, when he configures the account. 508 In this case, no association is attempted between the OpenID Consumer 509 and the OP. The client will make use of the return_to attribute to 510 capture results of the authentication to be redirected to the server. 511 Note the use of [RFC4959] for initial response. The authentication 512 on the wire would then look something like the following: 514 (S = IMAP server; C = IMAP client) 516 C: < connects to IMAP port> 517 S: * OK 518 C: C1 CAPABILITY 519 S: * CAPABILITY IMAP4rev1 SASL-IR SORT [...] AUTH=OPENID20 520 S: C1 OK Capability Completed 521 C: C2 AUTHENTICATE OPENID biwsaHR0cDovL29wZW5pZC5leGFtcGxlLw== 522 [ This is the base64 encoding of "n,,http://openid.example/". 523 Server performs discovery on http://openid.example/ ] 524 S: + aHR0cDovL29wZW5pZC5leGFtcGxlL29wZW5pZC8/b3BlbmlkLm5z 525 PWh0dHA6Ly9zcGVjcy5vcGVuaWQubmV0L2F1dGgvMi4wJm9wZW5p 526 ZC5yZXR1cm5fdG89aHR0cHM6Ly9tYWlsLmV4YW1wbGUvY29uc3Vt 527 ZXIvMWVmODg4YyZvcGVuaWQuY2xhaW1lZF9pZD1odHRwczovL29w 528 ZW5pZC5leGFtcGxlLyZvcGVuaWQuaWRlbnRpdHk9aHR0cHM6Ly9v 529 cGVuaWQuZXhhbXBsZS8mb3BlbmlkLnJlYWxtPWltYXA6Ly9tYWls 530 LmV4YW1wbGUmb3BlbmlkLm1vZGU9Y2hlY2tpZF9zZXR1cA== 531 [ This is the base64 encoding of "http://openid.example/openid/ 532 ?openid.ns=http://specs.openid.net/auth/2.0 533 &openid.return_to=https://mail.example/consumer/1ef888c 534 &openid.claimed_id=https://openid.example/ 535 &openid.identity=https://openid.example/ 536 &openid.realm=imap://mail.example 537 &openid.mode=checkid_setup" 538 with line breaks and spaces added here for readibility. 539 ] 540 C: 541 [ The client now sends the URL it received to a browser for 542 processing. The user logs into http://openid.example, and 543 agrees to authenticate imap://mail.example. A redirect is 544 passed back to the client browser who then connects to 545 https://imap.example/consumer via SSL with the results. 546 From an IMAP perspective, however, the client sends an empty 547 response, and awaits mail.example. 548 Server mail.example would now contact openid.example with an 549 openid.check_authenticate message. After that... 550 ] 551 S: + ZW1haWw9bGVhckBtYWlsLmV4YW1wbGUsZnVsbG5hbWU9RWxp 552 b3QlMjBMZWFy 553 [ Here the IMAP server has returned an SREG attribute of 554 email=lear@mail.example,fullname=Eliot%20Lear. 555 Line break added in this example for clarity. ] 556 C: 557 [ In IMAP client must send a blank response to receive data 558 that is included in a success response. ] 559 S: C2 OK 561 In this example, the SASL server / RP has made use of a transaction 562 id 1ef888c. 564 6. Security Considerations 566 This section will address only security considerations associated 567 with the use of OpenID with SASL applications. For considerations 568 relating to OpenID in general, the reader is referred to the OpenID 569 specification and to other literature. Similarly, for general SASL 570 Security Considerations, the reader is referred to that 571 specification. 573 6.1. Binding OpenIDs to Authorization Identities 575 As specified in [RFC4422], the server is responsible for binding 576 credentials to a specific authorization identity. It is therefore 577 necessary that either some sort of registration process takes place 578 to register specific OpenIDs, or that only specific trusted OpenID 579 Providers be allowed. Some out of band knowledge may help this 580 process along. For instance, users of a particular domain may 581 utilize a particular OP that enforces a mapping. 583 6.2. RP redirected by malicious URL to take an improper action 585 In the initial SASL client response a user or host can transmit a 586 malicious response to the RP for purposes of taking advantage of 587 weaknesses in the RP's OpenID implementation. It is possible to add 588 port numbers to the URL so that the outcome is the RP does a port 589 scan of the site. The URL could send the connection to an internal 590 host or even the local host, which the attacker would not normally 591 have access to. The URL could contain a protocol other than http or 592 https, such as file or ftp. 594 To mitigate this attack, implementations should carefully analyze 595 URLs received, eliminating any that would in some way be privileged. 596 A log of those sites that fail SHOULD be kept, and limitations on 597 queries from clients should be imposed, just as with any other 598 authentication attempt. It is RECOMMENDED that only http or https 599 schemas be accepted. 601 6.3. Session Swapping (Cross-Site Request Forgery) 603 There is no defined mechanism in the OpenID protocol to bind the 604 OpenID session to the user's browser. An attacker may forge a cross- 605 site request in the log-in form, which has the user logging into a 606 proper RP as the attacker. The user would not recognize they are 607 logged into the site as the attacker, and so may reveal information 608 at the RP. Cross-site request forgery is a widely exploited 609 vulnerability at web sites. This is only concern in the context SASL 610 in as much as the client is not configured with the Relying Party 611 (e.g., SASL server) in a safe manner. 613 6.4. User Privacy 615 The OP is aware of each RP that a user logs into. There is nothing 616 in the protocol to hide this information from the OP. It is not a 617 requirement to track the visits, but there is nothing that prohibits 618 the collection of information. SASL servers should be aware that 619 OpenID Providers will be track - to some extent - user access to 620 their services and any additional information that OP provides. 622 6.5. Collusion between RPs 624 It is possible for RPs to link data that they have collected on you. 625 By using the same identifier to log into every RP, collusion between 626 RPs is possible. In OpenID 2.0, directed identity was introduced. 627 Directed identity allows the OP to transform the identifier the user 628 typed in to another identifier. This way the RP would never see the 629 actual user identifier, but a randomly generated identifier. This is 630 an option the user has to understand and decide to use if the OP is 631 supporting it. 633 7. Room for Improvement 635 We note one area where there is possible room for improvement over 636 existing OpenID implementations. Because SASL is often implemented 637 atop protocols that have required some amount of provisioning, it may 638 be possible for the SASL client to signal the browser that the given 639 URL is the beginning of a sensitive transaction, and that increased 640 scrutiny should be given. A signal of some form would need to come 641 from an appropriately authorized agent that the sensitive transaction 642 is complete. An example behavior during this sensitive period might 643 be increased scrutiny of broken trust chains in certificates, or 644 perhaps disallowing such trust chains altogether. 646 8. IANA Considerations 648 The IANA is requested to register the following SASL profile: 650 SASL mechanism profile: OPENID20 652 Security Considerations: See this document 654 Published Specification: See this document 656 For further information: Contact the authors of this document. 658 Owner/Change controller: the IETF 660 Note: None 662 9. Acknowledgments 664 The authors would like to thank Alexey Melenkov, Joe Hildebrand, Mark 665 Crispin, Chris Newman, Leif Johansson, and Klaas Wierenga for their 666 review and contributions. 668 10. References 670 10.1. Normative References 672 [I-D.ietf-sasl-gs2] 673 Josefsson, S. and N. Williams, "Using GSS-API Mechanisms 674 in SASL: The GS2 Mechanism Family", draft-ietf-sasl-gs2-20 675 (work in progress), January 2010. 677 [OpenID] OpenID Foundation, "OpenID Authentication 2.0 - Final", 678 December 2007. 680 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 681 Requirement Levels", BCP 14, RFC 2119, March 1997. 683 [RFC2606] Eastlake, D. and A. Panitz, "Reserved Top Level DNS 684 Names", BCP 32, RFC 2606, June 1999. 686 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., 687 Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext 688 Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. 690 [RFC2743] Linn, J., "Generic Security Service Application Program 691 Interface Version 2, Update 1", RFC 2743, January 2000. 693 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 694 Resource Identifier (URI): Generic Syntax", STD 66, 695 RFC 3986, January 2005. 697 [RFC4422] Melnikov, A. and K. Zeilenga, "Simple Authentication and 698 Security Layer (SASL)", RFC 4422, June 2006. 700 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 701 (TLS) Protocol Version 1.2", RFC 5246, August 2008. 703 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 704 Housley, R., and W. Polk, "Internet X.509 Public Key 705 Infrastructure Certificate and Certificate Revocation List 706 (CRL) Profile", RFC 5280, May 2008. 708 [RFC6125] Saint-Andre, P. and J. Hodges, "Representation and 709 Verification of Domain-Based Application Service Identity 710 within Internet Public Key Infrastructure Using X.509 711 (PKIX) Certificates in the Context of Transport Layer 712 Security (TLS)", RFC 6125, March 2011. 714 [SREG1.0] OpenID Foundation, "OpenID Simple Registration Extension 715 version 1.0", June 2006. 717 [XRI2.0] Reed, D. and D. McAlpin, "Extensible Resource Identifier 718 (XRI) Syntax V2.0", OASIS Standard xri-syntax-V2.0-cs, 719 September 2005. 721 10.2. Informative References 723 [RFC1939] Myers, J. and M. Rose, "Post Office Protocol - Version 3", 724 STD 53, RFC 1939, May 1996. 726 [RFC3501] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION 727 4rev1", RFC 3501, March 2003. 729 [RFC3920] Saint-Andre, P., Ed., "Extensible Messaging and Presence 730 Protocol (XMPP): Core", RFC 3920, October 2004. 732 [RFC4959] Siemborski, R. and A. Gulbrandsen, "IMAP Extension for 733 Simple Authentication and Security Layer (SASL) Initial 734 Client Response", RFC 4959, September 2007. 736 [W3C.REC-html401-19991224] 737 Hors, A., Jacobs, I., and D. Raggett, "HTML 4.01 738 Specification", World Wide Web Consortium 739 Recommendation REC-html401-19991224, December 1999, 740 . 742 Appendix A. Changes 744 This section to be removed prior to publication. 746 o 02 Address all WGLC comments. 748 o 01 Specific text around possible improvements for OOB browser 749 control in security considerations. Also talk about transaction 750 id. 752 o 00 WG -00 draft. Slight wording modifications abou design 753 constraints per Alexey. 755 o 02 Correct single (significant) error on mechanism name. 757 o 01 Add nonce discussion, add authorized identity, explain a 758 definition. Add gs2 support. 760 o 00 Initial Revision. 762 Authors' Addresses 764 Eliot Lear 765 Cisco Systems GmbH 766 Richtistrasse 7 767 Wallisellen, ZH CH-8304 768 Switzerland 770 Phone: +41 44 878 9200 771 Email: lear@cisco.com 773 Hannes Tschofenig 774 Nokia Siemens Networks 775 Linnoitustie 6 776 Espoo 02600 777 Finland 779 Phone: +358 (50) 4871445 780 Email: Hannes.Tschofenig@gmx.net 781 URI: http://www.tschofenig.priv.at 783 Henry Mauldin 784 Cisco Systems, Inc. 785 170 West Tasman Drive 786 San Jose, CA 95134 787 USA 789 Phone: +1 (800) 553-6387 790 Email: hmauldin@cisco.com 792 Simon Josefsson 793 SJD AB 794 Hagagatan 24 795 Stockholm 113 47 796 SE 798 Email: simon@josefsson.org 799 URI: http://josefsson.org/