1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389
  
     | 
    
      <pre>Network Working Group                               S. Hardcastle-Kille
Request for Comments: 1485                             ISODE Consortium
                                                              July 1993
             <span class="h1">A String Representation of Distinguished Names</span>
                            <span class="h1">(OSI-DS 23 (v5))</span>
Status of this Memo
   This RFC specifies an IAB standards track protocol for the Internet
   community, and requests discussion and suggestions for improvements.
   Please refer to the current edition of the "IAB Official Protocol
   Standards" for the standardization state and status of this protocol.
   Distribution of this memo is unlimited.
Abstract
   The OSI Directory uses distinguished names as the primary keys to
   entries in the directory.  Distinguished Names are encoded in ASN.1.
   When a distinguished name is communicated between to users not using a
   directory protocol (e.g., in a mail message), there is a need to have
   a user-oriented string representation of distinguished name.  This
   specification defines a string format for representing names, which is
   designed to give a clean representation of commonly used names, whilst
   being able to represent any distinguished name.  Please send comments
   to the author or to the discussion group <osi-ds@CS.UCL.AC.UK>.
Table of Contents
   <a href="#section-1">1</a>.  Why a notation is needed...................................... <a href="#page-1">1</a>
   <a href="#section-2">2</a>.  A notation for Distinguished Name............................. <a href="#page-2">2</a>
   <a href="#section-2.1">2.1</a> Goals......................................................... <a href="#page-2">2</a>
   <a href="#section-2.2">2.2</a> Informal definition........................................... <a href="#page-2">2</a>
   <a href="#section-2.3">2.3</a> Formal definition............................................. <a href="#page-3">3</a>
   <a href="#section-3">3</a>.  Examples...................................................... <a href="#page-6">6</a>
   <a href="#section-4">4</a>.  References.................................................... <a href="#page-6">6</a>
   <a href="#section-5">5</a>.  Security Considerations....................................... <a href="#page-6">6</a>
   <a href="#section-6">6</a>.  Author's Address.............................................. <a href="#page-7">7</a>
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>.  Why a notation is needed</span>
   Many OSI Applications make use of Distinguished Names (DN) as defined
   in the OSI Directory, commonly known as X.500 [<a href="#ref-CCI88" title="models and services">CCI88</a>].  This
   specification assumes familiarity with X.500, and the concept of
   Distinguished Name.  It is important to have a common format to be
   able to unambiguously represent a distinguished name.  This might be
   done to represent a directory name on a business card or in an email
<span class="grey">Hardcastle-Kille                                                [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="./rfc1485">RFC 1485</a>                  Distinguished Names                  July 1993</span>
   message.  There is a need for a format to support human to human
   communication, which must be string based (not ASN.1) and user
   oriented.  This notation is targeted towards a general user oriented
   system, and in particular to represent the names of humans.  Other
   syntaxes may be more appropriate for other uses of the directory.
   For example, the OSF Syntax may be more appropriate for some system
   oriented uses.  (The OSF Syntax uses "/" as a separator, and forms
   names in a manner intended to resemble UNIX filenames).
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>.  A notation for Distinguished Name</span>
<span class="h3"><a class="selflink" id="section-2.1" href="#section-2.1">2.1</a> Goals</span>
   The following goals are laid out:
      o  To provide an unambiguous representation of a distinguished
         name
      o  To be an intuitive format for the majority of names
      o  To be fully general, and able to represent any distinguished
         name
      o  To be amenable to a number of different layouts to achieve an
          attractive representation.
      o  To give a clear representation of the contents of the
          distinguished name
<span class="h3"><a class="selflink" id="section-2.2" href="#section-2.2">2.2</a> Informal definition</span>
   This notation is designed to be convenient for common forms of name.
   Some examples are given.  The author's directory distinguished name
   would be written:
      CN=Steve Hardcastle-Kille, OU=Computer Science, O=University
      College London, C=GB
   This may be folded, perhaps to display in multi-column format.  For
   example:
      CN=Steve Hardcastle-Kille,
      OU=Computer Science,
      O=University College London,
      C=GB
<span class="grey">Hardcastle-Kille                                                [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="./rfc1485">RFC 1485</a>                  Distinguished Names                  July 1993</span>
   Another name might be:
      CN=Christian Huitema, O=INRIA, C=FR
   Semicolon (";") may be used as an alternate separator.
      CN=Christian Huitema; O=INRIA; C=FR
   In running text, this would be written as <CN=Christian Huitema;
   O=INRIA; C=FR>.  Another example, shows how different attribute types
   are handled:
      CN=James Hacker,
      L=Basingstoke,
      O=Widget Inc,
      CN=GB
   Here is an example of a multi-valued Relative Distinguished Name,
   where the namespace is flat within an organisation, and department is
   used to disambiguate certain names:
      OU=Sales + CN=J. Smith, O=Widget Inc., C=US
   The final example shows quoting of a comma in an Organisation name:
      CN=L. Eagle, O="Sue, Grabbit and Runn", C=GB
<span class="h3"><a class="selflink" id="section-2.3" href="#section-2.3">2.3</a> Formal definition</span>
   A formal definition can now be given.  The structure is specified in
   a BNF grammar in Figure 1.  This BNF uses the grammar defined in <a href="./rfc822">RFC</a>
   <a href="./rfc822">822</a>, with the terminals enclosed in <> [<a href="#ref-Cro82" title="University of Delaware">Cro82</a>].  This definition is
   in an abstract character set, and so may be written in any character
   set supporting the explicitly defined special characters.  The
   quoting mechanism is used for the following cases:
      o  Strings containing ",", "+", "="or """, <CR>, "<",
         ">", "#", or ";".
      o  Strings with leading or trailing spaces
      o  Strings containing consecutive spaces
   There is an escape mechanism from the normal user oriented form, so
   that this syntax may be used to print any valid distinguished name.
   This is ugly.  It is expected to be used only in pathological cases.
   There are two parts to this mechanism:
<span class="grey">Hardcastle-Kille                                                [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="./rfc1485">RFC 1485</a>                  Distinguished Names                  July 1993</span>
      1.  Attributes types are represented in a (big-endian) dotted
          notation.  (e.g., OID.2.6.53).
      2.  Attribute values are represented in hexadecimal
          (e.g.,  #0A56CF).
   The keyword specification is optional in the BNF, but mandatory for
   this specification.  This is so that the same BNF may be used for the
   related specification on User Friendly Naming [<a href="#ref-HK93" title="University College London">HK93</a>].  When this
   specification is followed, the attribute type keywords must always be
   present.  A list of valid keywords for well known attribute types
   used in naming is given in Table 1.  This is a list of keywords which
   must be supported.  These are chosen because they appear in common
   forms of name, and can do so in a place which does not correspond to
   the default schema used.  A register of valid keyworkds is maintained
   by the IANA.
   Only string type attributes are considered, but other attribute
   syntaxes could be supported locally.  It is assumed that the
   interface will translate from the supplied string into
   PrintableString or T.61.
   The "+" notation is used to specify multi-component RDNs.  In this
   case, the types for attributes in the RDN must be explicit.  The name
   is presented/input in a little-endian order (most significant
   component last).
   When an address is written in a context where there is a need to
   delimit the entire address (e.g., in free text), it is recommended
   that the delimiters <> are used.  The terminator > is a special in
   the notation to facilitate this delimitation.
<span class="grey">Hardcastle-Kille                                                [Page 4]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
<span class="grey"><a href="./rfc1485">RFC 1485</a>                  Distinguished Names                  July 1993</span>
   <name> ::= <name-component> ( <spaced-separator> )
          | <name-component> <spaced-separator> <name>
   <spaced-separator> ::= <optional-space>
                   <separator>
                   <optional-space>
   <separator> ::=  "," | ";"
   <optional-space> ::= ( <CR> ) *( " " )
   <name-component> ::= <attribute>
           | <attribute> <optional-space> "+"
             <optional-space> <name-component>
   <attribute> ::= <string>
           | <key> <optional-space> "=" <optional-space> <string>
   <key> ::= 1*( <keychar> ) | "OID." <oid>
   <keychar> ::= letters, numbers, and space
   <oid> ::= <digitstring> | <digitstring> "." <oid>
   <digitstring> ::= 1*<digit>
   <digit> ::= digits 0-9
   <string> ::= *( <stringchar> | <pair> )
            | '"' *( <stringchar> | <special> | <pair> ) '"'
    | "#" <hex>
   <special> ::= "," | "=" | '"' | <CR> | "+" | "<" |  ">"
            | "#" | ";"
   <pair> ::= "
   <stringchar> ::= any char except <special> or "
   <hex> ::= 2*<hexchar>
   <hexchar> ::= 0-9, a-f, A-F
               Figure 1:  BNF Grammar for Distinguished Name
<span class="grey">Hardcastle-Kille                                                [Page 5]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
<span class="grey"><a href="./rfc1485">RFC 1485</a>                  Distinguished Names                  July 1993</span>
                        Key  Attribute (X.520 keys)
                        ______________________________
                        CN   CommonName
                        L    LocalityName
                        ST   StateOrProvinceName
                        O    OrganizationName
                        OU   OrganizationalUnitName
                        C    CountryName
                      Table 1:  Standardised Keywords
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>.  Examples</span>
   This section gives a few examples of distinguished names written
   using this notation:
      CN=Marshall T. Rose, O=Dover Beach Consulting, L=Santa Clara,
      ST=California, C=US
      CN=FTAM Service, CN=Bells, OU=Computer Science, O=University
      College London, C=GB
      CN=Steve Hardcastle-Kille, OU=Computer Science, O=University
      College London, C=GB
      CN=Steve Hardcastle-Kille, OU=Computer Science, O=University
      College London, C=GB
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>.  References</span>
   [<a id="ref-CCI88">CCI88</a>] The Directory --- overview of concepts, models and services,
           December 1988. CCITT X.500 Series Recommendations.
   [<a id="ref-Cro82">Cro82</a>] D.H. Crocker. Standard of the format of ARPA internet text
           messages.  STD 11, <a href="./rfc822">RFC 822</a>, University of Delaware,
           August 1982.
   [<a id="ref-HK93">HK93</a>]  S.E. Hardcastle-Kille. Using the OSI directory to achieve
           user friendly naming.  <a href="./rfc1484">RFC 1484</a>, Department of Computer
           Science, University College London, July 1993.
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>.  Security Considerations</span>
   Security issues are not discussed in this memo.
<span class="grey">Hardcastle-Kille                                                [Page 6]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
<span class="grey"><a href="./rfc1485">RFC 1485</a>                  Distinguished Names                  July 1993</span>
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>.  Author's Address</span>
   Steve Hardcastle-Kille
   ISODE Consortium
   P.O. Box 505
   London
   SW11 1DX
   England
   Phone:+44-71-223-4062
   EMail:  S.Kille@ISODE.COM
   DN: CN=Steve Hardcastle-Kille,
   O=ISODE Consortium, C=GB
   UFN: S. Hardcastle-Kille,
   ISODE Consortium, GB
Hardcastle-Kille                                                [Page 7]
</pre>
 
     |