Professional Documents
Culture Documents
OpenLDAP
Table of Contents
Compiling OpenLDAP 2
OpenLDAP Clients and Servers The slapd.conf Configuration File
Table of Contents
Obtaining the OpenLDAP Distribution Software Requirements Compiling OpenLDAP 2 OpenLDAP Clients and Servers The slapd.conf Configuration File Access Control Lists (ACLs)
OpenLDAP ?
Source code is available for download Compliant with the core LDAPv3 specifications Available on multiple platforms, including Linux, Solaris, Mac OS 10.2, and Windows Continuation of original University of Michigan LDAP server
Compiling OpenLDAP = lots of dependencies Try to obtain binary packages (eg. http://www.symas.com/ for Solaris & HP/UX) Source code: http://www.openldap.org/
Table of Contents
Obtaining the OpenLDAP Distribution Software Requirements Compiling OpenLDAP 2 OpenLDAP Clients and Servers The slapd.conf Configuration File Access Control Lists (ACLs)
Software Requirements
Table of Contents
Obtaining the OpenLDAP Distribution Software Requirements Compiling OpenLDAP 2 OpenLDAP Clients and Servers The slapd.conf Configuration File Access Control Lists (ACLs)
Compiling OpenLDAP
Compiling:
(untar) ./configure --enable-wrappers make depend make
enables support for TCP wrappers
make test
make install
(if your system supports it) Use ldd tool to verify that binaries (eg. slapd) have been compiled against correct libraries
Table of Contents
Obtaining the OpenLDAP Distribution Software Requirements Compiling OpenLDAP 2 OpenLDAP Clients and Servers The slapd.conf Configuration File Access Control Lists (ACLs)
Description
The LDAP server The LDAP replication helper Command-line tools for adding, modifiying, and deleting entries on an LDAP server (commands support both LDAPv2 and LDAPv3) Command-line utilities for searching an LDAP directory or testing a compare A tool for changing the password attribute in LDAP entries. This tool is the equivalent of /bin/passwd Tools for manipulating the local backend data store used by the slapd daemon A simple utility to generate password hashes suitable for use in slapd.conf The OpenLDAP client SDK
Table of Contents
Obtaining the OpenLDAP Distribution Software Requirements Compiling OpenLDAP 2 OpenLDAP Clients and Servers The slapd.conf Configuration File Access Control Lists (ACLs)
Central source of configuration information Used by slapd, slurpd, and related tools, such as slapcat and slapadd Tools like slapmodify and slapsearch use ldap.conf (not slapd.conf) for default settings
Parameters that affect overall behavior of the servers Parameters that relate to a specific database backend used by the slapd daemon
core.schema
OpenLDAP required core schemas: basic LDAPv3 attributes and objects described in RFCs 2251-2256
cosine.schema
For supporting COSINE and X.500 directory pilots (RFC 1274)
inetorgperson.schema
Defined inetOrgPerson object class & attributes (RFC 2798)
java.schema
For storing Java objects (RFC 2713)
misc.schema
Miscellaneous objects (eg LDAP-based mail routing with sendmail)
nis.schema
Attributes and objects necessary for using LDAP+NIS (RFC 2307)
openldap.schema
Miscelaneous objects used by the OpenLDAP project
Level
-1 0 1 2 4 8 16 32 64 128 256 512 1024 2048
Information recorded
All logging information No logging information Trace function calls Packet-handling debugging information Heavy trace debugging Connection management Packets sent and received Search filter processing Configuration file processing Access Control List processing Statistics for connection, operations, and results Statistics for results returned to cients Communication with shell backends Print entry parsing debug information
SASL is not needed if only simple binds will be used However, often useful to allow a combination of simple binds and SASL mechanisms for user connections, eg.:
Normal users can do lookups via a simple bind Administrators must authenticate via SASL
sasl-host and sasl-realm are respectively the FQDN and SASL domain used for authentication
Use sasldblistusers to dump the /etc/sasldb database
sasl-secprops allows you to define conditions that affect SASL security properties (see next slide)
Flag
None noplain noactive nodict noanonymous forwardsec passcred minssf=factor
Description
Clears the default security properties (noplain,noanonymous)
D is a b le s m e c h a n is m s v u ln e r a b le t o p a s s iv e a t t a c k s , s u c h a s v ie w in g n e t w o r k p a c k e t s t o e x a m in e p a s s w o r d s
Disables mechanisms that support anonymous logins Requires forward secrecy between sessions Requires mechanisms that pass client credentials
D e fin e s t h e m in im u m s e c u r it y s t r e n g t h e n fo r c e d . P o s s ib le v a lu e s in c lu d e : 0 ( n o p r o t e c t io n ) , 1 ( in t e g r it y p r o t e c t io n o n ly ) , 5 6 ( a llo w D E S e n c r y p t io n ) , 1 1 2 ( a llo w 3 D E S o r o t h e r s t r in g e n c r y p t io n m e t h o d s ) , a n d 1 2 8 ( a llo w R C 4 , B lo w fis h , o r o t h e r e n c r y p t io n a lg o r it h m s o f t h is c la s s )
Defines the maximum security strength setting. The possible values are identical to those of minssf maxbufsize=size Defines the maximum size of the security layer receive buffer. A value of 0 disables the security layer. The default value is the maximum of INT_MAX (ie. 65536) maxssf=factor
SASL Mechanisms
ANONYMOUS CRAM-MD5 DIGEST-MD5
maxssf
0 0 128 if compiled with RC4; 112 if compiled with DES; 0 if compiled with neither RC4 not DES 56 56 0 0 0 0
Parameters:
TLSCipherSuite cipher-suite-specification TLSCertificateFile filename TLSCertificateKeyFile filename
After global section: one or more database sections, eachdefining directory partition database directive, possible values:
bdb: BerkeleyDB 4 database manager, makes extensive use of indexing and caching; recommended OpenLDAP backend ldbm: GNU Database Manager or Sleepycat BerkeleyDB; older implementation passwd: Quick and dirty means of providing directory interface to the system passwd file
Example:
Table of Contents
Obtaining the OpenLDAP Distribution Software Requirements Compiling OpenLDAP 2 OpenLDAP Clients and Servers The slapd.conf Configuration File Access Control Lists (ACLs)
OpenLDAP ACLs are simple in syntax, yet very flexible and powerful Basic idea: WHO has ACCESS to WHAT ?
Access to read search results (eg. show all entries with a telephoneNumber of 555*)
search Access to apply search filters (eg. are there any entries with a telephoneNumber of 555*)
compare
Access to compare attributes auth Access to bind (authenticate). Requires that the client send a username (DN) and some type of credentials none No access
targetstyle is one of base, subtree, one, or children regex is a regular expresion representing a DN
targetstyle is used to broaden or narrow the scope (default subtree) An LDAP search filter that confirms to RFC 2254 Syntax is filter=ldapFilter
ACLs are evaluated on a first-match-wins basis: more restrictive ACLs should be listed prior to more general ones eg.
access to attrs=userPassword by * auth
better:
access to attrs=userPassword by self write by * auth access to attrs=userPassword by * auth
Assume:
Administrative accounts are located beneath the DN ou=admins,ou=eng,dc=plainjoe,dc=org Normal user accounts are located beneath ou=users,ou=eng,dc=plainjoe,dc=org Normal users should not be allowed to see other users' passwords A user should be able to modify his password
Gives:
access to dn=.*,ou=eng,dc=plainjoe,dc=org attrs=userPassword by self write by * auth by dn=.*,ou=admins,ou=eng,dc=plainjoe,dc=org write
This example:
access to dn=.*,ou=eng,dc=plainjoe,dc=org attrs=userPassword by self write by * auth by dn=.*,ou=admins,ou=eng,dc=plainjoe,dc=org write