The LDAP Guys
|
OpenLDAP TechTip: Introduction to OpenLDAP OverlaysAbstractModern enterprise directory servers must provide reliable, rapid access to increasingly complex data. OpenLDAP's overlay technology provides an easy-to-deploy yet powerful tool for customizing directory behavior for your organization. The core directory server infrastructure remains uniform and standards-compliant across installations, which results in more reliable software and strongly promotes standards compliance and interoperability. Development of new features can move at the speed needed by modern enterprise customers because the overlay API provides a clean, stable interface to directory server internal functionality. The Modular ApproachThe hierarchical database model implemented by directory servers lends itself to division of resources by delegating responsiblity. This led to the early appearance of replaceable database back-ends. Each of the modern database types offer different functionality:
When combined by using subordinate database clauses within one directory or directory referrals across multiple directories, these back-ends provide the basic tools for assembling complex organizational directory layouts. A typical organization's directory server infrastructure would use back-hdb for storage of local directory data and back-ldap to provide local LDAP clients a unified view of the organization-wide directory information tree. (DIT) OverlaysOverlays continue this approach of using convenient interlocking pieces to assemble a larger system by layering features on top of the functionality within existing back-ends:
The Power of StackingThe overlays improve the capabilities of the existing database back-ends by providing easy methods for local policy control. Just as they layer functionaly over databases, they can stack on top of each other. This is the typical method for applying all necessary customizations for an organization's directory server. There are several common examples which demonstrate how overlays fit together:
An Example
###### A simple slapd.conf
### schemas
include /usr/local/etc/openldap/schema/core.schema
include /usr/local/etc/openldap/schema/inetorgperson.schema
# slapo-ppolicy has extra schema requirements
include /usr/local/etc/openldap/schema/ppolicy.schema
pidfile /var/run/slapd.pid
argsfile /var/run/slapd.args
### set up dynamic modules
modulepath /usr/local/lib/openldap
# load several database backends
moduleload back_monitor.la
moduleload back_hdb.la
moduleload back_ldap.la
# load several overlays
moduleload ppolicy.la
moduleload refint.la
moduleload unique.la
### minimalist acls
# root DSE
access to dn="" by * read
# monitor backend for statistical reporting
access to dn="cn=Monitor" by * read
# other backends
access to attrs=userPassword
by self write
by * auth
access to *
by * read
### backend configuration
database monitor
database hdb
# do not forget to edit DB_CONFIG
cachesize 10000
suffix "dc=symas,dc=com"
# should be removed later, ideally
rootdn "cm=Manager,dc=symas,dc=com"
rootpw Secret
# indexing
index default eq
# basic use
index objectClass,uid,dc,o,ou
# references
index member,owner,seeAlso
# mail
index mail
# names
index cn,sn,givenName,displayName eq,sub
### overlays for that last hdb...
# password policy
overlay ppolicy
ppolicy_default "cn=default,ou=Policies,dc=symas,dc=com"
# referential integrity
overlay refint
refint_attributes member,owner,seeAlso
# uniqueness
overlay unique
unique_base "ou=People,dc=symas,dc=com"
unique_attributes uid,employeeNumber
### end
Overlays are a powerful customization tool that allow organizations and smaller units to fine-tune the directory behavior for their specific needs. Keeping this power encapsulated within overlays ensures that OpenLDAP remains both strictly adherent to the Internet standards and very useful for implementing ad-hoc local policies. |
|
|
|
Copyright © 2001 - 2012, Symas Corporation.All rights reserved. The content on this page has been approved by Jordan H. Heyman, the Dog in "seven guys and a dog." No rabbits were harmed in the production of this Web site. |