Navigating into the LDAP hierarchy
Having our reflector component defined in the JSM’s
<browse/>
list makes for a
smooth transition into the reflection.
We’re going to navigate the LDAP hierarchy in a similar way
to what was described in Section 6.2.5.1.
On receipt of an initial browse request, ldapr must
return the top level of the LDAP hierarchy it has been set up
to reflect:
<iq type='get' to='ldap.cicero' id='7'> <query xmlns='jabber:iq:browse'/> </iq>
Figure 10-10 shows the LDAP hierarchy we’ve
discussed in Section 6.2.5.1. It’s part of
an imaginary structure devised to represent people and departments
in an organization. The base distinguished name, or
base DN (an LDAP term meaning the common
suffix used in the identifiers of all elements in a particular
LDAP structure), is dc=demo,dc=org
. A DN,
or distinguished name, can be thought of as a
key for a particular element. Levels within the LDAP structure are
identified with DNs of ever-increasing lengths, as they get more
specific the deeper the hierarchy is descended.
If ldapr
were to reflect this hierarchy,
we want the response to an initial browse request to return
information about
the People
and Groups
nodes. In Example 10-16, we see what this
response looks like.
SEND: <iq type="get" id="B88" to="ldap.cicero"> ...
Get Programming Jabber now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.