draft-ietf-ldapbis-dn-01.txt   draft-ietf-ldapbis-dn-02.txt 
INTERNET-DRAFT Editor: Kurt D. Zeilenga INTERNET-DRAFT Editor: Kurt D. Zeilenga
Intended Category: Standard Track OpenLDAP Foundation Intended Category: Standard Track OpenLDAP Foundation
Expires: 26 August 2001 26 February 2001 Expires: 29 September 2001 29 March 2001
Obsoletes: 2253 Obsoletes: 2253
Lightweight Directory Access Protocol (v3): Lightweight Directory Access Protocol (v3):
UTF-8 String Representation of Distinguished Names UTF-8 String Representation of Distinguished Names
<draft-ietf-ldapbis-dn-01.txt> <draft-ietf-ldapbis-dn-02.txt>
Status of Memo Status of Memo
This document is an Internet-Draft and is in full conformance with all This document is an Internet-Draft and is in full conformance with all
provisions of Section 10 of RFC2026. provisions of Section 10 of RFC2026.
This document is intended to be, after appropriate review and This document is intended to be, after appropriate review and
revision, submitted to the RFC Editor as a Standard Track document revision, submitted to the RFC Editor as a Standard Track document
replacing RFC 2253. Distribution of this memo is unlimited. replacing RFC 2253. Distribution of this memo is unlimited.
Technical discussion of this document will take place on the IETF LDAP Technical discussion of this document will take place on the IETF LDAP
skipping to change at page 2, line 9 skipping to change at page 2, line 11
The X.500 Directory uses distinguished names as the primary keys to The X.500 Directory uses distinguished names as the primary keys to
entries in the directory. Distinguished Names are encoded in ASN.1 in entries in the directory. Distinguished Names are encoded in ASN.1 in
the X.500 Directory protocols. In the Lightweight Directory Access the X.500 Directory protocols. In the Lightweight Directory Access
Protocol, a string representation of distinguished names is Protocol, a string representation of distinguished names is
transferred. This specification defines the string format for transferred. This specification defines the string format for
representing names, which is designed to give a clean representation representing names, which is designed to give a clean representation
of commonly used distinguished names, while being able to represent of commonly used distinguished names, while being able to represent
any distinguished name. any distinguished name.
This document obsoletes RFC 2253.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [RFC2119].
1. Background 1. Background
This specification assumes familiarity with X.500 [X.500], and the This specification assumes familiarity with X.500 [X.500], and the
concept of Distinguished Name (DN). It is important to have a common concept of Distinguished Name (DN). It is important to have a common
format to be able to unambiguously represent a distinguished name. format to be able to unambiguously represent a distinguished name.
The primary goal of this specification is ease of encoding and The primary goal of this specification is ease of encoding and
decoding. A secondary goal is to have names that are human readable. decoding. A secondary goal is to have names that are human readable.
It is not expected that LDAP clients with a human user interface would It is not expected that LDAP clients with a human user interface would
display these strings directly to the user, but would most likely be display these strings directly to the user, but would most likely be
performing translations (such as expressing attribute type names in performing translations (such as expressing attribute type names in
one of the local national languages). one of the local national languages).
This document obsoletes RFC 2253.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [RFC2119].
2. Converting DistinguishedName from ASN.1 to a String 2. Converting DistinguishedName from ASN.1 to a String
In X.501 [X.501] the ASN.1 structure of distinguished name is defined In X.501 [X.501] the ASN.1 structure of distinguished name is defined
as: as:
DistinguishedName ::= RDNSequence DistinguishedName ::= RDNSequence
RDNSequence ::= SEQUENCE OF RelativeDistinguishedName RDNSequence ::= SEQUENCE OF RelativeDistinguishedName
RelativeDistinguishedName ::= SET SIZE (1..MAX) OF RelativeDistinguishedName ::= SET SIZE (1..MAX) OF
skipping to change at page 3, line 41 skipping to change at page 3, line 44
If the AttributeType is in the following table of attribute types If the AttributeType is in the following table of attribute types
associated with LDAP [RFC2252bis], then the type name string from that associated with LDAP [RFC2252bis], then the type name string from that
table is used, otherwise it is encoded as the dotted-decimal encoding table is used, otherwise it is encoded as the dotted-decimal encoding
of the AttributeType's OBJECT IDENTIFIER. The dotted-decimal notation of the AttributeType's OBJECT IDENTIFIER. The dotted-decimal notation
is described in [RFC2251bis]. is described in [RFC2251bis].
The type name string is not case sensitive. The type name string is not case sensitive.
String X.500 AttributeType String X.500 AttributeType
------ ---------------------- ------ --------------------------------------------
CN commonName CN commonName (2.5.4.3)
L localityName L localityName (2.5.4.7)
ST stateOrProvinceName ST stateOrProvinceName (2.5.4.8)
O organizationName O organizationName (2.5.4.10)
OU organizationalUnitName OU organizationalUnitName (2.5.4.11)
C countryName C countryName (2.5.4.6)
STREET streetAddress STREET streetAddress (2.5.4.9)
DC domainComponent DC domainComponent (0.9.2342.19200300.100.1.25)
UID userId UID userId (0.9.2342.19200300.100.1.1)
2.4. Converting an AttributeValue from ASN.1 to a String 2.4. Converting an AttributeValue from ASN.1 to a String
If the AttributeValue is of a type which does not have a string If the AttributeValue is of a type which does not have a string
representation defined for it, then it is simply encoded as an representation defined for it, then it is simply encoded as an
octothorpe character ('#' ASCII 35) followed by the hexadecimal octothorpe character ('#' ASCII 35) followed by the hexadecimal
representation of each of the octets of the BER encoding of the X.500 representation of each of the octets of the BER encoding of the X.500
AttributeValue. This form SHOULD be used if the AttributeType is of AttributeValue. This form SHOULD be used if the AttributeType is of
the dotted-decimal form. the dotted-decimal form.
skipping to change at page 4, line 48 skipping to change at page 5, line 7
",", "+", """, "\", "<", ">", ";", "#", "=", or " " ",", "+", """, "\", "<", ">", ";", "#", "=", or " "
(ASCII 44, 43, 34, 92, 60, 62, 59, 35, or 32, respectively) (ASCII 44, 43, 34, 92, 60, 62, 59, 35, or 32, respectively)
it may be prefixed by a backslash ('\' ASCII 92). it may be prefixed by a backslash ('\' ASCII 92).
Examples of the escaping mechanism are shown in section 4. Examples of the escaping mechanism are shown in section 4.
3. Parsing a String back to a Distinguished Name 3. Parsing a String back to a Distinguished Name
The structure of the UTF-8 string is specified using the following The structure of the UTF-8 [RFC2279] string is specified using the
Augmented BNF [RFC2234] grammar. following Augmented BNF [RFC2234] grammar.
distinguishedName = [name] distinguishedName = [name]
; may be empty ; may be empty
name = name-component *(COMMA name-component) name = name-component *(COMMA name-component)
name-component = attributeTypeAndValue *(PLUS attributeTypeAndValue) name-component = attributeTypeAndValue *(PLUS attributeTypeAndValue)
attributeTypeAndValue attributeTypeAndValue
= attributeType EQUALS attributeValue = attributeType EQUALS attributeValue
skipping to change at page 5, line 31 skipping to change at page 5, line 35
oid = 1*DIGIT *(DOT 1*DIGIT) oid = 1*DIGIT *(DOT 1*DIGIT)
attributeValue = string / hexstring attributeValue = string / hexstring
string = *( stringchar / pair ) string = *( stringchar / pair )
; the string MUST NOT start with SHARP or SP ; the string MUST NOT start with SHARP or SP
; and MUST NOT end with SP ; and MUST NOT end with SP
stringchar = <any UTF-8 character (can be multiple octets) stringchar = <any UTF-8 character (can be multiple octets)
except one of escaped or ESC> excepting escaped or ESC>
pair = ESC ( ESC / special / hexpair ) pair = ESC ( ESC / special / hexpair )
special = escaped / SHARP / EQUALS / SP special = escaped / SHARP / EQUALS / SP
escaped = COMMA / PLUS / %x22 / %x3C / %x3E / %3B escaped = COMMA / PLUS / %x22 / %x3C / %x3E / %3B
; "," / "+" / """ / "<" / ">" / ";" ; "," / "+" / """ / "<" / ">" / ";"
hexstring = SHARP 1*hexpair hexstring = SHARP 1*hexpair
skipping to change at page 5, line 49 skipping to change at page 6, line 4
hexstring = SHARP 1*hexpair hexstring = SHARP 1*hexpair
hexpair = HEX HEX hexpair = HEX HEX
HEX = DIGIT / %x41-46 / %x61-66 HEX = DIGIT / %x41-46 / %x61-66
; 0-9 / A-F / a-f ; 0-9 / A-F / a-f
ALPHA = %x41-5A / %x61-7A ALPHA = %x41-5A / %x61-7A
; A-Z / a-z ; A-Z / a-z
DIGIT = %x30-39 DIGIT = %x30-39
; 0-9 ; 0-9
SP = %x20 ; space (" ") SP = %x20 ; space (" ")
SHARP = %x23 ; sharp sign ("#") SHARP = %x23 ; sharp sign ("#")
PLUS = %x2B ; plus sign ("+") PLUS = %x2B ; plus sign ("+")
COMMA = %x2C ; comma (",") COMMA = %x2C ; comma (",")
MINUS = %x2D ; minus sign ("-") MINUS = %x2D ; minus sign ("-")
DOT = %x2E ; period (".") DOT = %x2E ; period (".")
EQUALS = %x3D ; equals sign ("=") EQUALS = %x3D ; equals sign ("=")
ESC = %x5C ; backslash ("\") ESC = %x5C ; backslash ("\")
Implementations MUST recognize AttributeType string type names
(keywords) listed in the Section 2 table, but MAY recognize other
names (keywords). Implementations MAY recognize other DN string
representations (such as that described in RFC 1779) but SHALL only
generate DN strings in accordance with Section 2 of this document.
4. Examples 4. Examples
This notation is designed to be convenient for common forms of name. This notation is designed to be convenient for common forms of name.
This section gives a few examples of distinguished names written using This section gives a few examples of distinguished names written using
this notation. First is a name containing three relative this notation. First is a name containing three relative
distinguished names (RDNs): distinguished names (RDNs):
UID=jsmith,DC=example,DC=net UID=jsmith,DC=example,DC=net
Here is an example name containing three RDNs, in which the first RDN Here is an example name containing three RDNs, in which the first RDN
skipping to change at page 8, line 39 skipping to change at page 9, line 4
[RFC2256bis] LDAPbis WG, "LDAPv3: User Schema", a work in progress. [RFC2256bis] LDAPbis WG, "LDAPv3: User Schema", a work in progress.
7. Acknowledgment 7. Acknowledgment
This document is an update to RFC 2253, by Mark Wahl, Tim Howes, and This document is an update to RFC 2253, by Mark Wahl, Tim Howes, and
Steve Kille. RFC 2253 was a product of the IETF ASID Working Group. Steve Kille. RFC 2253 was a product of the IETF ASID Working Group.
This document is a product of the IETF LDAPbis Working Group. This document is a product of the IETF LDAPbis Working Group.
8. Document Editor's Address 8. Document Editor's Address
Kurt D. Zeilenga Kurt D. Zeilenga
OpenLDAP Foundation OpenLDAP Foundation
<Kurt@OpenLDAP.org> <Kurt@OpenLDAP.org>
Appendix A. Changes made to RFC 2253 Appendix A. Changes made since RFC 2253
This appendix is provided for informational purposes and is not a
normative part of this specification.
[Editor's Note: this non-normative appendix may be removed prior to
publication as an RFC]
The following substantive changes were made to RFC 2253: The following substantive changes were made to RFC 2253:
- Removed IESG Note - Removed IESG Note. The IESG Note is addressed by RFC 2829.
- Removed specification of additional requirements for LDAPv2 - Replaced specification of additional requirements for LDAPv2
implementations which also support LDAPv3 (Section 4). implementations which also support LDAPv3 (Section 4) with a
statement (in Section 3) allowing recongization of alternative
string representations.
- Updated 2.3 to clarify which table is the published table of names - Updated 2.3 to clarify which table is the published table of names
which may be appear in DNs. Remove "as an example" language. - which may be appear in DNs. Remove "as an example" language.
Updated 2.3 to indicate attribute type name strings are not case Added statement (in Section 3) allowing recongization of
sensitive. additional names. - Updated 2.3 to indicate attribute type name
strings are not case sensitive.
- Updated 2.4 to allow hex pair escaping of all characters and - Updated 2.4 to allow hex pair escaping of all characters and
clarified escaping for when multiple octet UTF-8 characters are clarified escaping for when multiple octet UTF-8 characters are
present. present.
- Rewrote Section 3 to use ABNF as defined in RFC 2234. - Rewrote Section 3 to use ABNF as defined in RFC 2234.
- Rewrote Section 3 ABNF to be consistent with 2.4. - Rewrote Section 3 ABNF to be consistent with 2.4.
- Rewrote examples - Rewrote examples
- Added reference to documentations containing LDAP-specific - Added reference to documentations containing LDAP-specific
security considerations. security considerations.
In addition, numerous editorial changes were made. In addition, numerous editorial changes were made.
 End of changes. 

This html diff was produced by rfcdiff 1.23, available from http://www.levkowetz.com/ietf/tools/rfcdiff/