idnits 2.17.1 draft-wibrown-ldapssotoken-00.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 : ---------------------------------------------------------------------------- ** The document seems to lack a Security Considerations section. ** The document seems to lack an IANA Considerations section. (See Section 2.2 of https://www.ietf.org/id-info/checklist for how to handle the case when there are no actions for IANA.) ** The abstract seems to contain references ([RFC2222]), 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 == Using lowercase 'not' together with uppercase 'MUST', 'SHALL', 'SHOULD', or 'RECOMMENDED' is not an accepted usage according to RFC 2119. Please use uppercase 'NOT' together with RFC 2119 keywords (if that is what you mean). Found 'MUST not' in this paragraph: The extended operation requestValue MUST not be set for LDAP SSO Token revocation. -- The document date (April 08, 2016) is 2939 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) -- Obsolete informational reference (is this intentional?): RFC 2222 (Obsoleted by RFC 4422, RFC 4752) Summary: 3 errors (**), 0 flaws (~~), 2 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Internet Engineering Task Force W. Brown 3 Internet-Draft Red Hat Asia-Pacific Pty Ltd 4 Intended status: Standards Track S. Sorce, Ed. 5 Expires: October 10, 2016 Red Hat, Inc. 6 K. Andrews, Ed. 7 The University of Adelaide 8 April 08, 2016 10 Draft LDAP Single Sign On Token Processing 11 draft-wibrown-ldapssotoken-00 13 Abstract 15 LDAP Single Sign On Token is a SASL (Simple Authentication and 16 Security Layer RFC 2222 [RFC2222]) mechanism to allow single sign-on 17 to an LDAP Directory Server environment. Tokens generated by the 18 LDAP server can be transmitted through other protocols and channels, 19 allowing a broad range of clients and middleware to take advantage of 20 single sign-on in environments where Kerberos v5 or other Single Sign 21 On mechanisms may not be avaliable. 23 Status of This Memo 25 This Internet-Draft is submitted in full conformance with the 26 provisions of BCP 78 and BCP 79. 28 Internet-Drafts are working documents of the Internet Engineering 29 Task Force (IETF). Note that other groups may also distribute 30 working documents as Internet-Drafts. The list of current Internet- 31 Drafts is at http://datatracker.ietf.org/drafts/current/. 33 Internet-Drafts are draft documents valid for a maximum of six months 34 and may be updated, replaced, or obsoleted by other documents at any 35 time. It is inappropriate to use Internet-Drafts as reference 36 material or to cite them other than as "work in progress." 38 This Internet-Draft will expire on October 10, 2016. 40 Copyright Notice 42 Copyright (c) 2016 IETF Trust and the persons identified as the 43 document authors. All rights reserved. 45 This document is subject to BCP 78 and the IETF Trust's Legal 46 Provisions Relating to IETF Documents 47 (http://trustee.ietf.org/license-info) in effect on the date of 48 publication of this document. Please review these documents 49 carefully, as they describe your rights and restrictions with respect 50 to this document. Code Components extracted from this document must 51 include Simplified BSD License text as described in Section 4.e of 52 the Trust Legal Provisions and are provided without warranty as 53 described in the Simplified BSD License. 55 Table of Contents 57 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 58 2. Requirements Language . . . . . . . . . . . . . . . . . . . . 3 59 3. Format . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 60 4. SASL Component . . . . . . . . . . . . . . . . . . . . . . . 3 61 4.1. Token formats . . . . . . . . . . . . . . . . . . . . . . 3 62 4.2. SASL Client . . . . . . . . . . . . . . . . . . . . . . . 5 63 4.3. SASL Authentication . . . . . . . . . . . . . . . . . . . 6 64 4.4. Valid Not Before Attribute . . . . . . . . . . . . . . . 6 65 5. LDAP Component . . . . . . . . . . . . . . . . . . . . . . . 7 66 5.1. Token Generation . . . . . . . . . . . . . . . . . . . . 7 67 5.1.1. Token Generation Extended Operation . . . . . . . . . 8 68 5.2. Token Revocation . . . . . . . . . . . . . . . . . . . . 8 69 5.2.1. Token Revocation Extended Operation . . . . . . . . . 8 70 5.3. Binding . . . . . . . . . . . . . . . . . . . . . . . . . 9 71 6. Requirements . . . . . . . . . . . . . . . . . . . . . . . . 9 72 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 9 73 7.1. Normative References . . . . . . . . . . . . . . . . . . 9 74 7.2. Informative References . . . . . . . . . . . . . . . . . 9 75 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 9 77 1. Introduction 79 The need for new, simple single sign-on capable systems has arisen 80 with the development of new technologies and systems. For these 81 systems we should be able to provide a simple, localised and complete 82 single sign-on service. This does not aim to replace Kerberos V5. 83 It is designed for when Kerberos is too invasive for installation in 84 an environment. 86 Tokens generated by this system should be able to be transmitted over 87 different protocols allowing middleware to relay tokens to clients. 88 Clients can then contact the middleware natively and the middleware 89 can negotiate the client authentication with the LDAP server. 91 This implementation will provide an LDAP extended operation to create 92 tokens which a client may cache, or relay to a further client. The 93 token can then be sent in a SASL bind request to the LDAP server. 94 The token remains valid over many binds. Finally, Tokens for a 95 client are always able to be revoked at the LDAP Server using an LDAP 96 extended operation, allowing global logout by the user or 97 administrator. 99 2. Requirements Language 101 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 102 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 103 document are to be interpreted as described in RFC 2119 [RFC2119]. 105 3. Format 107 This document has two components. A SASL Mechanism, and LDAP 108 extended operations. 110 There is no strict requirement for the two to coexist: The LDAP 111 Operation is an implementation of the service providing tokens, and 112 the SASL Mechanism to authenticate them. 114 In theory, an alternate protocol and database could generate and 115 authenticate these tokens. 117 4. SASL Component 119 4.1. Token formats 121 Token formats are server implementation specific: As they are the 122 only entity that will decrypt and consume them, they have the option 123 to provide these in any format they wish. 125 This means the client will only see an opaque data structure, and 126 will only need to transmit this opaque structure as part of the 127 authentication request. 129 For the token system to operate correctly the server MUST generate 130 tokens that contain at least these three values: 132 o Date Time Issued 134 o Date Time Until 136 o User Unique Id 137 As the client does not ever see the contents the User Unique Id can 138 be anything within the database that uniquely identifies the user 139 that is the holder of the token. 141 The User Unique Id MUST be an UTF8 String. 143 The token format MUST be encrypted. The token format can be 144 decrypted with either a asymmetric or symmetric keying system. 146 The token format MUST have a form of data authentication. This can 147 be through authenticated encryption, or validation of a hash. 149 The Date Time Issued MUST be a complete timestamp in UTC, to prevent 150 issues with changing timezones. 152 Without these guarantees, the token system is not secure, and is 153 vulnerable to credential forgery attacks. 155 Here is an EXAMPLE ASN.1 format that would be encrypted and sent to 156 the client: 158 LDAPSSOToken ::= SEQUENCE { 159 DateTimeIssued GeneralizedTime, 160 DateTimeUntil GeneralizedTime, 161 UserUniqueId UTF8String } 163 Figure 1 165 This would be encrypted with AES-GCM and transmitted to the client. 167 Another example would be to use a fernet token Fernet Specification 168 [FERNETSPEC]. 170 Version || Timestamp || IV || Ciphertext || HMAC 172 Figure 2 174 Timestamp can be considered to be the DateTimeIssued as: 176 "This field is a 64-bit unsigned big-endian integer. It records the 177 number of seconds elapsed between January 1, 1970 UTC and the time 178 the token was created." 180 We can then create a Cipher text containing: 182 Date Time Until || User Unique Id 184 Figure 3 186 The Date Time Until is a 64-bit unsigned big-endian integer. It is, 187 like Date Time Issued, the number of seconds since January 1, 1970 188 UTC, and the token creation time added to the number of seconds of 189 the requested life time. 191 This example format satisfies all of our data requirements for the 192 sso token system. 194 4.2. SASL Client 196 The client will request a token from the authentication server. The 197 acquisition method for the token is discussed in section XXX. 199 For authentication, the client MUST send the token as it was 200 received. IE changes to formatting are not permitted. 202 The client MAY transform the token if acting in a proxy fashion. 203 However this transformation must be deterministic and able to be 204 reversed to satisfy the previous requirement. 206 +-------+ +-------------+ +--------+ 207 | LDAP | | HTTP server | | Client | 208 | | | | <- Login -- | | 209 | | <-- Bind -- | | | | 210 | | - Success -> | | | | 211 | | <- Req Token | | | | 212 | | -- Token --> | | | | 213 | | <- Unbind - | | | | 214 | | - Success -> | | | | 215 | | | Html Escape | | | 216 | | | | -- Safe --> | | 217 | | | | Token | | 218 | | | | | Store | 219 | | | | < Request +- | | 220 | | | Reverse esc | Token | | 221 | | < Token Bind | | | | 222 | | - Success -> | | | | 223 | | <- Operation | | | | 224 | | <- Unbind - | | | | 225 | | - Success -> | | | | 226 | | | | - Response > | | 227 +-------+ +-------------+ +--------+ 229 Figure 4 231 This example shows how a client is issued with a token when 232 communicating with a web server via the HTTP intermediate. The 233 Client does not need to be aware of the SASL/LDAP system in the 234 background, or the token's formatting rules. Provided the HTTP 235 server in proxy, if required to transform the token, is able to undo 236 the transformations, this is a valid scenario. For example, HTML 237 escaping a base64 token. 239 4.3. SASL Authentication 241 The client issues a SASL bind request with the mechanism name 242 LDAPSSOTOKEN. 244 The client provides the encrypted token that was provided in the 245 LDAPSSOTokenResponse Token Field. 247 The token is decrypted and authenticated based on the token format 248 selected by the server. The server MAY attempt multiple token keys 249 and or formats to find the correct issuing format and key. 251 If the token decryption fails, the attempt with this key and format 252 MUST be considered to fail. 254 If the values have been tampered with, IE hash authentication fails, 255 the attempt with the key and format MUST be considered to fail. 257 The token decryption MUST return a valid DateTimeUntil, 258 DateTimeIssued and User Unique Id. If this is not returned, the 259 decryption MUST be considered to fail. 261 If all token formats and keys fail to decrypt, this MUST cause an 262 invalidCredentials error. 264 The DateTimeUntil field is checked against the servers current time. 265 If the current time exceeds or is equal to DateTimeUntil, 266 invalidCredentials MUST be returned. 268 The User Unique Id is validated to exist on the server. If the User 269 Unique Id does not exist, invalidCredentials MUST be returned. 271 The DateTimeIssued field is validated against the User Unique Id 272 object's attribute or related attribute that contains "Valid Not 273 Before". If the value of "Valid Not Before" exceeds or is equal to 274 DateTimeIssued, invalidCredentials MUST be returned. 276 Only if all of these steps have succeeded, then the authentication is 277 considered successful. 279 4.4. Valid Not Before Attribute 280 The management and details of the "Valid Not Before" attribute are 281 left to the implementation to decide how to implement and manage. 282 The implementation should consider how an administrator or 283 responsible party could revoke tokens for users other than their own. 284 The Valid Not Before SHOULD be replicated between LDAP servers to 285 allow correct revocation across many LDAP servers. For example, 286 Valid Not Before MAY be an attribute on the User Unique Id object, or 287 MAY be on another object with a unique relation to the User Unique 288 Id. 290 5. LDAP Component 292 5.1. Token Generation 294 An ldap extended operation is issued as per Section 4.12 of RFC 4511 295 [RFC4511]. 297 The LDAP OID to be used for the LDAPSSOTokenRequest is 298 2.16.840.1.113730.3.5.14. 300 The LDAP OID to be used for the LDAPSSOTokenResponse is 301 2.16.840.1.113730.3.5.15. 303 A User Unique Id is selected. This may be the Bind DN, UUID or other 304 utf8 identifier that uniquely determines an object. 306 The extended operation must fail if the connection SSF is 0. 308 Tokens must not be generated for Anonymous binds. This means, tokens 309 may only be generated for connections with a valid bind dn set. 311 Token requests MUST contain a requested lifetime in seconds. The 312 server MAY choose to ignore this lifetime and set it's own value. 314 A token request of a negative or zero value SHOULD default to a 315 server definied minimum lifetime. 317 The token is created as per an example token format in 4.1. This 318 value is then encrypted with an encryption algorithm of the servers 319 choosing. The client does not need to be aware of the encryption 320 algorithm. 322 The DateTimeIssued, DateTimeUntil and User Unique Id are collected in 323 the format required by the token format we are choosing to use in the 324 server. The token is then generated by the chosen algorithm. 326 The encrypted token is sent to the client in the LDAPSSOTokenResponse 327 structure, along with the servers chosen valid life time as a guide 328 for the client to approximate the expiry of the token. This valid 329 life time value is in seconds. 331 If the token cannot be generated due to a server error, 332 LDAP_OPERATION_ERROR MUST be returned. 334 5.1.1. Token Generation Extended Operation 336 LDAPSSOTokenRequest ::= SEQUENCE { 337 ValidLifeTime INTEGER } 339 LDAPSSOTokenResponse ::= SEQUENCE { 340 ValidLifeTime INTEGER, 341 EncryptedToken OCTET STRING 342 } 344 Figure 5 346 5.2. Token Revocation 348 An ldap extended operation is issued as per Section 4.12 RFC 4511 349 [RFC4511]. 351 The LDAP OID to be used for LDAPSSOTOKENRevokeRequest is 352 2.16.840.1.113730.3.5.16. 354 The extended operation MUST fail if the connection is anonymous. 356 The extended operation MUST fail if the connection SSF is 0. 358 The extended operation MUST only act upon the "Valid Not Before" 359 attribute related to the bind DN of the connection. 361 Upon recieving the extended operation to revoke tokens, the directory 362 server MUST set the current BindDN's related "Valid Not Before" 363 attribute timestamp to the current datetime. This will have the 364 effect, that all previously issued tokens are invalidated. 366 This revocation option must work regardless of directory server 367 access controls on the attribute containing "Valid Not Before". 369 5.2.1. Token Revocation Extended Operation 371 The extended operation requestValue MUST not be set for LDAP SSO 372 Token revocation. 374 The extended operation does not provide a response OID. The result 375 is set in the LDAPResult. 377 5.3. Binding 379 This assumes the successful completion of the SASL Authentication 380 with a succesful result. 382 The Object is retrived from the User Unique Id, and a Bind DN 383 Determined. 385 The current Bind DN MUST be set to the Bind DN of the object that is 386 determined, and the result ldap success is returned. 388 6. Requirements 390 The SASL mechanism, LDAPSSOTOKEN, MUST be registered to IANA as per 391 RFC 2222 [RFC2222] Section 6.4 393 7. References 395 7.1. Normative References 397 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 398 Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/ 399 RFC2119, March 1997, 400 . 402 7.2. Informative References 404 [FERNETSPEC] 405 Maher, T. and K. Rarick, "Fernet Specification", 2013, 406 . 408 [RFC2222] Myers, J., "Simple Authentication and Security Layer 409 (SASL)", RFC 2222, DOI 10.17487/RFC2222, October 1997, 410 . 412 [RFC4511] Sermersheim, J., Ed., "Lightweight Directory Access 413 Protocol (LDAP): The Protocol", RFC 4511, DOI 10.17487/ 414 RFC4511, June 2006, 415 . 417 Authors' Addresses 418 William Brown 419 Red Hat Asia-Pacific Pty Ltd 420 Level 1, 193 North Quay 421 Brisbane, Queensland 4000 422 AU 424 Email: wibrown@redhat.com 426 Simo Sorce (editor) 427 Red Hat, Inc. 429 Email: simo@redhat.com 431 Kieran Andrews (editor) 432 The University of Adelaide 433 Adelaide, South Australia 5005 434 AU 436 Email: kieran.andrews@adelaide.edu.au