Directory ApacheDS
  1. Directory ApacheDS
  2. DIRSERVER-1488

Accessing schema over JNDI delivers wrong values for mandatory/available attributes

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.5.6
    • Fix Version/s: 1.5.7
    • Component/s: schema
    • Labels:
      None

      Description

      When I enumerate the mandatory attributes of a class I'd expected to get an 
      Attribute with an enumeration for the individual attributes:

      Set<String> mandatory = new HashSet<String>();
      Attributes attributes = schemaCtx.getAttributes("ClassDefinition/person");
      Attribute attribute = attributes.get("must");
      if (attribute != null) {
          NamingEnumeration<String> enumeration = 
              (NamingEnumeration<String>) attribute.getAll();
          for (NamingEnumeration<String> values = enumeration; values.hasMore();) 
      {
              mandatory.add(values.next());
          }
          JndiUtils.closeLogged(enumeration, LOG);
      }
      

      However, the result is a single entry with the value "'sn' 'cn'". According Stefan Seelmann the LDAP classes are no longer defined correctly

      In ApacheDS 1.5.5 the person object class description in cn=schema looks
      like this:
      ( 2.5.6.6 NAME 'person' DESC 'RFC2256: a person' SUP top STRUCTURAL MUST
      ( sn $ cn ) MAY ( userPassword $ telephoneNumber $ seeAlso $ description
      ) X-SCHEMA 'core' )

      In ApacheDS 1.5.6 it looks like this:
      ( 2.5.6.6 NAME 'person' DESC 'RFC2256: a person' SUP 'top' STRUCTURAL
      MUST ( 'sn' 'cn' ) MAY ( 'userPassword' 'telephoneNumber' 'seeAlso'
      'description' ) X-SCHEMA 'core' )

      This is not correct according to RFC4512 and JNDI doesn't seem to be
      flexible enough to parse this syntax.

        Activity

        Emmanuel Lecharny made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Emmanuel Lecharny made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Show
        Emmanuel Lecharny added a comment - Fixed with : http://svn.apache.org/viewvc?rev=927974&view=rev
        Emmanuel Lecharny made changes -
        Assignee Emmanuel Lecharny [ elecharny ]
        Emmanuel Lecharny made changes -
        Field Original Value New Value
        Fix Version/s 1.5.7 [ 12314837 ]
        Hide
        Emmanuel Lecharny added a comment -

        This was already the case in 1.5.5 :/

        The schema refactoring didn't affected this feature, it was already dorked ...

        Show
        Emmanuel Lecharny added a comment - This was already the case in 1.5.5 :/ The schema refactoring didn't affected this feature, it was already dorked ...
        Joerg Schaible created issue -

          People

          • Assignee:
            Emmanuel Lecharny
            Reporter:
            Joerg Schaible
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development