2 Network Working Group S.E. Kille
3 INTERNET-DRAFT MessagingDirect Inc.
4 Expires in six months February 2000
5 Intended Category: Standard
8 X.509 Authentication SASL Mechanism
9 <draft-ietf-ldapext-x509-sasl-03.txt>
11 1. Status of this Memo
13 This document is an Internet-Draft and is in full conformance with all
14 provisions of Section 10 of RFC2026. Internet-Drafts are working docu-
15 ments of the Internet Engineering Task Force (IETF), its areas, and its
16 working groups. Note that other groups may also distribute working
17 documents as Internet-Drafts.
19 Internet-Drafts are draft documents valid for a maximum of six months
20 and may be updated, replaced, or obsoleted by other documents at any
21 time. It is inappropriate to use Internet-Drafts as reference material
22 or to cite them other than as "work in progress."
24 The list of current Internet-Drafts can be accessed at
25 http://www.ietf.org/ietf/1id-abstracts.txt
27 The list of Internet-Draft Shadow Directories can be accessed at
28 http://www.ietf.org/shadow.html.
32 To learn the current status of any Internet-Draft, please check the
33 "1id-abstracts.txt" listing contained in the Internet-Drafts Shadow
34 Directories on ds.internic.net (US East Coast), nic.nordu.net (Europe),
35 ftp.isi.edu (US West Coast), or munnari.oz.au (Pacific Rim).
39 This document defines a SASL [1] authentication mechanism based on X.509
40 strong authentication [3], providing two way authentication. This
41 mechanism is only for authentication, and has no effect on the protocol
42 encodings and is not designed to provide integrity or confidentiality
47 The mechanism provides two way strong authentication as defined in
48 X.509. The encoding is based on that used by X.500 in the DAP, DSP, and
51 The mechanism is based on use of an asymmetric (public key) signing
52 mechanism. This SASL mechanism contains two authentication mechanisms:
54 - Client authentication is where the client provides information to
55 the server, so that the server can authenticate the client.
57 - Server authentication is where the server provides information to
64 Expires August 2000 IP X.509 SASL Authentication INTERNET DRAFT
67 the client, so that the client can authenticate the server.
70 This mechanism is given three SASL keys for different variants:
72 - "X509-C-<algorithm>" for client authentication only.
74 - "X509-S-<algorithm>" for server authentication only.
76 - "X509-B-<algorithm>" for client and server authentication. In this
77 case client authentication is done prior to server authentication.
79 Each SASL key may be used with a list of algorithms. A list of sup-
80 ported algorithms is given in Section 7.
82 For Client Authentication ("X509-C-"):
84 1. The client generates the credentials (SASLStrongCredentials) from
85 information on both parties and a random number, and signs the
86 enclosed token with its own private key.
88 2. The client sends credentials to the server.
90 3. The server verifies these credentials using the client's public
91 key, and the authentication is complete.
93 For Server Authentication ("X509-S-"):
95 1. The server generates the credentials (SASLStrongCredentials) from
96 information on both parties and a random number, and signs the
97 enclosed token with its own private key.
99 2. The server sends credentials to the client.
101 3. The client verifies these credentials using the server's public
102 key, and the authentication is complete.
104 For most SASL based protocols, server only authentication will not be
105 useful. However, this is included here, as the definition is required
106 for "client and server", and it may be useful for future protocols.
108 For Client and Server Authentication ("X509-B-"), the procedure for
109 "X509-C-" is performed and then followed by the procedure for "X509-S-".
110 The Client needs to go first, as for some protocols the server will need
111 to get information about the client from the client authentication in
112 order to be able to perform the server authentication.
121 Expires August 2000 IP X.509 SASL Authentication INTERNET DRAFT
126 The SASLStrongCredentials, which is the definition of the data format
127 exchanged, is encoded using ASN.1 Distinguished Encoding Rules (DER).
129 4. Why this SASL Mechanism is Needed
131 This section discusses the requirements for this SASL mechanism.
133 4.1. Benefits of a Public Key Mechanism
135 The key benefit of asymmetric (public key) security, is that the secret
136 (private key) only needs to be placed with the entity that is being
137 authenticated. Thus a private key can be issued to a client, which can
138 then be authenticated by ANY server based on a token generated by the
139 client and the generally available public key. Symmetric authentication
140 mechanisms (password mechanisms such as CRAM-MD5) require a shared
141 secret, and the need to maintain it at both endpoints. This means that
142 a secret key for the client needs to be maintained at every server which
143 may need to authenticate the client.
145 This is particularly an issue for protocols such as LDAP, where a client
146 may connect to and be authenticated by a large number of servers. In
147 this situation, the requirement to maintain secret keys on all possible
148 servers is not practical, which makes authentication mechanisms such as
149 CRAM-MD5 unsuitable for LDAP in many situations.
151 4.2. Why Authentication Only?
153 This service provides authentication only. The primary reason for this
154 is that it makes the mechanism very simple. It would be possible to
155 define a more complex mechanism which exchanged session keys and also
156 provided confidentiality and/or integrity.
158 There are a number of places where an authentication only service is
161 - Where confidentiality and integrity are provided by lower layers
162 (e.g., TLS or IPSec).
164 - Where confidentiality or integrity services are provided by the
165 application (e.g., X.500 signed operations).
167 - Where physical and other security aspects of the environment do no
168 require confidentiality and integrity services.
170 - For legacy applications where changes to the data exchange would be
171 difficult to integrate.
178 Expires August 2000 IP X.509 SASL Authentication INTERNET DRAFT
181 4.3. Relationship to TLS
183 The functionality defined here can be provided by TLS, and it is impor-
184 tant to consider why it is useful to have it in both places. There are
185 a number of reasons for this:
187 - SASL. SASL also duplicates TLS functionality, and the rationale
188 for this is clearly given in RFC 2222 [1]. These arguments apply
191 - Simplicity. This mechanism is simpler than TLS. If there is only
192 a requirement for this functionality (as distinct from all of TLS),
193 this simplicity will facilitate deployment.
195 - Layering. The SASL mechanism to establish authentication works
196 cleanly with most protocols. This mechanism can fit more cleanly
197 than TLS for some protocols.
199 - Proxy support. Proxys can be cleanly supported with this mechan-
200 ism. This works because the proxy can authenticate the client, and
201 then simply pass the credentials on the server, using the previous
204 - This mechanism provides a simpler solution where no Data Confiden-
205 tiality and integrity required.
209 The SASLStrongCredentials defined here are based on the StrongCreden-
210 tials defined in X.511, making use of the SIGNED Macro and Certification
211 Path definitions of X.509. Two optional fields have been added, the
212 second of which makes use of GeneralName defined in X.509 [6]. The
213 credentials definition is given here for clarity. The formal defini-
214 tions of CertificationPath, AlgorithmIdentifier, and DistinguishedName
215 are by reference to X.511. The formal definition of GeneralName is
218 There are a number of names referenced in these definitions. There are
219 two entities involved in the interaction:
221 1. Signer. This is the entity that is creating the SASLStrongCreden-
222 tials, and singing it with its private key. The signer is also
223 referred to as the "subject", in line with PKIX terminology, as the
224 signer is essentially proving its own identity.
226 2. Target. This is the entity which is expected to verify the signa-
227 ture. The target's name is included in order to prevent replay
228 attacks, and so it is only the target that can securely verify the
235 Expires August 2000 IP X.509 SASL Authentication INTERNET DRAFT
238 SASLStrongCredentials (other entities can verify the signature, but
239 they would not be able to detect replay attack). This enables the
240 token to be used to build trust chains.
242 SASLStrongCredentials ::= SET {
243 certification-path [0] CertificationPath OPTIONAL,
244 bind-token [1] SASLToken,
245 name [2] DistinguishedName OPTIONAL} -- signer
247 SASLToken ::= SIGNED { SEQUENCE {
248 algorithm [0] AlgorithmIdentifier,
249 name [1] DistinguishedName, -- target
251 random [3] BITSTRING,
252 response [4] BITSTRING OPTIONAL,
253 target-name [20] GeneralName OPTIONAL,
254 signer-name [21] GeneralName OPTIONAL,
255 previous-token [22] SASLStrongCredentials OPTIONAL}}
257 PreviousToken ::= SEQUENCE {
259 protocol [1] Protocol OPTIONAL }
263 GeneralName ::= CHOICE {
264 otherName [0] OtherName,
265 rfc822Name [1] IA5String,
266 dNSName [2] IA5String,
267 x400Address [3] ORAddress,
268 directoryName [4] Name,
269 edipartyname [5] EDIPartyName,
270 uniformresouceidentifier [6] IA5String,
271 iPAddress [7] OCTET STRING,
272 registeredID [8] OBJECT IDENTIFIER }
274 The elements of SASLStrongCredentials are as follows:
277 This provides a mechanism for exchange of certificates, which may
278 help the recipient to verify the credentials. If this is included,
279 it must be consistent with the name in SASLStrongCredentials.name.
280 This information is provided by the entity generating the token to
281 facilitate verification. The entity verifying the token is not
282 required to use this information.
285 This is the signed token, which is the core of the credentials.
292 Expires August 2000 IP X.509 SASL Authentication INTERNET DRAFT
295 name:This is the distinguished name of the signer of the token. For
296 client authentication, this will need to be included unless the
297 information is carried in another protocol element of the exchange
298 (which will typically not be the case). For server authentication,
299 this will not normally be needed, as the client will have a priori
300 knowledge of the server it is connecting to.
302 The entity verifying the token shall ensure that this name is con-
303 sistent with the certificate, as a part of the verification pro-
306 The signed token contains the following elements.
309 This is the signature algorithm used to sign the token. This is
310 included for compatibility with X.509, and generally implies both
311 an asymmetric algorithm and a hash algorithm. The value SHALL be
312 consistent with the algorithm defined by the SASL mechanism (e.g.,
315 name:This is the distinguished name of the target (which will verify the
316 token). For client authentication, this will be the name of the
319 This element is mandatory for compatibility with X.511. If a name
320 form other than Distinguished Name is used, this element should
321 contain a null distinguished name, and a name included in the
322 signer-name parameter.
324 time:This is the time that the token expires.
327 This is a random number, which must be unique for the target over
328 the valid life of the token. This is included to prevent replay
329 attack. It is recommended that this number is at least as long as
330 the block size of the hash algorithm used.
333 This is used to carry a number derived from random if challenge
334 response of authentication is required. This shall be used in the
335 client phase of X509-B- and in no other circumstances. In this
336 case, the value used in this field in the client authentication
337 shall be used in the SASLToken.random field of the server authenti-
341 There is a gap in the sequence numbering. Items 6-9 are used in
342 X.500 DAP, but are not appropriate here.
349 Expires August 2000 IP X.509 SASL Authentication INTERNET DRAFT
353 This is a very general definition of a name, taken from X.509(v3).
354 This definition is being used by ongoing work on PKI. This enables
355 authentication identifiers other than distinguished names to be
356 used. This will be important when the target does not have a dis-
359 This field is needed when access control is to be applied on the
360 basis of a name different to the one doing the signing. The name
361 of the entity doing the signing is in SASLStrongCredentials.name,
362 and this is verified by the signing process. This field, verified
363 by the signature, is an alternate name to be used for access con-
364 trol purposes in the authentication and for ongoing purposes with
365 the association established. In SASL terminology, this is the
366 "authorization entity".
368 Note that this description is for tutorial purposes only, and the
369 formal definition is taken from X.511.
372 This has the same function as name, but allows for encodings other
373 than Distinguished Name.
376 This gives a mechanism to include a previous token, which includes
377 a SASLToken, and optionally a protocol if this is different from
378 the current protocol. The mechanism might be used in a firewall,
379 which does protocol relay. The initial token is generated by the
380 client, which is then encapsulated in another token generated by
381 the firewall. This enables a signed trust chain to be built.
382 The "change of protocol" enables a server to use a different proto-
383 col on behalf of its client (e.g., an ACAP server performing a
384 directory lookup on behalf of the ACAP client).
386 Protocols are represented as Integers, identified by the TCP Port
389 6. Distinguished Names
391 The X.509 strong authentication mechanism makes use of distinguished
392 names to identify the target. For some protocols, such as LDAP [2],
393 this is natural. For protocols which make use of internet domain names
394 to identify objects, the representation defined in RFC 2247 [5] MAY be
395 used as an alternative to subject-name in the token. For an Internet
396 Mailbox the local part must be encoded as a domain component. For exam-
397 ple "J.Bloggs@widget.com" is represented as the distinguished name
398 "DC=J.Bloggs,DC=widget,DC=com".
406 Expires August 2000 IP X.509 SASL Authentication INTERNET DRAFT
409 7. Supported Algorithms
411 The following signature algorithms are recognized for use with this
412 mechanism, and identified by a key. Each key would be combined to make
413 three possible SASL mechanisms. For example for the DSA-SHA1 algorithm
414 would give X509-C-DSA-SHA1, X509-S-DSA-SHA1, and X509-B-DSA-SHA1. All
415 algorithm names are constrained to 13 characters, to keep within the
416 total SASL limit of 20 characters.
418 The following table gives a list of algorithm keys, noting the
419 object identifier and the body which assigned the identifier.
422 RSA-MD4 1.3.14.2.2.2 OIW
423 RSA-MD5 1.3.14.2.2.3 OIW
424 RSA-MD4-ENCR 1.3.14.2.2.4 OIW
425 DSA-SHA 1.3.14.2.2.13 OIW
426 DSA-SHA-COMM 1.3.14.2.2.20 OIW
427 RSA-MD2 1.3.14.7.3.1 OIW
428 ELGAMAL-MD2 1.3.14.7.3.2 OIW
429 RSA-MD2-ENCR 1.2.840.113549.1.1.2 RSA
430 RSA-MD5-ENCR 1.2.840.113549.1.1.4 RSA
431 RSA-SHA1-ENC 1.2.840.113549.1.1.5 RSA
432 MSP-SDNS 2.16.840.1.101.2.1.1.1 DMS
433 MSP-MOSAIC 2.16.840.1.101.2.1.1.2 DMS
434 DSA-SHA1 1.2.840.10040.4.3 ANSI
437 Two special algorithm keys are defined:
439 - IMPLICIT. This is used when the signer has a priori knowledge of
440 the algorithm to use. The algorithms is then identified solely by
441 the AlgrithmIdentifier Object Identifier in the token.
443 - X-*. Any algorithm starting with "X-" is reserved for private
446 Support of the DSS-SHA1 algorithm is recommended for use with this
451 The following example shows use with IMAP4. The example is designed to
452 illustrate the protocol interaction and does not provide valid encoding
455 S: * OK IMAP4 server ready
463 Expires August 2000 IP X.509 SASL Authentication INTERNET DRAFT
466 S: * CAPABILITY IMAP4 AUTH=CRAM-MD5 AUTH=X509-C-DSA-SHA1 AUTH=X509-C-RSA-MD5
468 C: AOO2 AUTHENTICATE X509-C-DSS-SHA1
471 S: + 13c3FF44.......==
472 S: AOO3 OK Welcome, authenticated user: CN=Joe Bloggs,O=Widget,C=GB
475 The ASN.1 values here are fake. A real example should be used
477 (perhaps include ASN.1 value notation), when one can be generated
478 from a prototype implementation.
480 9. Security Considerations
482 These algorithms are designed to be used for authentication where the
483 underlying transport service cannot guarantee confidentiality. These
484 mechanisms do not prevent an authenticated association from being
489 Design ideas included in this document are based on those from ITU and
490 ISO, and the IETF ASID Working Groups. Useful ideas were taken from a
491 note "X.500 Strong Authentication Mechanisms for LDAPv3" by Mark Wahl.
492 The contributions of individuals in these working groups, including
493 Harald Alvestrand (Maxware), Alexis Bor (Directory Works), David Boyce
494 (Isode), William Curtin (DISA), Bruce Greenblatt (RSA), Steve Hole
495 (Esys), Tim Howes (Netscape), John Myers (Netscape), Chris Newman (Inno-
496 soft), Frank Siebeblist (DASCOM), Erik Skovgaard (Geotrain), and Sean
497 Turner (IECA) are gratefully acknowledged.
501 [1] J. Meyers, "Simple Authentication and Security Layer", RFC 2222,
504 [2] M. Wahl, T. Howes, S. Kille, "Lightweight Directory Access Protocol
505 (v3)", RFC 2252, December 1997.
507 [3] ITU-T Recommendation X.509 (1997) | ISO/IEC 9594-8:1997, Information
508 Technology - Open Systems Interconnection - The Directory: Authentica-
511 [4] ITU-T Recommendation X.511 (1997) | ISO/IEC 9594-8:1997, Information
512 Technology - Open Systems Interconnection - The Directory: Abstract
520 Expires August 2000 IP X.509 SASL Authentication INTERNET DRAFT
523 [5] S. Kille, M.Wahl, A. Grimstad, R. Huber, S. Sataluri, "Using Domains
524 in LDAP/X.500 Distinguished Names", RFC 2247, January 1998.
535 Phone: +44-20-8332-9091
536 Email: Steve.Kille@messagingdirect.com