LDAP entry structure
LDAP entries are associated with an LdapSession and are composed of usually unordered attributes and are identified by a unique Distinguished Name (DN). Attributes are key/value(s) pairs, where the keys are strings such as 'sn' (aka last name) and the values are one or more strings or binary data.
o DN - Distinguished Name, the name that uniquely identifies an entry in the directory
o sn - surname
o dc - domain component
o ou - organizational unit (or user group) to which the user belongs. There may be more than one of these.
o cn - common name
o RDN - Relative Distinguished Name, an attribute that will make the entry unique in its hierarchy when combined with its parent's Distinguished Name
o objectClass - the type of the entry. There may be more than one of these.
The DN is similar to a full file name (C:\temp\somefile.txt) and the RDN is the name (somefile.txt) in the parent folder (temp). In the sample data, the DN of Aimee Rivest is cn=Aimee Rivest,ou=Payroll,dc=example,dc=com, and her RDN is cn=Aime Rivest in the parent entry ou=Payroll,dc=example,dc=com.
Sample data directory structure
The objectClass attribute specifies the "types" of an LDAP entry, and there are usually multiple values. For instance, the objectClass attribute's values for Aimee Rivest are inetOrgPerson, organizationalPerson, person, and top. Each of these types specify what attributes can be present in Aimee's entry. For instance, InetOrgPerson defines employeeType and departmentNumber attributes among others.
Attributes for sample data entry
An LDAP entry at a minimum would have an objectClass attribute and a Distinguished Name (DN). In the sample data, the DN of the organizationUnit Payroll is ou=Payroll,dc=example,dc=com, and the RDN is ou=Payroll in the parent entry dc=example,dc=com.
Instances of LdapEntry can be created in VA Smalltalk or retrieved through a search mechanism described
below;
o EsLdapExamples class>>exampleEdisonAdd creates a new LDAP entry and asks the server for inclusion to add it to the directory.
o EsLdapExamples class>>exampleFilterUsingAnd gets the LDAP entries matching an “anded” search filter.
o EsLdapExamples class>>exampleGetFirstRootEntry gets the top of the directory tree from the server.
For an example of how to modify attributes in an LdapEntry, see EsLdapExamples class>>exampleDeleteThenRestoreAttribute. For more on operations to modify LDAP entries, see
LdapEntry Operations.
Last modified date: 05/25/2018