0

I'm creating users in a ldap (Alcatel Omnivista using Oracle Directory Services Enterprise Edition 11.1.1.5) using Novell.Directory.Ldap library.

It's been working for years but since the latest update of the Omnivista, the admins are encoutering a problem with the user I create : the objectclass are in a wrong order.

Where it should be

objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetorgperson
objectclass: CDPerson

it is :

objectclass: inetOrgPerson
objectclass: organizationalPerson
objectclass: person
objectclass: top
objectclass: CDPerson

and therefore their managing apps is working all wrong.

I'm using the following init code :

LdapAttributeSet attributeSet = new LdapAttributeSet
{
    new LdapAttribute("objectclass", "inetOrgPerson"),
    new LdapAttribute("cn", new[] {cg.Cn, cg.Cn}),
    new LdapAttribute("sn", cg.Sn)
};

My questions are :

  • Is it a real problem ? Is the order important ? Implying a bug in the admin application.
  • Can I alter the objectclass at creation ? Afterwards ? Should I ?
  • Or is it configuration related in the ldap ?

Thanks a lot !!

M. Schena
  • 2,039
  • 1
  • 21
  • 29
Vincent
  • 510
  • 1
  • 5
  • 23

2 Answers2

2

In LDAP, an attribute (such as objectclass) has a SET of values, thus the order is insignificant.

An application shouldn't rely on the order of values, so I would say it's a bug in the Admin application.

Some servers do preserve the order of values provided by the client, some don't, but I don't know any where the behavior is configurable.

Ludovic Poitou
  • 4,788
  • 2
  • 21
  • 30
1

I managed to alter the objectclass at creation time and now the application is working nicely. Nonetheless I think the application is faulty at some point.

Reference code if anyone needs it some day:

LdapAttributeSet attributeSet = new LdapAttributeSet
{
     new LdapAttribute("objectclass", new[] {"top", "person", "organizationalPerson", "inetorgperson", "CDPerson"}),
     new LdapAttribute("cn", new[] {cg.Cn, cg.Cn}),
     new LdapAttribute("sn", cg.Sn),
};
Vincent
  • 510
  • 1
  • 5
  • 23