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

gluing directories with draft-ietf-ldapext-locate-02.txt



The intro to this draft states this may be used by clients
(or servers acting as clients).  I'd like to add that it
may also be used by servers acting as servers to generate
appropriate referrals to requests not held by the server.
That is, if a client requests a DN not held by a server,
that server could use DNS SRV to produce a suitable
referral to the client.

I have an example of such a server operating (experimentally)
at ldap://root.openldap.org.  It will generate LDAPv3 (and
LDAPv2+) referrals using the method similar to that described
in the I-D.

Enjoy!
	Kurt

// pseudo code: real code is available from OpenLDAP public
// source repository.  http://www.openldap.org/software/repo.html
domain=NULL
foreach( rdn of dn ) // left to right
{
	if multiple value rdn {
		domain=NULL;
		continue;
	}
	if rdn attribute type == "dc" {
		if( domain != NULL ) {
			domain = concat( domain, "." );
		}
		domain = concat( domain, rdn value );
		continue;
	}
	domain=NULL;
}

if( domain != NULL ) {
	if( DNSSRV( domain ) ) {
		return referral;
	}
}
return noSuchObject;