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

Re: Attribute aliases



It's been a while since I've reviewed attribute aliasing and subtying,
but I'll give this a go anyways.

At 03:04 AM 4/15/99 -0500, Paul Makepeace wrote:
>I would like to investigate what's involved in enabling OpenLDAP to allow
>attributes to have aliases, i.e. enable an attribute to have more than one
>name.

I believe your specific issue is better resolved with attribute
subtyping.  Aliasing and subtying are similiar in someways but different
in others.   Lets say "commonName" is a alias for "cn",
"cn" & "sn" are subtypes of "name", and we have language tags
subtypes support.

Given:
	dn: cn=strauss, dc=foo, dc=com
	objectClass: person
	cn: Günter Strauß

If I search for "(commonName=Gunter Strauss)" "commonName"
	dn: commonName=strauss, dc=foo, dc=com
	commonName: Günter Strauß

Given:
	dn: cn=strauss, dc=foo, dc=com
	objectClass: person
	cn: Günter Strauß
	cn;lang-de: Günter Strauß
	cn;lang-en: Guenter Strauss
	cn;lang-en-US: Gunter Strauss
	sn;lang-de: Strauß
	sn;lang-en: Strauss

Now, if I search for "(commonName=Gunter Strauss)" "commonName"
	dn: commonName=strauss, dc=foo, dc=com
	commonName: Günter Strauß
	commonName;lang-de: Günter Strauß
	commonName;lang-en: Guenter Strauss
	commonName;lang-en-US: Gunter Strauss

A search for "(name=Strauss)" "name" should:
	dn: cn=strauss, dc=foo, dc=com
	cn: Günter Strauß
	cn;lang-de: Günter Strauß
	cn;lang-en: Guenter Strauss
	cn;lang-en-US: Gunter Strauss
	sn;lang-de: Strauß
	sn;lang-en: Strauss

A search for "(name=Strauss)" "cn" should:
	dn: cn=strauss, dc=foo, dc=com
	cn: Günter Strauß
	cn;lang-de: Günter Strauß
	cn;lang-en: Guenter Strauss
	cn;lang-en-US: Gunter Strauss

A search for "(name=Strauss)" "commonName;lang-en" should:
	dn: commonName=strauss, dc=foo, dc=com
	commonName;lang-en: Guenter Strauss

	(note: lang-en-US subtype is not returned)

and A search for "(cn;lang-en=Gunter Strauss)" "cn" should
return NO SUCH OBJECT (note: lang-en-US subtype isn't matched).

I'm sure there all kinds of issues that would have to be
addressed to properly support both LDAPv3 and LDAPv2 clients.

Attribute subtyping/alias support would be part of a greater schema
overall.  I encourge developers interested in such enhancements to
contribute.

Kurt