Sun Java System Directory Server Enterprise Edition 6.3 Administration Guide

Setting Smart Referrals

Smart referrals allow you to map a directory entry or a directory tree to a specific LDAP URL. Using smart referrals, you can refer client applications to a specific server or to a specific entry on a specific server.

Often, a smart referral points to an actual entry with the same DN on another server. However, you may define the smart referral to any entry on the same server or on a different server. For example, you can define the entry with the following DN to be a smart referral:


uid=bjensen,ou=People,dc=example,dc=com

The smart referral points to another entry on the server east.example.com:


cn=Babs Jensen,ou=Sales,o=east,dc=example,dc=com

The way the directory uses smart referrals conforms to the standard specified in section 4.1.10 of RFC 4511 (http://www.ietf.org/rfc/rfc4511.txt).

ProcedureTo Create and Modify a Smart Referral

You can use DSCC to perform this task. For information, see Directory Service Control Center Interface and the DSCC online help.

  1. To create a smart referral, create an entry with referral and extensibleObject object classes.

    The referral object class allows the ref attribute that is expected to contain an LDAP URL. The extensibleObject object class allows you to use any schema attribute as the naming attribute, in order to match the target entry.

    For example, to define the following entry to return a smart referral instead of the entry uid=bjensen, use this command:


    $ ldapmodify -a -h host1 -p 1389 -D cn=admin,cn=Administrators,cn=config -w -
    Enter bind password:
    dn: uid=bjensen,ou=People,dc=example,dc=com
    objectclass: top
    objectclass: extensibleObject
    objectclass: referral
    uid: bjensen
    ref: ldap://east.example.com/cn=Babs%20Jensen,ou=Sales,o=east,dc=example,dc=com

    Note –

    Any information after a space in an LDAP URL is ignored by the server. Thus, you must use %20 instead of spaces in any LDAP URL that you intend to use as a referral. Other special characters must be escaped.


    After you have defined the smart referral, modifications to the uid=bjensen entry will actually be performed on the cn=Babs Jensen entry on the other server. The ldapmodify command will automatically follow the referral, for example:


    $ ldapmodify -h host1 -p 1389 -D cn=admin,cn=Administrators,cn=config -w -
    Enter bind password:
    dn: uid=bjensen,ou=People,dc=example,dc=com
    changetype: replace
    replace: telephoneNumber
    telephoneNumber: (408) 555-1234
  2. (Optional) To modify the smart referral entry, use the -M option of ldapmodify:


    $ ldapmodify -M -h host1 -p 1389 -D cn=admin,cn=Administrators,cn=config -w -
    Enter bind password:
    dn: uid=bjensen,ou=People,dc=example,dc=com
    changetype: replace
    replace: ref
    ref: ldap://east.example.com/cn=Babs%20Jensen,ou=Marketing,o=east,dc=example,dc=com