Uploaded image for project: 'Directory Client API'
  1. Directory Client API
  2. DIRAPI-154

Implement "online" OpenLDAP schema parsing in DefaultSchemaLoader

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.0.0-M20
    • 1.0.0-RC2
    • None

    Description

      The constructor in DefaultSchemaLoader has the following comment:

        // TODO Handle schema loading on other LDAP servers
      

      For OpenLDAP this would require searching subtree under cn=schema,cn=config and handling attributes like:

        olcAttributeTypes: {1}( 2.5.4.4 NAME ( 'sn' 'surname' ) DESC 'RFC2256: last (family) name(s) for which the entity is known by' SUP name )
      
        olcObjectClasses: {4}( 2.5.6.6 NAME 'person' DESC 'RFC2256: a person' SUP top STRUCTURAL MUST ( sn $ cn ) MAY ( userPassword $ telephoneNumber $ seeAlso $ description ) )
      

      Note that there is also an 'olcObjectIdentifier' attribute type that seems to be used to create macros for interpolation in OID's used in other attributes:

        olcObjectIdentifier: OLcfg 1.3.6.1.4.1.4203.1.12.2
        olcObjectIdentifier: OLcfgAt OLcfg:3
        olcObjectIdentifier: OLcfgOvAt OLcfgAt:3
        olcObjectIdentifier: OMsyn 1.3.6.1.4.1.1466.115.121.1
        olcObjectIdentifier: OMsBoolean OMsyn:7
      
        olcAttributeTypes: ( OLcfgOvAt:10.4 NAME 'olcUniqueStrict' DESC 'Enforce uniqueness of null values' EQUALITY booleanMatch SYNTAX OMsBoolean SINGLE-VALUE )
      

      However this additional complexity seems to only be used for the internal/vendor-specific schema itself (not 'core', 'nis', etc.).

      Attached is LDIF output of from searching cn=schema,cn=config.

      Mailing List reference: https://mail-archives.apache.org/mod_mbox/directory-api/201308.mbox/%3CCABzFU-eOfmwiFpR1w0Fd-JhNFBVLO0NkHKa5w61ReFBEq%3DWkaw%40mail.gmail.com%3E

      Attachments

        1. loadSchema.log
          14 kB
          Gerald Turner
        2. openldap-schema.ldif
          89 kB
          Gerald Turner

        Activity

          People

            elecharny Emmanuel Lécharny
            gturner Gerald Turner
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: