[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Querying Attribute Type Definitions Problem

On Sun, Dec 14, 2008 at 12:44:52PM -0500, Kevin Hardiman wrote:

> I am trying to query the definition of an attribute type using one of 
> the attribute type's aliases.  For example, given:
>    attributetype ( NAME ( 'cn' 'commonName' )
>           DESC 'RFC2256: common name(s) for which the entity is known by'
>           SUP name )
> I am using Java's naming API to query the definition, and getting an 
> exception saying the attribute type doesn't exist.  Example:
>    DirContext cnSchema =
>    (DirContext)schema.lookup("AttributeDefinition/commonName");

The LDAP operation to query the schema will return *all* attribute
type definitions in one result. Therefore it must be the client-end
code that extracts the particular definition that you have asked for.

Attributes with multiple names are an unfortunate feature of LDAP. In
X.500 the protocol deals only in OIDs so there can be no ambiguity,
but LDAP servers and clients have not always been careful to handle
the multiple names as equivalent.

I suggest you dig into the Java code that provides the service to your

|                 From Andrew Findlay, Skills 1st Ltd                 |
| Consultant in large-scale systems, networks, and directory services |
|     http://www.skills-1st.co.uk/                +44 1628 782565     |