RFC 1778

The String Representation of Standard Attribute Syntaxes

๐Ÿ“… published March 1995, from ietf

RFC 1778: The String Representation of Standard Attribute Syntaxes ๐Ÿ’–

Okay bestie, let's do the vibe check first ๐Ÿ’… This is RFC 1778 from the Network Working Group, a Standards Track doc dated March 1995 ๐Ÿฆ‹ The authors are T. Howes (University of Michigan), S. Kille (ISODE Consortium), W. Yeong (Performance Systems International), and C. Robbins (NeXor Ltd.). It obsoletes RFC 1488, and there's no Updates line, so it doesn't update anything ๐ŸŒธ


Status of this Memo โœจ

This doc specifies an Internet standards track protocol for the whole Internet community, and it literally asks for discussion and suggestions for improvements ๐Ÿซถ For the standardization state and status of this protocol, check the current edition of the "Internet Official Protocol Standards" (STD 1). Distribution of this memo is unlimited ๐Ÿ’–


Abstract ๐ŸŒˆ

So the Lightweight Directory Access Protocol (LDAP) [9] requires that the contents of AttributeValue fields in protocol elements be octet strings ๐Ÿ“ This doc lays out the requirements that MUST be satisfied by the encoding rules used to render X.500 Directory attribute syntaxes into a form suitable for LDAP. Then it defines those encoding rules for the standard set of attribute syntaxes defined in [1,2] and [3] ๐Ÿงš


1. Attribute Syntax Encoding Requirements. ๐ŸŽ€

This section sets out the general requirements for lightweight directory protocol attribute syntax encodings. Every document that defines attribute syntax encodings for the lightweight directory protocols is expected to conform to these requirements ๐Ÿ’…

Okay so the encoding rules for any given attribute syntax MUST produce octet strings ๐Ÿ”ฅ As much as possible, encoded octet strings SHOULD be usable in their native encoded form for display purposes. Especially for attribute syntaxes that define non-binary values, the encoding rules SHOULD produce strings that clients implementing the lightweight directory protocols can display with little or no translation ๐Ÿซถ


2. Standard Attribute Syntax Encodings ๐Ÿฆ‹

To define the encoding rules for the standard attribute syntaxes, we're going to use these auxiliary BNF definitions ๐Ÿงš

<a> ::= 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' |
        'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' |
        's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z' | 'A' |
        'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' |
        'K' | 'L' | 'M' | 'N' | 'O' | 'P' | 'Q' | 'R' | 'S' |
        'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z'

<d> ::= '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'

<hex-digit> ::= <d> | 'a' | 'b' | 'c' | 'd' | 'e' | 'f' |
                 'A' | 'B' | 'C' | 'D' | 'E' | 'F'

<k> ::= <a> | <d> | '-'

<p> ::= <a> | <d> | ''' | '(' | ')' | '+' | ',' | '-' | '.' |
        '/' | ':' | '?' | ' '

<CRLF> ::= The ASCII newline character with hexadecimal value 0x0A

<letterstring> ::= <a> | <a> <letterstring>

<numericstring> ::= <d> | <d> <numericstring>

<keystring> ::= <a> | <a> <anhstring>

<anhstring> ::= <k> | <k> <anhstring>

<printablestring> ::= <p> | <p> <printablestring>

<space> ::= ' ' | ' ' <space>

2.1. Undefined ๐ŸŒธ

Values of type Undefined get encoded as if they were values of type Octet String. The string value is the BER-encoded version of the value ๐Ÿ’–

2.2. Case Ignore String โœจ

A string of type caseIgnoreStringSyntax is encoded as the string value itself ๐Ÿซถ

2.3. Case Exact String ๐Ÿ’…

The encoding of a string of type caseExactStringSyntax is the string value itself ๐Ÿฆ‹

2.4. Printable String ๐ŸŽ€

The encoding of a string of type printableStringSyntax is the string value itself ๐ŸŒˆ

2.5. Numeric String ๐Ÿ”ฅ

The encoding of a string of type numericStringSyntax is the string value itself ๐Ÿ“

2.6. Octet String ๐Ÿงš

The encoding of a string of type octetStringSyntax is the string value itself ๐Ÿ’œ

2.7. Case Ignore IA5 String โญ

The encoding of a string of type caseIgnoreIA5String is the string value itself โœจ

2.8. IA5 String ๐Ÿฆ‹

The encoding of a string of type iA5StringSyntax is the string value itself ๐Ÿ’–

2.9. T61 String ๐ŸŒธ

The encoding of a string of type t61StringSyntax is the string value itself ๐Ÿซถ

2.10. Case Ignore List ๐Ÿ‘‘

Values of type caseIgnoreListSyntax are encoded according to this BNF:

<caseignorelist> ::= <caseignorestring> |
                     <caseignorestring> '$' <caseignorelist>

<caseignorestring> ::= a string encoded according to the rules for Case
                       Ignore String as above.

2.11. Case Exact List ๐ŸŽ€

Values of type caseExactListSyntax are encoded according to this BNF:

<caseexactlist> ::= <caseexactstring> |
                     <caseexactstring> '$' <caseexactlist>

<caseexactstring> ::= a string encoded according to the rules for Case
                      Exact String as above.

2.12. Distinguished Name ๐Ÿ’…

Values of type distinguishedNameSyntax are encoded to have the representation defined in [5] ๐ŸŒˆ

2.13. Boolean ๐Ÿ”ฅ

Values of type booleanSyntax are encoded according to this BNF:

<boolean> ::= "TRUE" | "FALSE"

Boolean values get an encoding of "TRUE" if they're logically true, and an encoding of "FALSE" otherwise ๐Ÿ’–

2.14. Integer ๐Ÿ“

Values of type integerSyntax are encoded as the decimal representation of their values, with each decimal digit represented by the its character equivalent. So the digit 1 is represented by the character

Heads up bestie, the original text just stops mid-sentence right here, so this is all there is ๐Ÿ’€

2.15. Object Identifier ๐Ÿงš

Values of type objectIdentifierSyntax are encoded according to this BNF:

<oid> ::= <descr> | <descr> '.' <numericoid> | <numericoid>

<descr> ::= <keystring>

<numericoid> ::= <numericstring> | <numericstring> '.' <numericoid>

In the above BNF, <descr> is the syntactic representation of an object descriptor ๐Ÿ’œ When encoding values of type objectIdentifierSyntax, the first encoding option SHOULD be used in preference to the second, and the second SHOULD be used in preference to the third, wherever possible. In other words, when encoding object identifiers, object descriptors (where assigned and known by the implementation) SHOULD be used in preference to numeric oids to the greatest extent possible โญ For example, when encoding the object identifier for an organizationName, the descriptor "organizationName" is preferable to "ds.4.10", which is in turn preferable to the string "2.5.4.10" โœจ

2.16. Telephone Number ๐Ÿฆ‹

Values of type telephoneNumberSyntax are encoded as if they were Printable String types ๐Ÿ’–

2.17. Telex Number ๐ŸŒธ

Values of type telexNumberSyntax are encoded according to this BNF:

<telex-number> ::= <actual-number> '$' <country> '$' <answerback>

<actual-number> ::= <printablestring>

<country> ::= <printablestring>

<answerback> ::= <printablestring>

In the above, <actual-number> is the syntactic representation of the number portion of the TELEX number being encoded. <country> is the TELEX country code, and <answerback> is the answerback code of a TELEX terminal ๐Ÿซถ

2.18. Teletex Terminal Identifier ๐Ÿ‘‘

Values of type teletexTerminalIdentifier are encoded according to this BNF:

<teletex-id> ::= <printablestring>  0*('$' <ttx-parm>)

<ttx-param> ::= <ttx-key> ':' <ttx-value>

<ttx-key> ::= 'graphic' | 'control' | 'misc' | 'page' | 'private'

<ttx-value> ::= <octetstring>

In the above, the first <printablestring> is the encoding of the first portion of the teletex terminal identifier to be encoded. The subsequent 0 or more <printablestring>s are subsequent portions of the teletex terminal identifier ๐ŸŽ€

2.19. Facsimile Telephone Number ๐ŸŒˆ

Values of type FacsimileTelephoneNumber are encoded according to this BNF:

<fax-number> ::= <printablestring> [ '$' <faxparameters> ]

<faxparameters> ::= <faxparm> | <faxparm> '$' <faxparameters>

<faxparm> ::= 'twoDimensional' | 'fineResolution' | 'unlimitedLength' |
              'b4Length' | 'a3Width' | 'b4Width' | 'uncompressed'

In the above, the first <printablestring> is the actual fax number, and the <faxparm> tokens represent fax parameters ๐Ÿ“

2.20. Presentation Address ๐Ÿ’…

Values of type PresentationAddress are encoded to have the representation described in [6] ๐Ÿ”ฅ

2.21. UTC Time ๐Ÿงš

Values of type uTCTimeSyntax are encoded as if they were Printable Strings, with the strings containing a UTCTime value ๐Ÿ’œ

2.22. Guide (search guide) โญ

Values of type Guide, such as values of the searchGuide attribute, are encoded according to this BNF:

<guide-value> ::= [ <object-class> '#' ] <criteria>

<object-class> ::= an encoded value of type objectIdentifierSyntax

<criteria> ::= <criteria-item> | <criteria-set> | '!' <criteria>

<criteria-set> ::= [ '(' ] <criteria> '&' <criteria-set> [ ')' ] |
                   [ '(' ] <criteria> '|' <criteria-set> [ ')' ]

<criteria-item> ::= [ '(' ] <attributetype> '$' <match-type> [ ')' ]

<match-type> ::= "EQ" | "SUBSTR" | "GE" | "LE" | "APPROX"

2.23. Postal Address โœจ

Values of type PostalAddress are encoded according to this BNF:

<postal-address> ::= <t61string> | <t61string> '$' <postal-address>

In the above, each <t61string> component of a postal address value is encoded as a value of type t61StringSyntax ๐Ÿฆ‹

2.24. User Password ๐Ÿ’–

Values of type userPasswordSyntax are encoded as if they were of type octetStringSyntax ๐ŸŒธ

2.25. User Certificate ๐Ÿซถ

Values of type userCertificate are encoded according to this BNF:

<certificate> ::= <version> '#' <serial> '#' <signature-algorithm-id>
                '#' <issuer> '#' <validity> '#' <subject>
                '#' <public-key-info> '#' <encrypted-sign-value>

<version> ::= <integervalue>

<serial> ::= <integervalue>

<signature-algorithm-id> ::= <algorithm-id>

<issuer> ::= an encoded Distinguished Name

<validity> ::= <not-before-time> '#' <not-after-time>

<not-before-time> ::= <utc-time>

<not-after-time> ::= <utc-time>

<algorithm-parameters> ::=  <null> | <integervalue> |
                            '{ASN}' <hex-string>

<subject> ::= an encoded Distinguished Name

<public-key-info> ::= <algorithm-id> '#' <encrypted-sign-value>

<encrypted-sign-value> ::= <hex-string> | <hex-string> '-' <d>

<algorithm-id> ::= <oid> '#' <algorithm-parameters>
<utc-time> ::= an encoded UTCTime value

<hex-string> ::= <hex-digit> | <hex-digit> <hex-string>

2.26. CA Certificate ๐Ÿ‘‘

Values of type cACertificate are encoded as if the values were of type userCertificate ๐ŸŽ€

2.27. Authority Revocation List ๐ŸŒˆ

Values of type authorityRevocationList are encoded according to this BNF:

<certificate-list> ::= <signature-algorithm-id> '#' <issuer> '#' <utc-time>
                        [ '#' <revoked-certificates> ]
                        '#' <signature-algorithm-id>
                        '#' <encrypted-sign-value>

<revoked-certificates> ::= 1*( '#' <revoked-certificate> )
                        <signature-algorithm-id> '#' <encrypted-sign-value>

<revoked-certificate> ::= <signature-algorithm-id> '#' <issuer> '#'
                        <serial> '#' <utc-time>

The syntactic components <signature-algorithm-id>, <issuer>, <encrypted-sign-value>, <utc-time>, <subject> and <serial> have the same definitions as in the BNF for the userCertificate attribute syntax ๐Ÿ’–


Part 1 ends here, but the References are coming up in part 2 ๐Ÿ‘€๐Ÿซถ

2.28. Certificate Revocation List ๐Ÿ“œ

okay so certificateRevocationList values get encoded exactly as if they were authorityRevocationList values ๐Ÿ’… no new rules, just borrow the ones from 2.27 bestie


2.29. Cross Certificate Pair ๐Ÿฆ‹

crossCertificatePair values are encoded using this BNF, and it's giving very structured ๐ŸŽ€

<certificate-pair> ::= <forward> '#' <reverse>
                        | <forward>
                        | <reverse>

<forward> ::= 'forward:' <certificate>

<reverse> ::= 'reverse:' <certificate>

the <certificate> component here has the same definition as in the BNF for the userCertificate attribute syntax ๐Ÿซถ


2.30. Delivery Method ๐Ÿ“ฎ

deliveryMethod values get encoded with this BNF, which lets you chain delivery types together with $ like a playlist ๐ŸŽถ

<delivery-value> ::= <pdm> | <pdm> '$' <delivery-value>

<pdm> ::= 'any' | 'mhs' | 'physical' | 'telex' | 'teletex' |
          'g3fax' | 'g4fax' | 'ia5' | 'videotex' | 'telephone'

2.31. Other Mailbox ๐Ÿ’Œ

otherMailboxSyntax values are encoded with this BNF โœจ

<otherMailbox> ::= <mailbox-type> '$' <mailbox>

<mailbox-type> ::= an encoded Printable String

<mailbox> ::= an encoded IA5 String

so <mailbox-type> is the kind of mail system the mailbox lives in (think "Internet" or "MCIMail" ๐Ÿ“ฌ), and <mailbox> is the actual mailbox inside whichever system <mailbox-type> names. it's giving two-part combo, and I'm obsessed ๐Ÿ˜ญ


2.32. Mail Preference ๐ŸŒธ

mailPreferenceOption values are encoded with this BNF, and there are only three options so it's very low drama ๐Ÿ™ˆ

<mail-preference> ::= "NO-LISTS" | "ANY-LIST" | "PROFESSIONAL-LISTS"

2.33. MHS OR Address ๐Ÿ“

MHS OR Address values are encoded as strings, following the format defined in [10]. no extra fuss, just follow the reference ๐Ÿงš


2.34. Distribution List Submit Permission ๐ŸŒˆ

DLSubmitPermission values are encoded as strings using this BNF. this one is a whole saga, so buckle up ๐ŸŽข

<dlsubmit-perm> ::= <dlgroup_label> ':' <dlgroup-value>
                        | <dl-label> ':' <dl-value>

<dlgroup-label> ::= 'group_member'

<dlgroup-value> ::= <name>

<name> ::= an encoded Distinguished Name

<dl-label> ::= 'individual' | 'dl_member' | 'pattern'

<dl-value> ::= <orname>

<orname> ::= <address> '#' <dn>
       |  <address>

<address> ::= <add-label> ':' <oraddress>

<dn> ::= <dn-label> ':' <name>

<add-label> = 'X400'

<dn-label> = 'X500'

where <oraddress> is as defined in RFC 1327 โœจ


2.35. Photo ๐Ÿ“ธ

Photo values are encoded as if they were octet strings containing JPEG images in the JPEG File Interchange Format (JFIF), as described in [8]. so it's literally a JPEG wearing a JFIF outfit ๐Ÿ’…


2.36. Fax ๐Ÿ“ 

Fax values are encoded as if they were octet strings containing Group 3 Fax images as defined in [7]. the vibe is retro and I respect it ๐Ÿซถ


3. Security Considerations ๐Ÿ’€

Security issues are not discussed in this memo. so no, I'm not going to pretend I know what this memo says about security ๐Ÿ˜ญ if you need that info, you'll have to look somewhere else, bestie


4. Acknowledgements ๐Ÿซถ

Many of the attribute syntax encodings defined in this document are adapted from those used in the QUIPU X.500 implementation. The contributions of the authors of the QUIPU implementation in the specification of the QUIPU syntaxes [4] are gratefully acknowledged. the QUIPU crew literally made this possible, so we love them ๐Ÿ‘‘


5. Bibliography ๐Ÿ“š

[1] The Directory: Selected Attribute Syntaxes.  CCITT,
    Recommendation X.520.

[2] Information Processing Systems -- Open Systems Interconnection --
    The Directory: Selected Attribute Syntaxes.

[3] Barker, P., and S. Kille, "The COSINE and Internet X.500 Schema",
    RFC 1274, University College London, November 1991.

[4] The ISO Development Environment: User's Manual -- Volume 5:
    QUIPU.  Colin Robbins, Stephen E. Kille.

[5] Kille, S., "A String Representation of Distinguished Names", RFC
    1779, ISODE Consortium, March 1995.

[6] Kille, S., "A String Representation for Presentation Addresses",
    RFC 1278, University College London, November 1991.

[7] Terminal Equipment and Protocols for Telematic Services -
    Standardization of Group 3 facsimile apparatus for document
    transmission.  CCITT, Recommendation T.4.

[8] JPEG File Interchange Format (Version 1.02).  Eric Hamilton, C-
    Cube Microsystems, Milpitas, CA, September 1, 1992.

[9] Yeong, W., Howes, T., and S. Kille, "Lightweight Directory Access
    Protocol", RFC 1777, Performance Systems International,
    University of Michigan, ISODE Consortium, March 1995.

[10] Alvestrand, H., Kille, S., Miles, R., Rose, M., and S.  Thompson,
     "Mapping between X.400 and RFC-822 Message Bodies", RFC 1495,
     SINTEF DELAB, ISODE Consortium, Soft*Switch, Inc., Dover Beach
     Consulting, Inc., Soft*Switch, Inc., August 1993.

6. Authors' Addresses ๐Ÿงš

   Tim Howes
   University of Michigan
   ITD Research Systems
   535 W William St.
   Ann Arbor, MI 48103-4943
   USA

   Phone: +1 313 747-4454
   EMail: tim@umich.edu


   Steve Kille
   ISODE Consortium
   PO Box 505
   London
   SW11 1DX
   UK

   Phone: +44-71-223-4062
   EMail: S.Kille@isode.com


   Wengyik Yeong
   PSI Inc.
   510 Huntmar Park Drive
   Herndon, VA 22070
   USA

   Phone: +1 703-450-8001
   EMail: yeongw@psilink.com


   Colin Robbins
   NeXor Ltd
   University Park
   Nottingham
   NG7 2RD
   UK
๐Ÿ“ฆ where this page comes from