> Hello, > > Is attribute options supported in openldap (version 2.4.21)? > > In RFC 2251 (LDAPv3) the attributes in search could be specified as > attribute_name;options, so you could indicate options in the return of > the attributes. > > Specifically, what I want to do is: I have attributes wich value is a > URN, so I want to get just a special part of the URN, that is: > > Traditional search: > > Ldap filter: ([email protected]) > Atributos: mail, schacPersonalUniqueID > Result: > mail: [email protected] > schacPersonalUniqueID: > urn:mace:terena.org:schac:personalUniqueID:es:12345678Q > > Search with options: > Ldap filter: ([email protected]) > Atributos: mail, schacPersonalUniqueID;x-urn-7 > Result: > mail: [email protected] > schacPersonalUniqueID: 12345678Q > > I have tried this with a standard configuration, but it isn't working: > > ama...@joshua:~$ /usr/bin/ldapsearch ... [email protected] > schacPersonalUniqueID;x-urn-7 > # extended LDIF > # > # LDAPv3 > # base <dc=Telematica> with scope subtree > # filter: uid=amateo > # requesting: irisClassifCode > # > > # amateo, Usuarios, telematica > dn: uid=user,ou=People,dc=mydomain,dc=com > > # search result > search: 2 > result: 0 Success > > # numResponses: 2 > # numEntries: 1 > x-urn-1: orden no encontrada > > Is it supported? Do I have to configure anything in the slapd server?
Attribute options are supported; however, what you seem to desire is a non-standard extension. What I infer from your message (please correct me if I'm wrong) is that by adding ";x-urn-7" you expect the server to parse the value of that attribute and extract the seventh colon-separated token. This, as far as I know, has nothing to do with attribute options. If you request "<attr>;<option>", OpenLDAP's slapd will return only those occurrences of "<attr>" defined with the option "<option>". Options other than "lang-*" need to be defined in slapd.conf according to the "attributeoptions" statement. p.
