@@ -3121,20 +4087,20 @@ OpenLDAP Project (experimental)
include /usr/local/etc/openldap/schema/cosine.schema
include /usr/local/etc/openldap/schema/inetorgperson.schema
-Additional files may be available. Please consult the OpenLDAP FAQ (http://www.openldap.org/faq/).
+Additional files may be available. Please consult the OpenLDAP FAQ (http://www.openldap.org/faq/).
Note: You should not modify any of the schema items defined in provided files.
-
+
Schema used by slapd(8) may be extended to support additional syntaxes, matching rules, attribute types, and object classes. This chapter details how to add user application attribute types and object classes using the syntaxes and matching rules already supported by slapd. slapd can also be extended to support additional syntaxes, matching rules and system schema, but this requires some programming and hence is not discussed here.
There are five steps to defining new schema:
-- obtain Object Identifer
+
- obtain Object Identifier
- choose a name prefix
- create local schema file
- define custom attribute types (if necessary)
- define custom object classes
-
+
Each schema element is identified by a globally unique Object Identifier (OID). OIDs are also used to identify other objects. They are commonly found in protocols described by ASN.1. In particular, they are heavily used by the Simple Network Management Protocol (SNMP). As OIDs are hierarchical, your organization can obtain one OID and branch it as needed. For example, if your organization were assigned OID 1.1, you could branch the tree as follows:
Table 8.2: Example OID hierarchy
@@ -3183,7 +4149,7 @@ AttributeTypes
1.1.2.1.1
-myAttribute
+x-my-Attribute
|
@@ -3199,25 +4165,26 @@ ObjectClasses
1.1.2.2.1
-myObjectClass
+x-my-ObjectClass
|
-You are, of course, free to design a hierarchy suitable to your organizational needs under your organization's OID. No matter what hierarchy you choose, you should maintain a registry of assignments you make. This can be a simple flat file or something more sophisticated such as the OpenLDAP OID Registry (http://www.openldap.org/faq/index.cgi?file=197).
-For more information about Object Identifers (and a listing service) see http://www.alvestrand.no/harald/objectid/.
+You are, of course, free to design a hierarchy suitable to your organizational needs under your organization's OID. No matter what hierarchy you choose, you should maintain a registry of assignments you make. This can be a simple flat file or something more sophisticated such as the OpenLDAP OID Registry (http://www.openldap.org/faq/index.cgi?file=197).
+For more information about Object Identifiers (and a listing service) see http://www.alvestrand.no/harald/objectid/.
Under no circumstances should you hijack OID namespace!
-To obtain a registered OID at no cost, apply for an OID under the Internet Assigned Numbers Authority (IANA) maintained Private Enterprise arc. Any private enterprise (organization) may request an OID to be assigned under this arc. Just fill out the IANA form at http://www.iana.org/cgi-bin/enterprise.pl and your official OID will be sent to you usually within a few days. Your base OID will be something like 1.3.6.1.4.1.X where X is an integer.
+To obtain a registered OID at no cost, apply for a OID under the Internet Assigned Numbers Authority (ORG:IANA) maintained Private Enterprise arc. Any private enterprise (organization) may request a Private Enterprise Number (PEN) to be assigned under this arc. Just fill out the IANA form at http://pen.iana.org/pen/PenApplication.page and your official PEN will be sent to you usually within a few days. Your base OID will be something like 1.3.6.1.4.1.X where X is an integer.
-Note: Don't let the "MIB/SNMP" statement on the IANA page confuse you. OIDs obtained using this form may be used for any purpose including identifying LDAP schema elements.
+Note: PENs obtained using this form may be used for any purpose including identifying LDAP schema elements.
-Alternatively, OID name space may be available from a national authority (e.g., ANSI, BSI).
-
-In addition to assigning a unique object identifier to each schema element, you should provide a least one textual name for each element. The name should be both descriptive and not likely to clash with names of other schema elements. In particular, any name you choose should not clash with present or future Standard Track names.
-To reduce (but not eliminate) the potential for name clashes, the convention is to prefix names of non-Standard Track with a few letters to localize the changes to your organization. The smaller the organization, the longer your prefix should be.
-In the examples below, we have chosen a short prefix 'my' (to save space). Such a short prefix would only be suitable for a very large, global organization. In general, we recommend something like 'deFirm' (German company) or 'comExample' (elements associated with organization associated with example.com).
-
+Alternatively, OID name space may be available from a national authority (e.g., ANSI, BSI).
+
+In addition to assigning a unique object identifier to each schema element, you should provide a least one textual name for each element. Names should be registered with the IANA or prefixed with "x-" to place in the "private use" name space.
+The name should be both descriptive and not likely to clash with names of other schema elements. In particular, any name you choose should not clash with present or future Standard Track names (this is assured if you registered names or use names beginning with "x-").
+It is noted that you can obtain your own registered name prefix so as to avoid having to register your names individually. See RFC4520 for details.
+In the examples below, we have used a short prefix 'x-my-'. Such a short prefix would only be suitable for a very large, global organization. In general, we recommend something like 'x-de-Firm-' (German company) or 'x-com-Example' (elements associated with organization associated with example.com).
+
The objectclass and attributeTypes configuration file directives can be used to define schema rules on entries in the directory. It is customary to create a file to contain definitions of your custom schema items. We recommend you create a file local.schema in /usr/local/etc/openldap/schema/local.schema and then include this file in your slapd.conf(5) file immediately after other schema include directives.
# include schema
@@ -3227,12 +4194,12 @@ myObjectClass
# include local schema
include /usr/local/etc/openldap/schema/local.schema
-
-The attributetype directive is used to define a new attribute type. The directive uses the same Attribute Type Description (as defined in RFC2252) used by the attributeTypes attribute found in the subschema subentry, e.g.:
+
+The attributetype directive is used to define a new attribute type. The directive uses the same Attribute Type Description (as defined in RFC4512) used by the attributeTypes attribute found in the subschema subentry, e.g.:
- attributetype <RFC2252 Attribute Type Description>
+ attributetype <RFC4512 Attribute Type Description>
-where Attribute Type Description is defined by the following BNF:
+where Attribute Type Description is defined by the following ABNF:
AttributeTypeDescription = "(" whsp
numericoid whsp ; AttributeType identifier
@@ -3271,7 +4238,7 @@ myObjectClass
SUP name )
Notice that each defines the attribute's OID, provides a short name, and a brief description. Each name is an alias for the OID. slapd(8) returns the first listed name when returning results.
-The first attribute, name, holds values of directoryString (UTF-8 encoded Unicode) syntax. The syntax is specified by OID (1.3.6.1.4.1.1466.115.121.1.15 identifies the directoryString syntax). A length recommendation of 32768 is specified. Servers should support values of this length, but may support longer values The field does NOT specify a size constraint, so is ignored on servers (such as slapd) which don't impose such size limits. In addition, the equality and substring matching uses case ignore rules. Below are tables listing commonly used syntax and matching rules (OpenLDAP supports these and many more).
+The first attribute, name, holds values of directoryString (UTF-8 encoded Unicode) syntax. The syntax is specified by OID (1.3.6.1.4.1.1466.115.121.1.15 identifies the directoryString syntax). A length recommendation of 32768 is specified. Servers should support values of this length, but may support longer values The field does NOT specify a size constraint, so is ignored on servers (such as slapd) which don't impose such size limits. In addition, the equality and substring matching uses case ignore rules. Below are tables listing commonly used syntax and matching rules (slapd(8) supports these and many more).
Table 8.3: Commonly Used Syntaxes
@@ -3315,7 +4282,7 @@ Unicode (UTF-8) string
1.3.6.1.4.1.1466.115.121.1.12
-LDAP DN
+LDAP DN
|
@@ -3359,7 +4326,7 @@ object identifier
1.3.6.1.4.1.1466.115.121.1.40
-arbitary octets
+arbitrary octets
|
@@ -3572,26 +4539,26 @@ object identifier
The second attribute, cn, is a subtype of name hence it inherits the syntax, matching rules, and usage of name. commonName is an alternative name.
Neither attribute is restricted to a single value. Both are meant for usage by user applications. Neither is obsolete nor collective.
The following subsections provide a couple of examples.
-
+
Many organizations maintain a single unique name for each user. Though one could use displayName (RFC2798), this attribute is really meant to be controlled by the user, not the organization. We could just copy the definition of displayName from inetorgperson.schema and replace the OID, name, and description, e.g:
- attributetype ( 1.1.2.1.1 NAME 'myUniqueName'
+ attributetype ( 1.1.2.1.1 NAME 'x-my-UniqueName'
DESC 'unique name with my organization'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
SINGLE-VALUE )
-However, if we want this name to be included in name assertions [e.g. (name=*Jane*)], the attribute could alternatively be defined as a subtype of name, e.g.:
+However, if we want this name to be used in name assertions, e.g. (name=*Jane*), the attribute could alternatively be defined as a subtype of name, e.g.:
- attributetype ( 1.1.2.1.1 NAME 'myUniqueName'
+ attributetype ( 1.1.2.1.1 NAME 'x-my-UniqueName'
DESC 'unique name with my organization'
SUP name )
-
-Many organizations maintain a photo of each each user. A myPhoto attribute type could be defined to hold a photo. Of course, one could use just use jpegPhoto (RFC2798) (or a subtype) to hold the photo. However, you can only do this if the photo is in JPEG File Interchange Format. Alternatively, an attribute type which uses the Octet String syntax can be defined, e.g.:
+
+Many organizations maintain a photo of each each user. A x-my-Photo attribute type could be defined to hold a photo. Of course, one could use just use jpegPhoto (RFC2798) (or a subtype) to hold the photo. However, you can only do this if the photo is in JPEG File Interchange Format. Alternatively, an attribute type which uses the Octet String syntax can be defined, e.g.:
- attributetype ( 1.1.2.1.2 NAME 'myPhoto'
+ attributetype ( 1.1.2.1.2 NAME 'x-my-Photo'
DESC 'a photo (application defined format)'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.40
SINGLE-VALUE )
@@ -3600,16 +4567,16 @@ object identifier
If you wanted to support multiple photo formats, you could define a separate attribute type for each format, prefix the photo with some typing information, or describe the value using ASN.1 and use the ;binary transfer option.
Another alternative is for the attribute to hold a URI pointing to the photo. You can model such an attribute after labeledURI (RFC2079) or simply create a subtype, e.g.:
- attributetype ( 1.1.2.1.3 NAME 'myPhotoURI'
+ attributetype ( 1.1.2.1.3 NAME 'x-my-PhotoURI'
DESC 'URI and optional label referring to a photo'
SUP labeledURI )
-
-The objectclasses directive is used to define a new object class. The directive uses the same Object Class Description (as defined in RFC2252) used by the objectClasses attribute found in the subschema subentry, e.g.:
+
+The objectclasses directive is used to define a new object class. The directive uses the same Object Class Description (as defined in RFC4512) used by the objectClasses attribute found in the subschema subentry, e.g.:
- objectclass <RFC2252 Object Class Description>
+ objectclass <RFC4512 Object Class Description>
-where Object Class Description is defined by the following BNF:
+where Object Class Description is defined by the following ABNF:
ObjectClassDescription = "(" whsp
numericoid whsp ; ObjectClass identifier
@@ -3623,26 +4590,26 @@ object identifier
[ "MAY" oids ] ; AttributeTypes
whsp ")"
-where whsp is a space (' '), numericoid is a globally unique OID in numeric form (e.g. 1.1.0), qdescrs is one or more names, and oids is one or more names and/or OIDs.
-
-To define an auxiliary object class which allows myPhoto to be added to any existing entry.
+where whsp is a space (' '), numericoid is a globally unique OID in dotted-decimal form (e.g. 1.1.0), qdescrs is one or more names, and oids is one or more names and/or OIDs.
+
+To define an auxiliary object class which allows x-my-Photo to be added to any existing entry.
- objectclass ( 1.1.2.2.1 NAME 'myPhotoObject'
- DESC 'mixin myPhoto'
+ objectclass ( 1.1.2.2.1 NAME 'x-my-PhotoObject'
+ DESC 'mixin x-my-Photo'
AUXILIARY
- MAY myPhoto )
+ MAY x-my-Photo )
-
+
If your organization would like have a private structural object class to instantiate users, you can subclass one of the existing person classes, such as inetOrgPerson (RFC2798), and add any additional attributes which you desire.
- objectclass ( 1.1.2.2.2 NAME 'myPerson'
+ objectclass ( 1.1.2.2.2 NAME 'x-my-Person'
DESC 'my person'
SUP inetOrgPerson
- MUST ( myUniqueName $ givenName )
- MAY myPhoto )
+ MUST ( x-my-UniqueName $ givenName )
+ MAY x-my-Photo )
-The object class inherits the required/allowed attribute types of inetOrgPerson but requires myUniqueName and givenName and allows myPhoto.
-
+The object class inherits the required/allowed attribute types of inetOrgPerson but requires x-my-UniqueName and givenName and allows x-my-Photo.
+
To ease the management and use of OIDs, slapd(8) supports Object Identifier macros. The objectIdentifier directive is used to equate a macro (name) with a OID. The OID may possibly be derived from a previously defined OID macro. The slapd.conf(5) syntax is:
objectIdentifier <name> { <oid> | <name>[:<suffix>] }
@@ -3654,31 +4621,31 @@ object identifier
objectIdentifier myLDAP myOID:2
objectIdentifier myAttributeType myLDAP:1
objectIdentifier myObjectClass myLDAP:2
- attributetype ( myAttributeType:3 NAME 'myPhotoURI'
+ attributetype ( myAttributeType:3 NAME 'x-my-PhotoURI'
DESC 'URI and optional label referring to a photo'
SUP labeledURI )
- objectclass ( myObjectClass:1 NAME 'myPhotoObject'
- DESC 'mixin myPhoto'
+ objectclass ( myObjectClass:1 NAME 'x-my-PhotoObject'
+ DESC 'mixin x-my-Photo'
AUXILIARY
- MAY myPhoto )
+ MAY x-my-Photo )
-
+
OpenLDAP Software is designed to run in a wide variety of computing environments from tightly-controlled closed networks to the global Internet. Hence, OpenLDAP Software supports many different security mechanisms. This chapter describes these mechanisms and discusses security considerations for using OpenLDAP Software.
-
-
+
+
By default, slapd(8) will listen on both the IPv4 and IPv6 "any" addresses. It is often desirable to have slapd listen on select address/port pairs. For example, listening only on the IPv4 address 127.0.0.1 will disallow remote access to the directory server. E.g.:
slapd -h ldap://127.0.0.1
While the server can be configured to listen on a particular interface address, this doesn't necessarily restrict access to the server to only those networks accessible via that interface. To selective restrict remote access, it is recommend that an IP Firewall be used to restrict access.
See Command-line Options and slapd(8) for more information.
-
+
IP firewall capabilities of the server system can be used to restrict access based upon the client's IP address and/or network interface used to communicate with the client.
Generally, slapd(8) listens on port 389/tcp for ldap:// sessions and port 636/tcp for ldaps://) sessions. slapd(8) may be configured to listen on other ports.
As specifics of how to configure IP firewall are dependent on the particular kind of IP firewall used, no examples are provided here. See the document associated with your IP firewall.
-
+
slapd(8) supports TCP Wrappers. TCP Wrappers provide a rule-based access control system for controlling TCP/IP access to the server. For example, the host_options(5) rule:
slapd: 10.0.0.0/255.0.0.0 127.0.0.1 : ALLOW
@@ -3687,10 +4654,10 @@ object identifier
allows only incoming connections from the private network 10.0.0.0 and localhost (127.0.0.1) to access the directory service. Note that IP addresses are used as slapd(8) is not normally configured to perform reverse lookups.
It is noted that TCP wrappers require the connection to be accepted. As significant processing is required just to deny a connection, it is generally advised that IP firewall protection be used instead of TCP wrappers.
See hosts_access(5) for more information on TCP wrapper rules.
-
+
Transport Layer Security (TLS) can be used to provide data integrity and confidentiality protection. OpenLDAP supports negotiation of TLS (SSL) via both StartTLS and ldaps://. See the Using TLS chapter for more information. StartTLS is the standard track mechanism.
-A number of Simple Authentication and Security Layer (SASL) mechanisms, such as DIGEST-MD5 and GSSAPI, also provide data integrity and confidentiality protection. See the Using SASL chapter for more information.
-
+A number of Simple Authentication and Security Layer (SASL) mechanisms, such as DIGEST-MD5 and GSSAPI, also provide data integrity and confidentiality protection. See the Using SASL chapter for more information.
+
The server uses Security Strength Factors (SSF) to indicate the relative strength of protection. A SSF of zero (0) indicates no protections are in place. A SSF of one (1) indicates integrity protection are in place. A SSF greater than one (>1) roughly correlates to the effective encryption key length. For example, DES is 56, 3DES is 112, and AES 128, 192, or 256.
A number of administrative controls rely on SSFs associated with TLS and SASL protection in place on an LDAP session.
security controls disallow operations when appropriate protections are not in place. For example:
@@ -3698,42 +4665,42 @@ object identifier
security ssf=1 update_ssf=112
requires integrity protection for all operations and encryption protection, 3DES equivalent, for update operations (e.g. add, delete, modify, etc.). See slapd.conf(5) for details.
-For fine-grained control, SSFs may be used in access controls. See Access Control section of the The slapd Configuration File for more information.
-
-
+For fine-grained control, SSFs may be used in access controls. See The access Configuration Directive section of the The slapd Configuration File for more information.
+
+
The LDAP "simple" method has three modes of operation:
- anonymous,
- unauthenticated, and
- user/password authenticated.
-Anonymous access is obtained by providing no name and no password to the "simple" bind operation. Unauthenticated access is obtained by providing a name but no password. Authenticated access is obtain by providing a valid name and password.
-An anonymous bind results in an anonymous authorization association. Anonymous bind mechanism is enabled by default, but can be disabled by specifying "disallow bind_anon" in slapd.conf(5).
+Anonymous access is requested by providing no name and no password to the "simple" bind operation. Unauthenticated access is requested by providing a name but no password. Authenticated access is requested by providing a valid name and password.
+An anonymous bind results in an anonymous authorization association. Anonymous bind mechanism is enabled by default, but can be disabled by specifying "disallow bind_anon" in slapd.conf(5). Note that disabling the anonymous bind mechanism does not prevent anonymous access to the directory. To require authentication to access the directory, one should instead specify "require authc".
An unauthenticated bind also results in an anonymous authorization association. Unauthenticated bind mechanism is disabled by default, but can be enabled by specifying "allow bind_anon_cred" in slapd.conf(5). As a number of LDAP applications mistakenly generate unauthenticated bind request when authenticated access was intended (that is, they do not ensure a password was provided), this mechanism should generally remain disabled.
-A successful user/password authenticated bind results in a user authorization identity, the provided name, being associated with the session. User/password authenticated bind is enabled by default. However, as this mechanism itself offers no evesdropping protection (e.g., the password is set in the clear), it is recommended that it be used only in tightly controlled systems or when the LDAP session is protected by other means (e.g., TLS, IPSEC). Where the administrator relies on TLS to protect the password, it is recommended that unprotected authentication be disabled. This is done by setting "disallow bind_simple_unprotected" in slapd.conf(5). The security directive's simple_bind option provides fine grain control over the level of confidential protection to require for simple user/password authentication.
+A successful user/password authenticated bind results in a user authorization identity, the provided name, being associated with the session. User/password authenticated bind is enabled by default. However, as this mechanism itself offers no eavesdropping protection (e.g., the password is set in the clear), it is recommended that it be used only in tightly controlled systems or when the LDAP session is protected by other means (e.g., TLS, IPsec). Where the administrator relies on TLS to protect the password, it is recommended that unprotected authentication be disabled. This is done using the security directive's simple_bind option, which provides fine grain control over the level of confidential protection to require for simple user/password authentication. E.g., using security simple_bind=56 would require simple binds to use encryption of DES equivalent or better.
The user/password authenticated bind mechanism can be completely disabled by setting "disallow bind_simple".
Note: An unsuccessful bind always results in the session having an anonymous authorization association.
-
+
The LDAP SASL method allows use of any SASL authentication mechanism. The Using SASL discusses use of SASL.
-
-OpenLDAP clients and servers are capable of authenticating via the Simple Authentication and Security Layer (SASL) framework, which is detailed in RFC2222. This chapter describes how to make use of SASL in OpenLDAP.
-There are several industry standard authentication mechanisms that can be used with SASL, including GSSAPI for Kerberos V, DIGEST-MD5, and PLAIN and EXTERNAL for use with Transport Layer Security (TLS).
-The standard client tools provided with OpenLDAP Software, such as ldapsearch(1) and ldapmodify(1), will by default attempt to authenticate the user to the slapd(8) server using SASL. Basic authentication service can be set up by the LDAP administrator with a few steps, allowing users to be authenticated to the slapd server as their LDAP entry. With a few extra steps, some users and services can be allowed to exploit SASL's proxy authorization feature, allowing them to authenticate themselves and then switch their identity to that of another user or service.
-This chapter assumes you have read Cyrus SASL for System Administrators, provided with the Cyrus SASL package (in doc/sysadmin.html) and have a working Cyrus SASL installation. You should use the Cyrus SASL sample_client and sample_server to test your SASL installation before attempting to make use of it with OpenLDAP Software.
+
+OpenLDAP clients and servers are capable of authenticating via the Simple Authentication and Security Layer (SASL) framework, which is detailed in RFC4422. This chapter describes how to make use of SASL in OpenLDAP.
+There are several industry standard authentication mechanisms that can be used with SASL, including GSSAPI for Kerberos V, DIGEST-MD5, and PLAIN and EXTERNAL for use with Transport Layer Security (TLS).
+The standard client tools provided with OpenLDAP Software, such as ldapsearch(1) and ldapmodify(1), will by default attempt to authenticate the user to the LDAP directory server using SASL. Basic authentication service can be set up by the LDAP administrator with a few steps, allowing users to be authenticated to the slapd server as their LDAP entry. With a few extra steps, some users and services can be allowed to exploit SASL's proxy authorization feature, allowing them to authenticate themselves and then switch their identity to that of another user or service.
+This chapter assumes you have read Cyrus SASL for System Administrators, provided with the Cyrus SASL package (in doc/sysadmin.html) and have a working Cyrus SASL installation. You should use the Cyrus SASL sample_client and sample_server to test your SASL installation before attempting to make use of it with OpenLDAP Software.
Note that in the following text the term user is used to describe a person or application entity who is connecting to the LDAP server via an LDAP client, such as ldapsearch(1). That is, the term user not only applies to both an individual using an LDAP client, but to an application entity which issues LDAP client operations without direct user control. For example, an e-mail server which uses LDAP operations to access information held in an LDAP server is an application entity.
-
+
SASL offers many different authentication mechanisms. This section briefly outlines security considerations.
Some mechanisms, such as PLAIN and LOGIN, offer no greater security over LDAP simple authentication. Like LDAP simple authentication, such mechanisms should not be used unless you have adequate security protections in place. It is recommended that these mechanisms be used only in conjunction with Transport Layer Security (TLS). Use of PLAIN and LOGIN are not discussed further in this document.
-The DIGEST-MD5 mechanism is the mandatory-to-implement authentication mechanism for LDAPv3. Though DIGEST-MD5 is not a strong authentication mechanism in comparison with trusted third party authentication systems (such as Kerberos or public key systems), it does offer significant protections against a number of attacks. Unlike the CRAM-MD5 mechanism, it prevents chosen plaintext attacks. DIGEST-MD5 is favored over the use of plaintext password mechanisms. The CRAM-MD5 mechanism is deprecated in favor of DIGEST-MD5. Use of DIGEST-MD5 is discussed below.
-The GSSAPI mechanism utilizes Kerberos V to provide secure authentication services. The KERBEROS_V4 mechanism is available for those using Kerberos IV. Kerberos is viewed as a secure, distributed authentication system suitable for both small and large enterprises. Use of GSSAPI and KERBEROS_V4 are discussed below.
+The DIGEST-MD5 mechanism is the mandatory-to-implement authentication mechanism for LDAPv3. Though DIGEST-MD5 is not a strong authentication mechanism in comparison with trusted third party authentication systems (such as Kerberos or public key systems), it does offer significant protections against a number of attacks. Unlike the CRAM-MD5 mechanism, it prevents chosen plaintext attacks. DIGEST-MD5 is favored over the use of plaintext password mechanisms. The CRAM-MD5 mechanism is deprecated in favor of DIGEST-MD5. Use of DIGEST-MD5 is discussed below.
+The GSSAPI mechanism utilizes GSS-API Kerberos V to provide secure authentication services. The KERBEROS_V4 mechanism is available for those using Kerberos IV. Kerberos is viewed as a secure, distributed authentication system suitable for both small and large enterprises. Use of GSSAPI and KERBEROS_V4 are discussed below.
The EXTERNAL mechanism utilizes authentication services provided by lower level network services such as TLS (TLS). When used in conjunction with TLS X.509-based public key technology, EXTERNAL offers strong authentication. Use of EXTERNAL is discussed in the Using TLS chapter.
There are other strong authentication mechanisms to choose from, including OTP (one time passwords) and SRP (secure remote passwords). These mechanisms are not discussed in this document.
-
-Getting basic SASL authentication running involves a few steps. The first step configures your slapd server environment so that it can communicate with client programs using the security system in place at your site. This usually involves setting up a service key, a public key, or other form of secret. The second step concerns mapping authentication identities to LDAP DN's, which depends on how entries are laid out in your directory. An explanation of the first step will be given in the next section using Kerberos V4 as an example mechanism. The steps necessary for your site's authentication mechanism will be similar, but a guide to every mechanism available under SASL is beyond the scope of this chapter. The second step is described in the section Mapping Authentication Identities.
-
+
+Getting basic SASL authentication running involves a few steps. The first step configures your slapd server environment so that it can communicate with client programs using the security system in place at your site. This usually involves setting up a service key, a public key, or other form of secret. The second step concerns mapping authentication identities to LDAP DN's, which depends on how entries are laid out in your directory. An explanation of the first step will be given in the next section using Kerberos V4 as an example mechanism. The steps necessary for your site's authentication mechanism will be similar, but a guide to every mechanism available under SASL is beyond the scope of this chapter. The second step is described in the section Mapping Authentication Identities.
+
This section describes the use of the SASL GSSAPI mechanism and Kerberos V with OpenLDAP. It will be assumed that you have Kerberos V deployed, you are familiar with the operation of the system, and that your users are trained in its use. This section also assumes you have familiarized yourself with the use of the GSSAPI mechanism by reading Configuring GSSAPI and Cyrus SASL (provided with Cyrus SASL in the doc/gssapi file) and successfully experimented with the Cyrus provided sample_server and sample_client applications. General information about Kerberos is available at http://web.mit.edu/kerberos/www/.
To use the GSSAPI mechanism with slapd(8) one must create a service key with a principal for ldap service within the realm for the host on which the service runs. For example, if you run slapd on directory.example.com and your realm is EXAMPLE.COM, you need to create a service key with the principal:
@@ -3754,7 +4721,7 @@ object identifier
uid=ursula/admin,cn=foreign.realm,cn=gssapi,cn=auth
The authentication request DN can be used directly ACLs and groupOfNames "member" attributes, since it is of legitimate LDAP DN format. Or alternatively, the authentication DN could be mapped before use. See the section Mapping Authentication Identities for details.
-
+
This section describes the use of the SASL KERBEROS_V4 mechanism with OpenLDAP. It will be assumed that you are familiar with the workings of the Kerberos IV security system, and that your site has Kerberos IV deployed. Your users should be familiar with authentication policy, how to receive credentials in a Kerberos ticket cache, and how to refresh expired credentials.
Note: KERBEROS_V4 and Kerberos IV are deprecated in favor of GSSAPI and Kerberos V.
@@ -3777,7 +4744,7 @@ object identifier
uid=adamsom,cn=example.com,cn=kerberos_v4,cn=auth
This authentication request DN can be used directly ACLs or, alternatively, mapped prior to use. See the section Mapping Authentication Identities for details.
-
+
This section describes the use of the SASL DIGEST-MD5 mechanism using secrets stored either in the directory itself or in Cyrus SASL's own database. DIGEST-MD5 relies on the client and the server sharing a "secret", usually a password. The server generates a challenge and the client a response proving that it knows the shared secret. This is much more secure than simply sending the secret over the wire.
Cyrus SASL supports several shared-secret mechanisms. To do this, it needs access to the plaintext password (unlike mechanisms which pass plaintext passwords over the wire, where the server can store a hashed version of the password).
The server's copy of the shared-secret may be stored in Cyrus SASL's own sasldb database, in an external system accessed via saslauthd, or in LDAP database itself. In either case it is very important to apply file access controls and LDAP access controls to prevent exposure of the passwords. The configuration and commands discussed in this section assume the use of Cyrus SASL 2.1.
@@ -3816,7 +4783,7 @@ object identifier
Note: in each of the above cases, no authorization identity (e.g. -X) was provided. Unless you are attempting SASL Proxy Authorization, no authorization identity should be specified. The server will infer an authorization identity from authentication identity (as described below).
-
+
The authentication mechanism in the slapd server will use SASL library calls to obtain the authenticated user's "username", based on whatever underlying authentication mechanism was used. This username is in the namespace of the authentication mechanism, and not in the normal LDAP namespace. As stated in the sections above, that username is reformatted into an authentication request DN of the form
uid=<username>,cn=<realm>,cn=<mechanism>,cn=auth
@@ -3837,8 +4804,8 @@ object identifier
The authentication request DN is compared to the search pattern using the regular expression functions regcomp() and regexec(), and if it matches, it is rewritten as the replacement pattern. If there are multiple authz-regexp directives, only the first whose search pattern matches the authentication identity is used. The string that is output from the replacement pattern should be the authentication DN of the user or an LDAP URL. If replacement string produces a DN, the entry named by this DN need not be held by this server. If the replace string produces an LDAP URL, that LDAP URL must evaluate to one and only one entry held by this server.
The search pattern can contain any of the regular expression characters listed in regexec(3C). The main characters of note are dot ".", asterisk "*", and the open and close parenthesis "(" and ")". Essentially, the dot matches any character, the asterisk allows zero or more repeats of the immediately preceding character or pattern, and terms in parenthesis are remembered for the replacement pattern.
-The replacement pattern will produce either a DN or URL refering to the user. Anything from the authentication request DN that matched a string in parenthesis in the search pattern is stored in the variable "$1". That variable "$1" can appear in the replacement pattern, and will be replaced by the string from the authentication request DN. If there were multiple sets of parentheses in the search pattern, the variables $2, $3, etc are used.
-
+The replacement pattern will produce either a DN or URL referring to the user. Anything from the authentication request DN that matched a string in parenthesis in the search pattern is stored in the variable "$1". That variable "$1" can appear in the replacement pattern, and will be replaced by the string from the authentication request DN. If there were multiple sets of parentheses in the search pattern, the variables $2, $3, etc are used.
+
Where possible, direct mapping of the authentication request DN to the user's DN is generally recommended. Aside from avoiding the expense of searching for the user's DN, it allows mapping to DNs which refer to entries not held by this server.
Suppose the authentication request DN is written as:
@@ -3862,7 +4829,7 @@ object identifier
Be careful about setting the search pattern too leniently, however, since it may mistakenly allow persons to become authenticated as a DN to which they should not have access. It is better to write several strict directives than one lenient directive which has security holes. If there is only one authentication mechanism in place at your site, and zero or one realms in use, you might be able to map between authentication identities and LDAP DN's with a single authz-regexp directive.
Don't forget to allow for the case where the realm is omitted as well as the case with an explicitly specified realm. This may well require a separate authz-regexp directive for each case, with the explicit-realm entry being listed first.
-
+
There are a number of cases where mapping to a LDAP URL may be appropriate. For instance, some sites may have person objects located in multiple areas of the LDAP tree, such as if there were an ou=accounting tree and an ou=engineering tree, with persons interspersed between them. Or, maybe the desired mapping must be based upon information in the user's information. Consider the need to map the above authentication request DN to user whose entry is as follows:
dn: cn=Mark Adamson,ou=People,dc=Example,dc=COM
@@ -3902,19 +4869,20 @@ object identifier
ldap:///dc=customers,dc=example,dc=com??one?(&(uid=$1)(objectClass=person))
Note that the explicitly-named realms are handled first, to avoid the realm name becoming part of the UID. Also note the use of scope and filters to limit matching to desirable entries.
+Note as well that authz-regexp internal search are subject to access controls. Specifically, the authentication identity must have auth access.
See slapd.conf(5) for more detailed information.
-
+
The SASL offers a feature known as proxy authorization, which allows an authenticated user to request that they act on the behalf of another user. This step occurs after the user has obtained an authentication DN, and involves sending an authorization identity to the server. The server will then make a decision on whether or not to allow the authorization to occur. If it is allowed, the user's LDAP connection is switched to have a binding DN derived from the authorization identity, and the LDAP session proceeds with the access of the new authorization DN.
The decision to allow an authorization to proceed depends on the rules and policies of the site where LDAP is running, and thus cannot be made by SASL alone. The SASL library leaves it up to the server to make the decision. The LDAP administrator sets the guidelines of who can authorize to what identity by adding information into the LDAP database entries. By default, the authorization features are disabled, and must be explicitly configured by the LDAP administrator before use.
-
+
This sort of service is useful when one entity needs to act on the behalf of many other users. For example, users may be directed to a web page to make changes to their personal information in their LDAP entry. The users authenticate to the web server to establish their identity, but the web server CGI cannot authenticate to the LDAP server as that user to make changes for them. Instead, the web server authenticates itself to the LDAP server as a service identity, say,
cn=WebUpdate,dc=example,dc=com
and then it will SASL authorize to the DN of the user. Once so authorized, the CGI makes changes to the LDAP entry of the user, and as far as the slapd server can tell for its ACLs, it is the user themself on the other end of the connection. The user could have connected to the LDAP server directly and authenticated as themself, but that would require the user to have more knowledge of LDAP clients, knowledge which the web page provides in an easier format.
-Proxy authorization can also be used to limit access to an account that has greater access to the database. Such an account, perhaps even the root DN specified in slapd.conf(5), can have a strict list of people who can authorize to that DN. Changes to the LDAP database could then be only allowed by that DN, and in order to become that DN, users must first authenticate as one of the persons on the list. This allows for better auditing of who made changes to the LDAP database. If people were allowed to authenticate directly to the priviliged account, possibly through the rootpw slapd.conf(5) directive or through a userPassword attribute, then auditing becomes more difficult.
+Proxy authorization can also be used to limit access to an account that has greater access to the database. Such an account, perhaps even the root DN specified in slapd.conf(5), can have a strict list of people who can authorize to that DN. Changes to the LDAP database could then be only allowed by that DN, and in order to become that DN, users must first authenticate as one of the persons on the list. This allows for better auditing of who made changes to the LDAP database. If people were allowed to authenticate directly to the privileged account, possibly through the rootpw slapd.conf(5) directive or through a userPassword attribute, then auditing becomes more difficult.
Note that after a successful proxy authorization, the original authentication DN of the LDAP connection is overwritten by the new DN from the authorization request. If a service program is able to authenticate itself as its own authentication DN and then authorize to other DN's, and it is planning on switching to several different identities during one LDAP session, it will need to authenticate itself each time before authorizing to another DN (or use a different proxy authorization mechanism). The slapd server does not keep record of the service program's ability to switch to other DN's. On authentication mechanisms like Kerberos this will not require multiple connections being made to the Kerberos server, since the user's TGT and "ldap" session key are valid for multiple uses for the several hours of the ticket lifetime.
-
+
The SASL authorization identity is sent to the LDAP server via the -X switch for ldapsearch(1) and other tools, or in the *authzid parameter to the lutil_sasl_defaults() call. The identity can be in one of two forms, either
u:<username>
@@ -3923,96 +4891,104 @@ object identifier
dn:<dn>
-In the first form, the <username> is from the same namespace as the authentication identities above. It is the user's username as it is refered to by the underlying authentication mechanism. Authorization identities of this form are converted into a DN format by the same function that the authentication process used, producing an authorization request DN of the form
+In the first form, the <username> is from the same namespace as the authentication identities above. It is the user's username as it is referred to by the underlying authentication mechanism. Authorization identities of this form are converted into a DN format by the same function that the authentication process used, producing an authorization request DN of the form
uid=<username>,cn=<realm>,cn=<mechanism>,cn=auth
That authorization request DN is then run through the same authz-regexp process to convert it into a legitimate authorization DN from the database. If it cannot be converted due to a failed search from an LDAP URL, the authorization request fails with "inappropriate access". Otherwise, the DN string is now a legitimate authorization DN ready to undergo approval.
If the authorization identity was provided in the second form, with a "dn:" prefix, the string after the prefix is already in authorization DN form, ready to undergo approval.
-
+
Once slapd has the authorization DN, the actual approval process begins. There are two attributes that the LDAP administrator can put into LDAP entries to allow authorization:
authzTo
authzFrom
Both can be multivalued. The authzTo attribute is a source rule, and it is placed into the entry associated with the authentication DN to tell what authorization DNs the authenticated DN is allowed to assume. The second attribute is a destination rule, and it is placed into the entry associated with the requested authorization DN to tell which authenticated DNs may assume it.
-The choice of which authorization policy attribute to use is up to the administrator. Source rules are checked first in the person's authentication DN entry, and if none of the authzTo rules specify the authorization is permitted, the authzFrom rules in the authorization DN entry are then checked. If neither case specifies that the request be honored, the request is denied. Since the default behaviour is to deny authorization requests, rules only specify that a request be allowed; there are no negative rules telling what authorizations to deny.
+The choice of which authorization policy attribute to use is up to the administrator. Source rules are checked first in the person's authentication DN entry, and if none of the authzTo rules specify the authorization is permitted, the authzFrom rules in the authorization DN entry are then checked. If neither case specifies that the request be honored, the request is denied. Since the default behavior is to deny authorization requests, rules only specify that a request be allowed; there are no negative rules telling what authorizations to deny.
The value(s) in the two attributes are of the same form as the output of the replacement pattern of a authz-regexp directive: either a DN or an LDAP URL. For example, if a authzTo value is a DN, that DN is one the authenticated user can authorize to. On the other hand, if the authzTo value is an LDAP URL, the URL is used as an internal search of the LDAP database, and the authenticated user can become ANY DN returned by the search. If an LDAP entry looked like:
dn: cn=WebUpdate,dc=example,dc=com
authzTo: ldap:///dc=example,dc=com??sub?(objectclass=person)
then any user who authenticated as cn=WebUpdate,dc=example,dc=com could authorize to any other LDAP entry under the search base dc=example,dc=com which has an objectClass of Person.
-
+
An LDAP URL in a authzTo or authzFrom attribute will return a set of DNs. Each DN returned will be checked. Searches which return a large set can cause the authorization process to take an uncomfortably long time. Also, searches should be performed on attributes that have been indexed by slapd.
To help produce more sweeping rules for authzFrom and authzTo, the values of these attributes are allowed to be DNs with regular expression characters in them. This means a source rule like
- authzTo: uid=[^,]*,dc=example,dc=com
+ authzTo: dn.regex=^uid=[^,]*,dc=example,dc=com$
would allow that authenticated user to authorize to any DN that matches the regular expression pattern given. This regular expression comparison can be evaluated much faster than an LDAP search for (uid=*).
-Also note that the values in an authorization rule must be one of the two forms: an LDAP URL or a DN (with or without regular expression characters). Anything that does not begin with "ldap://" is taken as a DN. It is not permissable to enter another authorization identity of the form "u:<username>" as an authorization rule.
-
+Also note that the values in an authorization rule must be one of the two forms: an LDAP URL or a DN (with or without regular expression characters). Anything that does not begin with "ldap://" is taken as a DN. It is not permissible to enter another authorization identity of the form "u:<username>" as an authorization rule.
+
The decision of which type of rules to use, authzFrom or authzTo, will depend on the site's situation. For example, if the set of people who may become a given identity can easily be written as a search filter, then a single destination rule could be written. If the set of people is not easily defined by a search filter, and the set of people is small, it may be better to write a source rule in the entries of each of those people who should be allowed to perform the proxy authorization.
-By default, processing of proxy authorization rules is disabled. The authz-policy directive must be set in the slapd.conf(5) file to enable authorization. This directive can be set to none for no rules (the default), from for source rules, to for destination rules, or both for both source and destination rules.
-Destination rules are extremely powerful. If ordinary users have access to write the authzTo attribute in their own entries, then they can write rules that would allow them to authorize as anyone else. As such, when using destination rules, the authzTo attribute should be protected with an ACL that only allows privileged users to set its values.
+By default, processing of proxy authorization rules is disabled. The authz-policy directive must be set in the slapd.conf(5) file to enable authorization. This directive can be set to none for no rules (the default), to for source rules, from for destination rules, or both for both source and destination rules.
+Source rules are extremely powerful. If ordinary users have access to write the authzTo attribute in their own entries, then they can write rules that would allow them to authorize as anyone else. As such, when using source rules, the authzTo attribute should be protected with an ACL that only allows privileged users to set its values.
-
-OpenLDAP clients and servers are capable of using the Transport Layer Security (TLS) framework to provide integrity and confidentiality protections and to support LDAP authentication using the SASL EXTERNAL mechanism.
-
-TLS uses X.509 certificates to carry client and server identities. All servers are required to have valid certificates, whereas client certificates are optional. Clients must have a valid certificate in order to authenticate via SASL EXTERNAL. For more information on creating and managing certificates, see the OpenSSL documentation.
-
-The DN of a server certificate must use the CN attribute to name the server, and the CN must carry the server's fully qualified domain name. Additional alias names and wildcards may be present in the subjectAltName certificate extension. More details on server certificate names are in RFC2830.
-
-The DN of a client certificate can be used directly as an authentication DN. Since X.509 is a part of the X.500 standard and LDAP is also based on X.500, both use the same DN formats and generally the DN in a user's X.509 certificate should be identical to the DN of their LDAP entry. However, sometimes the DNs may not be exactly the same, and so the mapping facility described in Mapping Authentication identities to LDAP entries can be applied to these DNs as well.
-
-After obtaining the required certificates, a number of options must be configured on both the client and the server to enable TLS and make use of the certificates. At a minimum, the clients must be configured with the filename containing all of the Certificate Authority (CA) certificates it will trust. The server must be configured with the CA certificates and also its own server certificate and private key.
+
+OpenLDAP clients and servers are capable of using the Transport Layer Security (TLS) framework to provide integrity and confidentiality protections and to support LDAP authentication using the SASL EXTERNAL mechanism. TLS is defined in RFC4346.
+
+Note: For generating certifcates, please reference http://www.openldap.org/faq/data/cache/185.html
+
+
+TLS uses X.509 certificates to carry client and server identities. All servers are required to have valid certificates, whereas client certificates are optional. Clients must have a valid certificate in order to authenticate via SASL EXTERNAL. For more information on creating and managing certificates, see the OpenSSL documentation.
+
+The DN of a server certificate must use the CN attribute to name the server, and the CN must carry the server's fully qualified domain name. Additional alias names and wildcards may be present in the subjectAltName certificate extension. More details on server certificate names are in RFC4513.
+
+The DN of a client certificate can be used directly as an authentication DN. Since X.509 is a part of the X.500 standard and LDAP is also based on X.500, both use the same DN formats and generally the DN in a user's X.509 certificate should be identical to the DN of their LDAP entry. However, sometimes the DNs may not be exactly the same, and so the mapping facility described in Mapping Authentication Identities can be applied to these DNs as well.
+
+After obtaining the required certificates, a number of options must be configured on both the client and the server to enable TLS and make use of the certificates. At a minimum, the clients must be configured with the name of the file containing all of the Certificate Authority (CA) certificates it will trust. The server must be configured with the CA certificates and also its own server certificate and private key.
Typically a single CA will have issued the server certificate and all of the trusted client certificates, so the server only needs to trust that one signing CA. However, a client may wish to connect to a variety of secure servers managed by different organizations, with server certificates generated by many different CAs. As such, a client is likely to need a list of many different trusted CAs in its configuration.
-
+
The configuration directives for slapd belong in the global directives section of slapd.conf(5).
-
+
This directive specifies the PEM-format file containing certificates for the CA's that slapd will trust. The certificate for the CA that signed the server certificate must be included among these certificates. If the signing CA was not a top-level (root) CA, certificates for the entire sequence of CA's from the signing CA to the top-level CA should be present. Multiple certificates are simply appended to the file; the order is not significant.
-
+
This directive specifies the path of a directory that contains individual CA certificates in separate files. In addition, this directory must be specially managed using the OpenSSL c_rehash utility. When using this feature, the OpenSSL library will attempt to locate certificate files based on a hash of their name and serial number. The c_rehash utility is used to generate symbolic links with the hashed names that point to the actual certificate files. As such, this option can only be used with a filesystem that actually supports symbolic links. In general, it is simpler to use the TLSCACertificateFile directive instead.
-
+
This directive specifies the file that contains the slapd server certificate. Certificates are generally public information and require no special protection.
-
+
This directive specifies the file that contains the private key that matches the certificate stored in the TLSCertificateFile file. Private keys themselves are sensitive data and are usually password encrypted for protection. However, the current implementation doesn't support encrypted keys so the key must not be encrypted and the file itself must be protected carefully.
-
+
This directive configures what ciphers will be accepted and the preference order. <cipher-suite-spec> should be a cipher specification for OpenSSL. You can use the command
openssl ciphers -v ALL
to obtain a verbose list of available cipher specifications. Besides the individual cipher names, the specifiers HIGH, MEDIUM, LOW, EXPORT, and EXPORT40 may be helpful, along with TLSv1, SSLv3, and SSLv2.
-
-This directive specifies the file to obtain random bits from when /dev/urandom is not available. If the system provides /dev/urandom then this option is not needed, otherwise a source of random data must be configured. Some systems (e.g. Linux) provide /dev/urandom by default, while others (e.g. Solaris) require the installation of a patch to provide it, and others may not support it at all. In the latter case, EGD or PRNGD should be installed, and this directive should specify the name of the EGD/PRNGD socket. The environment variable RANDFILE can also be used to specify the filename. Also, in the absence of these options, the .rnd file in the slapd user's home directory may be used if it exists. To use the .rnd file, just create the file and copy a few hundred bytes of arbitrary data into the file. The file is only used to provide a seed for the pseudo-random number generator, and it doesn't need very much data to work.
-
+
+This directive specifies the file to obtain random bits from when /dev/urandom is not available. If the system provides /dev/urandom then this option is not needed, otherwise a source of random data must be configured. Some systems (e.g. Linux) provide /dev/urandom by default, while others (e.g. Solaris) require the installation of a patch to provide it, and others may not support it at all. In the latter case, EGD or PRNGD should be installed, and this directive should specify the name of the EGD/PRNGD socket. The environment variable RANDFILE can also be used to specify the filename. Also, in the absence of these options, the .rnd file in the slapd user's home directory may be used if it exists. To use the .rnd file, just create the file and copy a few hundred bytes of arbitrary data into the file. The file is only used to provide a seed for the pseudo-random number generator, and it doesn't need very much data to work.
+
+This directive specifies the file that contains parameters for Diffie-Hellman ephemeral key exchange. This is required in order to use a DSA certificate on the server side (i.e. TLSCertificateKeyFile points to a DSA key). Multiple sets of parameters can be included in the file; all of them will be processed. Parameters can be generated using the following command
+
+ openssl dhparam [-dsaparam] -out <filename> <numbits>
+
+
This directive specifies what checks to perform on client certificates in an incoming TLS session, if any. This option is set to never by default, in which case the server never asks the client for a certificate. With a setting of allow the server will ask for a client certificate; if none is provided the session proceeds normally. If a certificate is provided but the server is unable to verify it, the certificate is ignored and the session proceeds normally, as if no certificate had been provided. With a setting of try the certificate is requested, and if none is provided, the session proceeds normally. If a certificate is provided and it cannot be verified, the session is immediately terminated. With a setting of demand the certificate is requested and a valid certificate must be provided, otherwise the session is immediately terminated.
Note: The server must request a client certificate in order to use the SASL EXTERNAL authentication mechanism with a TLS session. As such, a non-default TLSVerifyClient setting must be configured before SASL EXTERNAL authentication may be attempted, and the SASL EXTERNAL mechanism will only be offered to the client if a valid client certificate was received.
-
+
Most of the client configuration directives parallel the server directives. The names of the directives are different, and they go into ldap.conf(5) instead of slapd.conf(5), but their functionality is mostly the same. Also, while most of these options may be configured on a system-wide basis, they may all be overridden by individual users in their .ldaprc files.
-The LDAP Start TLS operation is used in LDAP to initiate TLS negotatation. All OpenLDAP command line tools support a -Z and -ZZ flag to indicate whether a Start TLS operation is to be issued. The latter flag indicates that the tool is to cease processing if TLS cannot be started while the former allows the command to continue.
-In LDAPv2 environments, TLS is normally started using the LDAP Secure URI scheme (ldaps://) instead of the normal LDAP URI scheme (ldap://). OpenLDAP command line tools allow either scheme to used with the -U flag and with the URI ldap.conf(5) option.
-
+The LDAP Start TLS operation is used in LDAP to initiate TLS negotiation. All OpenLDAP command line tools support a -Z and -ZZ flag to indicate whether a Start TLS operation is to be issued. The latter flag indicates that the tool is to cease processing if TLS cannot be started while the former allows the command to continue.
+In LDAPv2 environments, TLS is normally started using the LDAP Secure URI scheme (ldaps://) instead of the normal LDAP URI scheme (ldap://). OpenLDAP command line tools allow either scheme to used with the -H flag and with the URI ldap.conf(5) option.
+
This is equivalent to the server's TLSCACertificateFile option. As noted in the TLS Configuration section, a client typically may need to know about more CAs than a server, but otherwise the same considerations apply.
-
+
This is equivalent to the server's TLSCACertificatePath option. The specified directory must be managed with the OpenSSL c_rehash utility as well.
-
+
This directive specifies the file that contains the client certificate. This is a user-only directive and can only be specified in a user's .ldaprc file.
-
+
This directive specifies the file that contains the private key that matches the certificate stored in the TLS_CERT file. The same constraints mentioned for TLSCertificateKeyFile apply here. This is also a user-only directive.
-
+
This directive is the same as the server's TLSRandFile option.
-
+
This directive is equivalent to the server's TLSVerifyClient option. However, for clients the default value is demand and there generally is no good reason to change this setting.
-
+
For many sites, running one or more slapd(8) that hold an entire subtree of data is sufficient. But often it is desirable to have one slapd refer to other directory services for a certain part of the tree (which may or may not be running slapd).
slapd supports subordinate and superior knowledge information. Subordinate knowledge information is held in referral objects (RFC3296).
-
+
Subordinate knowledge information may be provided to delegate a subtree. Subordinate knowledge information is maintained in the directory as a special referral object at the delegate point. The referral object acts as a delegation point, gluing two services together. This mechanism allows for hierarchical directory services to be constructed.
A referral object has a structural object class of referral and has the same Distinguished Name as the delegated subtree. Generally, the referral object will also provide the auxiliary object class extensibleObject. This allows the entry to contain appropriate Relative Distinguished Name values. This is best demonstrated by example.
If the server a.example.net holds dc=example,dc=net and wished to delegate the subtree ou=subtree,dc=example,dc=net to another server b.example.net, the following named referral object would be added to a.example.net:
@@ -4024,8 +5000,8 @@ object identifier
ref: ldap://b.example.net/dc=subtree,dc=example,dc=net
The server uses this information to generate referrals and search continuations to subordinate servers.
-For those familiar with X.500, a named referral object is similar to an X.500 knowledge reference held in a subr DSE.
-
+For those familiar with X.500, a named referral object is similar to an X.500 knowledge reference held in a subr DSE.
+
Superior knowledge information may be specified using the referral directive. The value is a list of URIs referring to superior directory services. For servers without immediate superiors, such as for a.example.net in the example above, the server can be configured to use a directory service with global knowledge, such as the OpenLDAP Root Service (http://www.openldap.org/faq/index.cgi?file=393).
referral ldap://root.openldap.org/
@@ -4035,8 +5011,8 @@ object identifier
referral ldap://a.example.net/
The server uses this information to generate referrals for operations acting upon entries not within or subordinate to any of the naming contexts held by the server.
-For those familiar with X.500, this use of the ref attribute is similar to an X.500 knowledge reference held in a Supr DSE.
-
+For those familiar with X.500, this use of the ref attribute is similar to an X.500 knowledge reference held in a Supr DSE.
+
Adding, modifying, and deleting referral objects is generally done using ldapmodify(1) or similar tools which support the ManageDsaIT control. The ManageDsaIT control informs the server that you intend to manage the referral object as a regular entry. This keeps the server from sending a referral result for requests which interrogate or update referral objects.
The ManageDsaIT control should not be specified when managing regular entries.
The -M option of ldapmodify(1) (and other tools) enables ManageDsaIT. For example:
@@ -4050,196 +5026,120 @@ object identifier
Note: the ref attribute is operational and must be explicitly requested when desired in search results.
+
+Note: the use of referrals to construct a Distributed Directory Service is extremely clumsy and not well supported by common clients. If an existing installation has already been built using referrals, the use of the chain overlay to hide the referrals will greatly improve the usability of the Directory system. A better approach would be to use explicitly defined local and proxy databases in subordinate configurations to provide a seamless view of the Distributed Directory.
+
-
-In certain configurations, a single slapd(8) instance may be insufficient to handle the number of clients requiring directory service via LDAP. It may become necessary to run more than one slapd instance. At many sites, for instance, there are multiple slapd servers: one master and one or more slaves. DNS can be setup such that a lookup of ldap.example.com returns the IP addresses of these servers, distributing the load among them (or just the slaves). This master/slave arrangement provides a simple and effective way to increase capacity, availability and reliability.
-slurpd(8) provides the capability for a master slapd to propagate changes to slave slapd instances, implementing the master/slave replication scheme described above. slurpd runs on the same host as the master slapd instance.
-
-slurpd(8) provides replication services "in band". That is, it uses the LDAP protocol to update a slave database from the master. Perhaps the easiest way to illustrate this is with an example. In this example, we trace the propagation of an LDAP modify operation from its initiation by the LDAP client to its distribution to the slave slapd instance.
-Sample replication scenario:
-
-- The LDAP client submits an LDAP modify operation to the slave slapd.
-
- The slave slapd returns a referral to the LDAP client referring the client to the master slapd.
-
- The LDAP client submits the LDAP modify operation to the master slapd.
-
- The master slapd performs the modify operation, writes out the change to its replication log file and returns a success code to the client.
-
- The slurpd process notices that a new entry has been appended to the replication log file, reads the replication log entry, and sends the change to the slave slapd via LDAP.
-
- The slave slapd performs the modify operation and returns a success code to the slurpd process.
-
-Note: ldapmodify(1) and other clients distributed as part of OpenLDAP Software do not support automatic referral chasing (for security reasons).
-
-
-When slapd is configured to generate a replication logfile, it writes out a file containing LDIF change records. The replication log gives the replication site(s), a timestamp, the DN of the entry being modified, and a series of lines which specify the changes to make. In the example below, Barbara (uid=bjensen) has replaced the description value. The change is to be propagated to the slapd instance running on slave.example.net Changes to various operational attributes, such as modifiersName and modifyTimestamp, are included in the change record and will be propagated to the slave slapd.
+
+Replicated directories are a fundamental requirement for delivering a resilient enterprise deployment.
+OpenLDAP has various configuration options for creating a replicated directory. The following sections will discuss these.
+
+
+
+Slurpd replication has been deprecated in favor of Syncrepl replication and has been completely removed from OpenLDAP 2.4.
+Why was it replaced?
+The slurpd daemon was the original replication mechanism inherited from UMich's LDAP and operates in push mode: the master pushes changes to the slaves. It has been replaced for many reasons, in brief:
+
+- It is not reliable
+
- It is extremely sensitive to the ordering of records in the replog
+
- It can easily go out of sync, at which point manual intervention is required to resync the slave database with the master directory
+
- It isn't very tolerant of unavailable servers. If a slave goes down for a long time, the replog may grow to a size that's too large for slurpd to process
+What was it replaced with?
+Syncrepl
+Why is Syncrepl better?
+
+- Syncrepl is self-synchronizing; you can start with a database in any state from totally empty to fully synced and it will automatically do the right thing to achieve and maintain synchronization
+
- Syncrepl can operate in either direction
+
- Data updates can be minimal or maximal
+How do I implement a pushed based replication system using Syncrepl?
+The easiest way is to point an LDAP backend (Backends and slapd-ldap(8)) to your slave directory and setup Syncrepl to point to your Master database.
+REFERENCE test045/048 for better explanation of above.
+If you imagine Syncrepl pulling down changes from the Master server, and then pushing those changes out to your slave servers via slapd-ldap(8). This is called proxy mode (elaborate/confirm?).
+DIAGRAM HERE
+BETTER EXAMPLE here from test045/048 for different push/multiproxy examples.
+Here's an example:
- replica: slave.example.com:389
- time: 809618633
- dn: uid=bjensen,dc=example,dc=com
- changetype: modify
- replace: multiLineDescription
- description: A dreamer...
- -
- replace: modifiersName
- modifiersName: uid=bjensen,dc=example,dc=com
- -
- replace: modifyTimestamp
- modifyTimestamp: 20000805073308Z
- -
-
-The modifications to modifiersName and modifyTimestamp operational attributes were added by the master slapd.
-
-This section details commonly used slurpd(8) command-line options.
-
- -d <level> | ?
-
-This option sets the slurpd debug level to <level>. When level is a `?' character, the various debugging levels are printed and slurpd exits, regardless of any other options you give it. Current debugging levels (a subset of slapd's debugging levels) are
-
-Table 13.1: Debugging Levels
-
-
-Level
- |
-
-Description
- |
-
-
-
-4
- |
-
-heavy trace debugging
- |
-
-
-
-64
- |
-
-configuration file processing
- |
-
-
-
-65535
- |
-
-enable all debugging
- |
-
-
+ include ./schema/core.schema
+ include ./schema/cosine.schema
+ include ./schema/inetorgperson.schema
+ include ./schema/openldap.schema
+ include ./schema/nis.schema
-Debugging levels are additive. That is, if you want heavy trace debugging and want to watch the config file being processed, you would set level to the sum of those two levels (in this case, 68).
-
- -f <filename>
+ pidfile /home/ghenry/openldap/ldap/tests/testrun/slapd.3.pid
+ argsfile /home/ghenry/openldap/ldap/tests/testrun/slapd.3.args
+
+ modulepath ../servers/slapd/back-bdb/
+ moduleload back_bdb.la
+ modulepath ../servers/slapd/back-monitor/
+ moduleload back_monitor.la
+ modulepath ../servers/slapd/overlays/
+ moduleload syncprov.la
+ modulepath ../servers/slapd/back-ldap/
+ moduleload back_ldap.la
+
+ # We don't need any access to this DSA
+ restrict all
+
+ #######################################################################
+ # consumer proxy database definitions
+ #######################################################################
+
+ database ldap
+ suffix "dc=example,dc=com"
+ rootdn "cn=Whoever"
+ uri ldap://localhost:9012/
+
+ lastmod on
+
+ # HACK: use the RootDN of the monitor database as UpdateDN so ACLs apply
+ # without the need to write the UpdateDN before starting replication
+ acl-bind bindmethod=simple
+ binddn="cn=Monitor"
+ credentials=monitor
+
+ # HACK: use the RootDN of the monitor database as UpdateDN so ACLs apply
+ # without the need to write the UpdateDN before starting replication
+ syncrepl rid=1
+ provider=ldap://localhost:9011/
+ binddn="cn=Manager,dc=example,dc=com"
+ bindmethod=simple
+ credentials=secret
+ searchbase="dc=example,dc=com"
+ filter="(objectClass=*)"
+ attrs="*,structuralObjectClass,entryUUID,entryCSN,creatorsName,createTimestamp,modifiersName,modifyTimestamp"
+ schemachecking=off
+ scope=sub
+ type=refreshAndPersist
+ retry="5 5 300 5"
+
+ overlay syncprov
+
+ database monitor
-This option specifies an alternate slapd configuration file. Slurpd does not have its own configuration file. Instead, all configuration information is read from the slapd configuration file.
-
- -r <filename>
-
-This option specifies an alternate slapd replication log file. Under normal circumstances, slurpd reads the name of the slapd replication log file from the slapd configuration file. However, you can override this with the -r flag, to cause slurpd to process a different replication log file. See the Advanced slurpd Operation section for a discussion of how you might use this option.
-
- -o
-
-Operate in "one-shot" mode. Under normal circumstances, when slurpd finishes processing a replication log, it remains active and periodically checks to see if new entries have been added to the replication log. In one-shot mode, by comparison, slurpd processes a replication log and exits immediately. If the -o option is given, the replication log file must be explicitly specified with the -r option. See the One-shot mode and reject files section for a discussion of this mode.
-
- -t <directory>
-
-Specify an alternate directory for slurpd's temporary copies of replication logs. The default location is /usr/tmp.
-
-To bring up a replica slapd instance, you must configure the master and slave slapd instances for replication, then shut down the master slapd so you can copy the database. Finally, you bring up the master slapd instance, the slave slapd instance, and the slurpd instance. These steps are detailed in the following sections. You can set up as many slave slapd instances as you wish.
-
-The following section assumes you have a properly working slapd(8) instance. To configure your working slapd(8) server as a replication master, you need to make the following changes to your slapd.conf(5).
-
-- Add a replica directive for each replica. The binddn= parameter should match the updatedn option in the corresponding slave slapd configuration file, and should name an entry with write permission to the slave database (e.g., an entry allowed access via access directives in the slave slapd configuration file). This DN generally should not be the same as the master's rootdn.
-
- Add a replogfile directive, which tells slapd where to log changes. This file will be read by slurpd.
-
-Install the slapd software on the host which is to be the slave slapd server. The configuration of the slave server should be identical to that of the master, with the following exceptions:
-
-- Do not include a replica directive. While it is possible to create "chains" of replicas, in most cases this is inappropriate.
-
- Do not include a replogfile directive.
-
- Do include an updatedn line. The DN given should match the DN given in the binddn= parameter of the corresponding replica= directive in the master slapd config file. The updatedn generally should not be the same as the rootdn of the master database.
-
- Make sure the DN given in the updatedn directive has permission to write the database (e.g., it is is allowed access by one or more access directives).
-
- Use the updateref directive to define the URL the slave should return if an update request is received.
-
-In order to ensure that the slave starts with an exact copy of the master's data, you must shut down the master slapd. Do this by sending the master slapd process an interrupt signal with kill -INT <pid>, where <pid> is the process-id of the master slapd process.
-If you like, you may restart the master slapd in read-only mode while you are replicating the database. During this time, the master slapd will return an "unwilling to perform" error to clients that attempt to modify data.
-
-Copy the master's database(s) to the slave. For an BDB and LDBM databases, you must copy all database files located in the database directory specified in slapd.conf(5). In general, you should copy each file found in the database directory unless you know it is not used by slapd(8).
-
-Note: This copy process assumes homogeneous servers with identically configured OpenLDAP installations. Alternatively, you may use slapcat to output the master's database in LDIF format and use the LDIF with slapadd to populate the slave. Using LDIF avoids any potential incompatibilities due to differing server architectures or software configurations. See the Database Creation and Maintenance Tools chapter for details on these tools.
-
-
-To configure slapd to generate a replication logfile, you add a " replica" configuration option to the master slapd's config file. For example, if we wish to propagate changes to the slapd instance running on host slave.example.com:
-
- replica uri=ldap://slave.example.com:389
- binddn="cn=Replicator,dc=example,dc=com"
- bindmethod=simple credentials=secret
-
-In this example, changes will be sent to port 389 (the standard LDAP port) on host slave.example.com. The slurpd process will bind to the slave slapd as "cn=Replicator,dc=example,dc=com" using simple authentication with password "secret".
-If we wish to perform the same replication using ldaps on port 636:
-
- replica uri=ldaps://slave.example.com:636
- binddn="cn=Replicator,dc=example,dc=com"
- bindmethod=simple credentials=secret
-
-The host option is deprecated in favor of uri, but the following replica configuration is still supported:
-
- replica host=slave.example.com:389
- binddn="cn=Replicator,dc=example,dc=com"
- bindmethod=simple credentials=secret
-
-Note that the DN given by the binddn= directive must exist in the slave slapd's database (or be the rootdn specified in the slapd config file) in order for the bind operation to succeed. The DN should also be listed as the updatedn for the database in the slave's slapd.conf(5). It is generally recommended that this DN be different than the rootdn of the master database.
-
-Note: The use of strong authentication and transport security is highly recommended.
-
-
-Restart the master slapd process. To check that it is generating replication logs, perform a modification of any entry in the database, and check that data has been written to the log file.
-
-Start the slurpd process. Slurpd should immediately send the test modification you made to the slave slapd. Watch the slave slapd's logfile to be sure that the modification was sent.
-
- slurpd -f <masterslapdconfigfile>
-
-
-
-When slurpd propagates a change to a slave slapd and receives an error return code, it writes the reason for the error and the replication record to a reject file. The reject file is located in the same directory as the per-replica replication logfile, and has the same name, but with the string ".rej" appended. For example, for a replica running on host slave.example.com, port 389, the reject file, if it exists, will be named
-
- /usr/local/var/openldap/replog.slave.example.com:389.rej
-
-A sample rejection log entry follows:
-
- ERROR: No such attribute
- replica: slave.example.com:389
- time: 809618633
- dn: uid=bjensen,dc=example,dc=com
- changetype: modify
- replace: description
- description: A dreamer...
- -
- replace: modifiersName
- modifiersName: uid=bjensen,dc=example,dc=com
- -
- replace: modifyTimestamp
- modifyTimestamp: 20000805073308Z
- -
-
-Note that this is precisely the same format as the original replication log entry, but with an ERROR line prepended to the entry.
-
-It is possible to use slurpd to process a rejection log with its "one-shot mode." In normal operation, slurpd watches for more replication records to be appended to the replication log file. In one-shot mode, by contrast, slurpd processes a single log file and exits. Slurpd ignores ERROR lines at the beginning of replication log entries, so it's not necessary to edit them out before feeding it the rejection log.
-To use one-shot mode, specify the name of the rejection log on the command line as the argument to the -r flag, and specify one-shot mode with the -o flag. For example, to process the rejection log file /usr/local/var/openldap/replog.slave.example.com:389 and exit, use the command
-
- slurpd -r /usr/tmp/replog.slave.example.com:389 -o
-
-
-
-
-The LDAP Sync replication engine, syncrepl for short, is a consumer-side replication engine that enables the consumer LDAP server to maintain a shadow copy of a DIT fragment. A syncrepl engine resides at the consumer-side as one of the slapd (8) threads. It creates and maintains a consumer replica by connecting to the replication provider to perform the initial DIT content load followed either by periodic content polling or by timely updates upon content changes.
+DETAILED EXPLANATION OF ABOVE LIKE IN OTHER SECTIONS (line numbers?)
+ANOTHER DIAGRAM HERE
+As you can see, you can let your imagination go wild using Syncrepl and slapd-ldap(8) tailoring your replication to fit your specific network topology.
+
+
+
+
+
+
+
+http://www.connexitor.com/blog/pivot/entry.php?id=105#body http://www.openldap.org/lists/openldap-software/200702/msg00006.html http://www.openldap.org/lists/openldap-software/200602/msg00064.html
+
+MirrorMode is a hybrid configuration that provides all of the consistency guarantees of single-master replication, while also providing the high availability of multi-master. In MirrorMode two masters are set up to replicate from each other (as a multi-master configuration) but an external frontend is employed to direct all writes to only one of the two servers. The second master will only be used for writes if the first master crashes, at which point the frontend will switch to directing all writes to the second master. When a crashed master is repaired and restarted it will automatically catch up to any changes on the running master and resync.
+This is discussed in full in the MirrorMode section below
+
+The LDAP Sync Replication engine, syncrepl for short, is a consumer-side replication engine that enables the consumer LDAP server to maintain a shadow copy of a DIT fragment. A syncrepl engine resides at the consumer-side as one of the slapd(8) threads. It creates and maintains a consumer replica by connecting to the replication provider to perform the initial DIT content load followed either by periodic content polling or by timely updates upon content changes.
Syncrepl uses the LDAP Content Synchronization (or LDAP Sync for short) protocol as the replica synchronization protocol. It provides a stateful replication which supports both pull-based and push-based synchronization and does not mandate the use of a history store.
Syncrepl keeps track of the status of the replication content by maintaining and exchanging synchronization cookies. Because the syncrepl consumer and provider maintain their content status, the consumer can poll the provider content to perform incremental synchronization by asking for the entries required to make the consumer replica up-to-date with the provider content. Syncrepl also enables convenient management of replicas by maintaining replica status. The consumer replica can be constructed from a consumer-side or a provider-side backup at any synchronization status. Syncrepl can automatically resynchronize the consumer replica up-to-date with the current provider content.
Syncrepl supports both pull-based and push-based synchronization. In its basic refreshOnly synchronization mode, the provider uses pull-based synchronization where the consumer servers need not be tracked and no history information is maintained. The information required for the provider to process periodic polling requests is contained in the synchronization cookie of the request itself. To optimize the pull-based synchronization, syncrepl utilizes the present phase of the LDAP Sync protocol as well as its delete phase, instead of falling back on frequent full reloads. To further optimize the pull-based synchronization, the provider can maintain a per-scope session log as a history store. In its refreshAndPersist mode of synchronization, the provider uses a push-based synchronization. The provider keeps track of the consumer servers that have requested a persistent search and sends them necessary updates as the provider replication content gets modified.
With syncrepl, a consumer server can create a replica without changing the provider's configurations and without restarting the provider server, if the consumer server has appropriate access privileges for the DIT fragment to be replicated. The consumer server can stop the replication also without the need for provider-side changes and restart.
Syncrepl supports both partial and sparse replications. The shadow DIT fragment is defined by a general search criteria consisting of base, scope, filter, and attribute list. The replica content is also subject to the access privileges of the bind identity of the syncrepl replication connection.
-
-The LDAP Sync protocol allows a client to maintain a synchronized copy of a DIT fragment. The LDAP Sync operation is defined as a set of controls and other protocol elements which extend the LDAP search operation. This section introduces the LDAP Content Sync protocol only briefly. For more information, refer to the Internet Draft The LDAP Content Synchronization Operation <draft-zeilenga-ldup-sync-05.txt>.
+
+The LDAP Sync protocol allows a client to maintain a synchronized copy of a DIT fragment. The LDAP Sync operation is defined as a set of controls and other protocol elements which extend the LDAP search operation. This section introduces the LDAP Content Sync protocol only briefly. For more information, refer to RFC4533.
The LDAP Sync protocol supports both polling and listening for changes by defining two respective synchronization operations: refreshOnly and refreshAndPersist. Polling is implemented by the refreshOnly operation. The client copy is synchronized to the server copy at the time of polling. The server finishes the search operation by returning SearchResultDone at the end of the search operation as in the normal search. The listening is implemented by the refreshAndPersist operation. Instead of finishing the search after returning all entries currently matching the search criteria, the synchronization search remains persistent in the server. Subsequent updates to the synchronization content in the server cause additional entry updates to be sent to the client.
The refreshOnly operation and the refresh stage of the refreshAndPersist operation can be performed with a present phase or a delete phase.
In the present phase, the server sends the client the entries updated within the search scope since the last synchronization. The server sends all requested attributes, be it changed or not, of the updated entries. For each unchanged entry which remains in the scope, the server sends a present message consisting only of the name of the entry and the synchronization control representing state present. The present message does not contain any attributes of the entry. After the client receives all update and present entries, it can reliably determine the new client copy by adding the entries added to the server, by replacing the entries modified at the server, and by deleting entries in the client copy which have not been updated nor specified as being present at the server.
@@ -4248,11 +5148,11 @@ enable all debugging
At the end of the refreshOnly synchronization, the server sends a synchronization cookie to the client as a state indicator of the client copy after the synchronization is completed. The client will present the received cookie when it requests the next incremental synchronization to the server.
When refreshAndPersist synchronization is used, the server sends a synchronization cookie at the end of the refresh stage by sending a Sync Info message with TRUE refreshDone. It also sends a synchronization cookie by attaching it to SearchResultEntry generated in the persist stage of the synchronization search. During the persist stage, the server can also send a Sync Info message containing the synchronization cookie at any time the server wants to update the client-side state indicator. The server also updates a synchronization indicator of the client at the end of the persist stage.
In the LDAP Sync protocol, entries are uniquely identified by the entryUUID attribute value. It can function as a reliable identifier of the entry. The DN of the entry, on the other hand, can be changed over time and hence cannot be considered as the reliable identifier. The entryUUID is attached to each SearchResultEntry or SearchResultReference as a part of the synchronization control.
-
-The syncrepl engine utilizes both the refreshOnly and the refreshAndPersist operations of the LDAP Sync protocol. If a syncrepl specification is included in a database definition, slapd (8) launches a syncrepl engine as a slapd (8) thread and schedules its execution. If the refreshOnly operation is specified, the syncrepl engine will be rescheduled at the interval time after a synchronization operation is completed. If the refreshAndPersist operation is specified, the engine will remain active and process the persistent synchronization messages from the provider.
+
+The syncrepl engine utilizes both the refreshOnly and the refreshAndPersist operations of the LDAP Sync protocol. If a syncrepl specification is included in a database definition, slapd(8) launches a syncrepl engine as a slapd(8) thread and schedules its execution. If the refreshOnly operation is specified, the syncrepl engine will be rescheduled at the interval time after a synchronization operation is completed. If the refreshAndPersist operation is specified, the engine will remain active and process the persistent synchronization messages from the provider.
The syncrepl engine utilizes both the present phase and the delete phase of the refresh synchronization. It is possible to configure a per-scope session log in the provider server which stores the entryUUIDs of a finite number of entries deleted from a replication content. Multiple replicas of single provider content share the same per-scope session log. The syncrepl engine uses the delete phase if the session log is present and the state of the consumer server is recent enough that no session log entries are truncated after the last synchronization of the client. The syncrepl engine uses the present phase if no session log is configured for the replication content or if the consumer replica is too outdated to be covered by the session log. The current design of the session log store is memory based, so the information contained in the session log is not persistent over multiple provider invocations. It is not currently supported to access the session log store by using LDAP operations. It is also not currently supported to impose access control to the session log.
As a further optimization, even in the case the synchronization search is not associated with any session log, no entries will be transmitted to the consumer server when there has been no update in the replication context.
-The syncrepl engine, which is a consumer-side replication engine, can work with any backends. The LDAP Sync provider can be configured as an overlay on any backend, but works best with the back-bdb or back-hdb backend. The provider can not support refreshAndPersist mode on back-ldbm due to limits in that backend's locking architecture.
+The syncrepl engine, which is a consumer-side replication engine, can work with any backends. The LDAP Sync provider can be configured as an overlay on any backend, but works best with the back-bdb or back-hdb backend.
The LDAP Sync provider maintains a contextCSN for each database as the current synchronization state indicator of the provider content. It is the largest entryCSN in the provider context such that no transactions for an entry having smaller entryCSN value remains outstanding. The contextCSN could not just be set to the largest issued entryCSN because entryCSN is obtained before a transaction starts and transactions are not committed in the issue order.
The provider stores the contextCSN of a context in the contextCSN attribute of the context suffix entry. The attribute is not written to the database after every update operation though; instead it is maintained primarily in memory. At database start time the provider reads the last saved contextCSN into memory and uses the in-memory copy exclusively thereafter. By default, changes to the contextCSN as a result of database updates will not be written to the database until the server is cleanly shut down. A checkpoint facility exists to cause the contextCSN to be written out more frequently if desired.
Note that at startup time, if the provider is unable to read a contextCSN from the suffix entry, it will scan the entire database to determine the value, and this scan may take quite a long time on a large database. When a contextCSN value is read, the database will still be scanned for any entryCSN values greater than it, to make sure the contextCSN value truly reflects the greatest committed entryCSN in the database. On databases which support inequality indexing, setting an eq index on the entryCSN attribute and configuring contextCSN checkpoints will greatly speed up this scanning step.
@@ -4260,12 +5160,12 @@ enable all debugging
The consumer also stores its replica state, which is the provider's contextCSN received as a synchronization cookie, in the contextCSN attribute of the suffix entry. The replica state maintained by a consumer server is used as the synchronization state indicator when it performs subsequent incremental synchronization with the provider server. It is also used as a provider-side synchronization state indicator when it functions as a secondary provider server in a cascading replication configuration. Since the consumer and provider state information are maintained in the same location within their respective databases, any consumer can be promoted to a provider (and vice versa) without any special actions.
Because a general search filter can be used in the syncrepl specification, some entries in the context may be omitted from the synchronization content. The syncrepl engine creates a glue entry to fill in the holes in the replica context if any part of the replica content is subordinate to the holes. The glue entries will not be returned in the search result unless ManageDsaIT control is provided.
Also as a consequence of the search filter used in the syncrepl specification, it is possible for a modification to remove an entry from the replication scope even though the entry has not been deleted on the provider. Logically the entry must be deleted on the consumer but in refreshOnly mode the provider cannot detect and propagate this change without the use of the session log.
-
-Because syncrepl is a consumer-side replication engine, the syncrepl specification is defined in slapd.conf (5) of the consumer server, not in the provider server's configuration file. The initial loading of the replica content can be performed either by starting the syncrepl engine with no synchronization cookie or by populating the consumer replica by adding an LDIF file dumped as a backup at the provider.
+
+Because syncrepl is a consumer-side replication engine, the syncrepl specification is defined in slapd.conf(5) of the consumer server, not in the provider server's configuration file. The initial loading of the replica content can be performed either by starting the syncrepl engine with no synchronization cookie or by populating the consumer replica by adding an LDIF file dumped as a backup at the provider.
When loading from a backup, it is not required to perform the initial loading from the up-to-date backup of the provider content. The syncrepl engine will automatically synchronize the initial consumer replica to the current provider content. As a result, it is not required to stop the provider server in order to avoid the replica inconsistency caused by the updates to the provider content during the content backup and loading process.
When replicating a large scale directory, especially in a bandwidth constrained environment, it is advised to load the consumer replica from a backup instead of performing a full initial load using syncrepl.
-
-The provider is implemented as an overlay, so the overlay itself must first be configured in slapd.conf (5) before it can be used. The provider has only two configuration directives, for setting checkpoints on the contextCSN and for configuring the session log. Because the LDAP Sync search is subject to access control, proper access control privileges should be set up for the replicated content.
+
+The provider is implemented as an overlay, so the overlay itself must first be configured in slapd.conf(5) before it can be used. The provider has only two configuration directives, for setting checkpoints on the contextCSN and for configuring the session log. Because the LDAP Sync search is subject to access control, proper access control privileges should be set up for the replicated content.
The contextCSN checkpoint is configured by the
syncprov-checkpoint <ops> <minutes>
@@ -4277,7 +5177,7 @@ enable all debugging
directive, where <size> is the maximum number of session log entries the session log can record. When a session log is configured, it is automatically used for all LDAP Sync searches within the database.
Note that using the session log requires searching on the entryUUID attribute. Setting an eq index on this attribute will greatly benefit the performance of the session log on the provider.
-A more complete example of the slapd.conf content is thus:
+A more complete example of the slapd.conf(5) content is thus:
database bdb
suffix dc=Example,dc=com
@@ -4289,8 +5189,8 @@ enable all debugging
syncprov-checkpoint 100 10
syncprov-sessionlog 100
-
-The syncrepl replication is specified in the database section of slapd.conf (5) for the replica context. The syncrepl engine is backend independent and the directive can be defined with any database type.
+
+The syncrepl replication is specified in the database section of slapd.conf(5) for the replica context. The syncrepl engine is backend independent and the directive can be defined with any database type.
database hdb
suffix dc=Example,dc=com
@@ -4311,80 +5211,3253 @@ enable all debugging
binddn="cn=syncuser,dc=example,dc=com"
credentials=secret
-In this example, the consumer will connect to the provider slapd at port 389 of ldap://provider.example.com to perform a polling (refreshOnly) mode of synchronization once a day. It will bind as cn=syncuser,dc=example,dc=com using simple authentication with password "secret". Note that the access control privilege of cn=syncuser,dc=example,dc=com should be set appropriately in the provider to retrieve the desired replication content. Also the search limits must be high enough on the provider to allow the syncuser to retrieve a complete copy of the requested content. The consumer uses the rootdn to write to its database so it always has full permissions to write all content.
-The synchronization search in the above example will search for the entries whose objectClass is organizationalPerson in the entire subtree rooted at dc=example,dc=com. The requested attributes are cn, sn, ou, telephoneNumber, title, and l. The schema checking is turned off, so that the consumer slapd (8) will not enforce entry schema checking when it process updates from the provider slapd (8).
+In this example, the consumer will connect to the provider slapd(8) at port 389 of ldap://provider.example.com to perform a polling (refreshOnly) mode of synchronization once a day. It will bind as cn=syncuser,dc=example,dc=com using simple authentication with password "secret". Note that the access control privilege of cn=syncuser,dc=example,dc=com should be set appropriately in the provider to retrieve the desired replication content. Also the search limits must be high enough on the provider to allow the syncuser to retrieve a complete copy of the requested content. The consumer uses the rootdn to write to its database so it always has full permissions to write all content.
+The synchronization search in the above example will search for the entries whose objectClass is organizationalPerson in the entire subtree rooted at dc=example,dc=com. The requested attributes are cn, sn, ou, telephoneNumber, title, and l. The schema checking is turned off, so that the consumer slapd(8) will not enforce entry schema checking when it process updates from the provider slapd(8).
For more detailed information on the syncrepl directive, see the syncrepl section of The slapd Configuration File chapter of this admin guide.
-
-The provider slapd (8) is not required to be restarted. contextCSN is automatically generated as needed: it might be originally contained in the LDIF file, generated by slapadd (8), generated upon changes in the context, or generated when the first LDAP Sync search arrives at the provider. If an LDIF file is being loaded which did not previously contain the contextCSN, the -w option should be used with slapadd (8) to cause it to be generated. This will allow the server to startup a little quicker the first time it runs.
-When starting a consumer slapd (8), it is possible to provide a synchronization cookie as the -c cookie command line option in order to start the synchronization from a specific state. The cookie is a comma separated list of name=value pairs. Currently supported syncrepl cookie fields are csn=<csn> and rid=<rid>. <csn> represents the current synchronization state of the consumer replica. <rid> identifies a consumer replica locally within the consumer server. It is used to relate the cookie to the syncrepl definition in slapd.conf (5) which has the matching replica identifier. The <rid> must have no more than 3 decimal digits. The command line cookie overrides the synchronization cookie stored in the consumer replica database.
-
-
-
-LDAP servers typically hold one or more subtrees of a DIT. Replica (or shadow) servers hold shadow copies of entries held by one or more master servers. Changes are propagated from the master server to replica (slave) servers using LDAP Sync or slurpd(8). An LDAP cache is a special type of replica which holds entries corresponding to search filters instead of subtrees.
-
-The proxy cache extension of slapd is designed to improve the responseiveness of the ldap and meta backends. It handles a search request (query) by first determining whether it is contained in any cached search filter. Contained requests are answered from the proxy cache's local database. Other requests are passed on to the underlying ldap or meta backend and processed as usual.
-E.g. (shoesize>=9) is contained in (shoesize>=8) and (sn=Richardson) is contained in (sn=Richards*)
-Correct matching rules and syntaxes are used while comparing assertions for query containment. To simplify the query containment problem, a list of cacheable "templates" (defined below) is specified at configuration time. A query is cached or answered only if it belongs to one of these templates. The entries corresponding to cached queries are stored in the proxy cache local database while its associated meta information (filter, scope, base, attributes) is stored in main memory.
-A template is a prototype for generating LDAP search requests. Templates are described by a prototype search filter and a list of attributes which are required in queries generated from the template. The representation for prototype filter is similar to RFC 2254, except that the assertion values are missing. Examples of prototype filters are: (sn=),(&(sn=)(givenname=)) which are instantiated by search filters (sn=Doe) and (&(sn=Doe)(givenname=John)) respectively.
-The cache replacement policy removes the least recently used (LRU) query and entries belonging to only that query. Queries are allowed a maximum time to live (TTL) in the cache thus providing weak consistency. A background task periodically checks the cache for expired queries and removes them.
-The Proxy Cache paper (http://www.openldap.org/pub/kapurva/proxycaching.pdf) provides design and implementation details.
-
-The cache configuration specific directives described below must appear after a overlay proxycache directive within a "database meta" or database ldap section of the server's slapd.conf(5) file.
-
+
+The provider slapd(8) is not required to be restarted. contextCSN is automatically generated as needed: it might be originally contained in the LDIF file, generated by slapadd (8), generated upon changes in the context, or generated when the first LDAP Sync search arrives at the provider. If an LDIF file is being loaded which did not previously contain the contextCSN, the -w option should be used with slapadd (8) to cause it to be generated. This will allow the server to startup a little quicker the first time it runs.
+When starting a consumer slapd(8), it is possible to provide a synchronization cookie as the -c cookie command line option in order to start the synchronization from a specific state. The cookie is a comma separated list of name=value pairs. Currently supported syncrepl cookie fields are csn=<csn> and rid=<rid>. <csn> represents the current synchronization state of the consumer replica. <rid> identifies a consumer replica locally within the consumer server. It is used to relate the cookie to the syncrepl definition in slapd.conf(5) which has the matching replica identifier. The <rid> must have no more than 3 decimal digits. The command line cookie overrides the synchronization cookie stored in the consumer replica database.
+
+
+
+
+- Provides a high-availability (HA) solution for directory writes (replicas handle reads)
+
- As long as one Master is operational, writes can safely be excepted
+
- Master nodes replicate from each other, so they are always up to date and can be ready to take over (hot standby)
+
- Syncrepl also allows the master nodes to re-synchronize after any downtime
+
- Delta-Syncrepl can be used
+
+
+- MirrorMode is not what is termed as a Multi-Master solution. This is because writes have to go to one of the mirror nodes at a time
+
- MirrorMode can be termed as Active-Active Hot-Standby, therefor an external server (slapd in proxy mode) or device (hardware load balancer) to manage which master is currently active
+
- While syncrepl can recover from a completely empty database, slapadd is much faster
+
- Does not provide faster or more scalable write performance (neither could any Multi-Master solution)
+
- Backups are managed slightly differently
+- If backing up the Berkeley database itself and periodically backing up the transaction log files, then the same member of the mirror pair needs to be used to collect logfiles until the next database backup is taken
+
- To ensure that both databases are consistent, each database might have to be put in read-only mode while performing a slapcat.
+
- When using slapcat, the generated LDIF files can be rather large. This can happen with a non-MirrorMode deployment also.
+
+MirrorMode configuration is actually very easy. If you have ever setup a normal slapd syncrepl provider, then the only change is the directive:
- proxyCache <DB> <maxentries> <nattrsets> <entrylimit> <period>
+ mirrormode on
-This directive enables proxy caching and sets general cache parameters. The <DB> parameter specifies which underlying database is to be used to hold cached entries. It should be set to bdb, hdb, or ldbm. The <maxentries> parameter specifies the total number of entries which may be held in the cache. The <nattrsets> parameter specifies the total number of attribute sets (as specified by the proxyAttrSet directive) that may be defined. The <entrylimit> parameter specifies the maximum number of entries in a cachable query. The <period> specifies the consistency check period (in seconds). In each period, queries with expired TTLs are removed.
-
+You also need to make you the rid of each mirror node pair is different and that the provider syncrepl directive points to the other mirror pair.
+
+This is the same as the Set up the provider slapd section, referencing delta-syncrepl replication if using delta-syncrepl.
+Here's a specific cut down example using LDAP Sync Replication in refreshAndPersist mode (delta-syncrepl can be used also):
+MirrorMode node 1:
- proxyAttrset <index> <attrs...>
-
-Used to associate a set of attributes to an index. Each attribute set is associated with an index number from 0 to <numattrsets>-1. These indices are used by the proxyTemplate directive to define cacheable templates.
-
-
- proxyTemplate <prototype_string> <attrset_index> <TTL>
-
-Specifies a cacheable template and the "time to live" (in sec) <TTL> for queries belonging to the template. A template is described by its prototype filter string and set of required attributes identified by <attrset_index>.
-
-An example slapd.conf(5) database section for a caching server which proxies for the "dc=example,dc=com" subtree held at server ldap.example.com.
-
- database ldap
- suffix "dc=example,dc=com"
- rootdn "dc=example,dc=com"
- uri ldap://ldap.example.com/dc=example%2cdc=com
- overlay proxycache
- proxycache bdb 100000 1 1000 100
- proxyAttrset 0 mail postaladdress telephonenumber
- proxyTemplate (sn=) 0 3600
- proxyTemplate (&(sn=)(givenName=)) 0 3600
- proxyTemplate (&(departmentNumber=)(secretary=*)) 0 3600
+ # syncrepl directives
+ syncrepl rid=1
+ provider=ldap://ldap-rid2.example.com
+ bindmethod=simple
+ binddn="cn=mirrormode,dc=example,dc=com"
+ credentials=mirrormode
+ searchbase="dc=example,dc=com"
+ schemachecking=on
+ type=refreshAndPersist
+ retry="60 +"
- cachesize 20
- directory ./testrun/db.2.a
- index objectClass eq
- index cn,sn,uid,mail pres,eq,sub
+ mirrormode on
-
-A LDAP search query is cacheable when its filter matches one of the templates as defined in the "proxyTemplate" statements and when it references only the attributes specified in the corresponding attribute set. In the example above the attribute set number 0 defines that only the attributes: mail postaladdress telephonenumber are cached for the following proxyTemplates.
-
+MirrorMode node 2:
- Filter: (&(sn=Richard*)(givenName=jack))
- Attrs: mail telephoneNumber
+ # syncrepl directives
+ syncrepl rid=2
+ provider=ldap://ldap-rid1.example.com
+ bindmethod=simple
+ binddn="cn=mirrormode,dc=example,dc=com"
+ credentials=mirrormode
+ searchbase="dc=example,dc=com"
+ schemachecking=on
+ type=refreshAndPersist
+ retry="60 +"
+
+ mirrormode on
-is cacheable, because it matches the template (&(sn=)(givenName=)) and its attributes are contained in proxyAttrset 0.
-
- Filter: (&(sn=Richard*)(telephoneNumber))
- Attrs: givenName
-
-is not cacheable, because the filter does not match the template, nor is the attribute givenName stored in the cache
-
- Filter: (|(sn=Richard*)(givenName=jack))
- Attrs: mail telephoneNumber
-
-is not cacheable, because the filter does not match the template ( logical OR "|" condition instead of logical AND "&" )
+It's simple really; each MirrorMode node is setup exactly the same, except that the provider directive is set to point to the other MirrorMode node.
+
+There are generally 2 choices for this; 1. Hardware proxies/load-balancing or dedicated proxy software, 2. using a Back-LDAP proxy as a syncrepl provider
+MORE HERE and a nice PICTURE
+
+This is exactly the same as the Set up the consumer slapd section. It can either setup in normal syncrepl replication mode, or in delta-syncrepl replication mode.
+
+Hopefully you will now have a directory architecture that provides all of the consistency guarantees of single-master replication, whilst also providing the high availability of multi-master replication.
-
+
+System Administration is all about maintenance, so it is only fair that we discuss how to correctly maintain an OpenLDAP deployment.
+
+Backup strategies largely depend on the amount of change in the database and how much of that change an administrator might be willing to lose in a catastrophic failure. There are two basic methods that can be used:
+1. Backup the Berkeley database itself and periodically back up the transaction log files:
+Berkeley DB produces transaction logs that can be used to reconstruct changes from a given point in time. For example, if an administrator were willing to only lose one hour's worth of changes, they could take down the server in the middle of the night, copy the Berkeley database files offsite, and bring the server back online. Then, on an hourly basis, they could force a database checkpoint, capture the log files that have been generated in the past hour, and copy them offsite. The accumulated log files, in combination with the previous database backup, could be used with db_recover to reconstruct the database up to the time the last collection of log files was copied offsite. This method affords good protection, with minimal space overhead.
+2. Periodically run slapcat and back up the LDIF file:
+Slapcat can be run while slapd is active. However, one runs the risk of an inconsistent database- not from the point of slapd, but from the point of the applications using LDAP. For example, if a provisioning application performed tasks that consisted of several LDAP operations, and the slapcat took place concurrently with those operations, then there might be inconsistencies in the LDAP database from the point of view of that provisioning application and applications that depended on it. One must, therefore, be convinced something like that won't happen. One way to do that would be to put the database in read-only mode while performing the slapcat. The other disadvantage of this approach is that the generated LDIF files can be rather large and the accumulation of the day's backups could add up to a substantial amount of space.
+You can use slapcat(8) to generate an LDIF file for each of your slapd(8) back-bdb or back-hdb databases.
+
+ slapcat -f slapd.conf -b "dc=example,dc=com"
+
+For back-bdb and back-hdb, this command may be ran while slapd(8) is running.
+MORE on actual Berkeley DB backups later covering db_recover etc.
+
+Berkeley DB log files grow, and the administrator has to deal with it. The procedure is known as log file archival or log file rotation.
+
+Note: The actual log file rotation is handled by the Berkeley DB engine.
+
+Logs of current transactions need to be stored into files so that the database can be recovered in the event of an application crash. Administrators can change the size limit of a single log file (by default 10MB), and have old log files removed automatically, by setting up DB environment (see below). The reason Berkeley DB never deletes any log files by default is that the administrator may wish to backup the log files before removal to make database recovery possible even after a catastrophic failure, such as file system corruption.
+Log file names are log.XXXXXXXXXX (X is a digit). By default the log files are located in the BDB backend directory. The db_archive tool knows what log files are used in current transactions, and what are not. Administrators can move unused log files to a backup media, and delete them. To have them removed automatically, place set_flags DB_LOG_AUTOREMOVE directive in DB_CONFIG.
+
+Note: If the log files are removed automatically, recovery after a catastrophic failure is likely to be impossible.
+
+The files with names __db.001, __db.002, etc are just shared memory regions (or whatever). These ARE NOT 'logs', they must be left alone. Don't be afraid of them, they do not grow like logs do.
+To understand the db_archive interface, the reader should refer to chapter 9 of the Berkeley DB guide. In particular, the following chapters are recommended:
+
+- Database and log file archival
+
- Log file removal
+
- Recovery procedures
+
- Hot failover
+Advanced installations can use special environment settings to fine-tune some Berkeley DB options (change the log file limit, etc). This can be done by using the DB_CONFIG file. This magic file can be created in BDB backend directory set up by slapd.conf(5). More information on this file can be found in File naming chapter. Specific directives can be found in C Interface, look for DB_ENV->set_XXXX calls.
+
+Note: options set in DB_CONFIG file override options set by OpenLDAP. Use them with extreme caution. Do not use them unless You know what You are doing.
+
+The advantages of DB_CONFIG usage can be the following:
+
+- to keep data files and log files on different mediums (i.e. disks) to improve performance and/or reliability;
+
- to fine-tune some specific options (such as shared memory region sizes);
+
- to set the log file limit (please read Log file limits before doing this).
+To figure out the best-practice BDB backup scenario, the reader is highly recommended to read the whole Chapter 9: Berkeley DB Transactional Data Store Applications. This chapter is a set of small pages with examples in C language. Non-programming people can skip this examples without loss of knowledge.
+
+MORE/TIDY
+If you put "checkpoint 1024 5" in slapd.conf (to checkpoint after 1024kb or 5 minutes, for example), this does not checkpoint every 5 minutes as you may think. The explanation from Howard is:
+'In OpenLDAP 2.1 and 2.2 the checkpoint directive acts as follows - *when there is a write operation*, and more than <check> minutes have occurred since the last checkpoint, perform the checkpoint. If more than <check> minutes pass after a write without any other write operations occurring, no checkpoint is performed, so it's possible to lose the last write that occurred.''
+In other words, a write operation occurring less than "check" minutes after the last checkpoint will not be checkpointed until the next write occurs after "check" minutes have passed since the checkpoint.
+This has been modified in 2.3 to indeed checkpoint every so often; in the meantime a workaround is to invoke "db_checkpoint" from a cron script every so often, say 5 minutes.
+
+Exporting to a new system......
+
+
+
+slapd(8) supports an optional LDAP monitoring interface you can use to obtain information regarding the current state of your slapd instance. For instance, the interface allows you to determine how many clients are connected to the server currently. The monitoring information is provided by a specialized backend, the monitor backend. A manual page, slapd-monitor(5) is available.
+When the monitoring interface is enabled, LDAP clients may be used to access information provided by the monitor backend, subject to access and other controls.
+When enabled, the monitor backend dynamically generates and returns objects in response to search requests in the cn=Monitor subtree. Each object contains information about a particular aspect of the server. The information is held in a combination of user applications and operational attributes. This information can be access with ldapsearch(1), with any general-purpose LDAP browser, or with specialized monitoring tools. The Accessing Monitoring Information section provides a brief tutorial on how to use ldapsearch(1) to access monitoring information, while the Monitor information section details monitoring information base and its organization.
+While support for the monitor backend is included in default builds of slapd(8), this support requires some configuration to become active. This may be done using either cn=config or slapd.conf(5). The former is discussed in the Monitor configuration via cn=config section of this of this chapter. The latter is discussed in the Monitor configuration via slapd.conf(5) section of this chapter. These sections assume monitor backend is built into slapd (e.g., --enable-monitor=yes, the default). If the monitor backend was built as a module (e.g., --enable-monitor=mod, this module must loaded. Loading of modules is discussed in the Configuring slapd and The slapd Configuration File chapters.
+
+This section has yet to be written.
+
+Configuration of the slapd.conf(5) to support LDAP monitoring is quite simple.
+First, ensure core.schema schema configuration file is included by your slapd.conf(5) file. The monitor backend requires it.
+Second, instantiate the monitor backend by adding a database monitor directive below your existing database sections. For instance:
+
+ database monitor
+
+Lastly, add additional global or database directives as needed.
+Like most other database backends, the monitor backend does honor slapd(8) access and other administrative controls. As some monitor information may be sensitive, it is generally recommend access to cn=monitor be restricted to directory administrators and their monitoring agents. Adding an access directive immediately below the database monitor directive is a clear and effective approach for controlling access. For instance, the addition of the following access directive immediately below the database monitor directive restricts access to monitoring information to the specified directory manager.
+
+ access to *
+ by dn.exact="cn=Manager,dc=example,dc=com
+ by * none
+
+More information on slapd(8) access controls, see The access Control Directive section of the The slapd Configuration File chapter and slapd.access(5).
+After restarting slapd(8), you are ready to start exploring the monitoring information provided in cn=config as discussed in the Accessing Monitoring Information section of this chapter.
+One can verify slapd(8) is properly configured to provide monitoring information by attempting to read the cn=monitor object. For instance, if the following ldapsearch(1) command returns the cn=monitor object (with, as requested, no attributes), it's working.
+
+ ldapsearch -x -D 'cn=Manager,dc=example,dc=com' -W \
+ -b 'cn=Monitor' -s base 1.1
+
+Note that unlike general purpose database backends, the database suffix is hardcoded. It's always cn=Monitor. So no suffix directive should be provided. Also note that general purpose database backends, the monitor backend cannot be instantiated multiple times. That is, there can only be one (or zero) occurrences of database monitor in the server's configuration.
+
+As previously discussed, when enabled, the monitor backend dynamically generates and returns objects in response to search requests in the cn=Monitor subtree. Each object contains information about a particular aspect of the server. The information is held in a combination of user applications and operational attributes. This information can be access with ldapsearch(1), with any general-purpose LDAP browser, or with specialized monitoring tools.
+This section provides a provides a brief tutorial on how to use ldapsearch(1) to access monitoring information.
+To inspect any particular monitor object, one performs search operation on the object with a baseObject scope and a (objectClass=*) filter. As the monitoring information is contained in a combination of user applications and operational attributes, the return all user applications attributes (e.g., '*') and all operational attributes (e.g., '+') should be requested. For instance, to read the cn=Monitor object itself, the ldapsearch(1) command (modified to fit your configuration) can be used:
+
+ ldapsearch -x -D 'cn=Manager,dc=example,dc=com' -W \
+ -b 'cn=Monitor' -s base '(objectClass=*)' '*' '+'
+
+When run against your server, this should produce output similar to:
+
+ dn: cn=Monitor
+ objectClass: monitorServer
+ structuralObjectClass: monitorServer
+ cn: Monitor
+ creatorsName:
+ modifiersName:
+ createTimestamp: 20061208223558Z
+ modifyTimestamp: 20061208223558Z
+ description: This subtree contains monitoring/managing objects.
+ description: This object contains information about this server.
+ description: Most of the information is held in operational attributes, which
+ must be explicitly requested.
+ monitoredInfo: OpenLDAP: slapd 2.4 (Dec 7 2006 17:30:29)
+ entryDN: cn=Monitor
+ subschemaSubentry: cn=Subschema
+ hasSubordinates: TRUE
+
+To reduce the number of uninteresting attributes returned, one can be more selective when requesting which attributes are to be returned. For instance, one could request the return of all attributes allowed by the monitorServer object class (e.g., @objectClass) instead of all user and all operational attributes:
+
+ ldapsearch -x -D 'cn=Manager,dc=example,dc=com' -W \
+ -b 'cn=Monitor' -s base '(objectClass=*)' '@monitorServer'
+
+This limits the output as follows:
+
+ dn: cn=Monitor
+ objectClass: monitorServer
+ cn: Monitor
+ description: This subtree contains monitoring/managing objects.
+ description: This object contains information about this server.
+ description: Most of the information is held in operational attributes, which
+ must be explicitly requested.
+ monitoredInfo: OpenLDAP: slapd 2.X (Dec 7 2006 17:30:29)
+
+To return the names of all the monitoring objects, one performs a search of cn=Monitor with subtree scope and (objectClass=*) filter and requesting no attributes (e.g., 1.1) be returned.
+
+ ldapsearch -x -D 'cn=Manager,dc=example,dc=com' -W -b 'cn=Monitor' -s sub 1.1
+
+If you run this command you will discover that there are many objects in the cn=Monitor subtree. The following section describes some of the commonly available monitoring objects.
+
+The monitor backend provides a wealth of information useful for monitoring the slapd(8) contained in set of monitor objects. Each object contains information about a particular aspect of the server, such as a backends, a connection, or a thread. Some objects serve as containers for other objects and used to construct a hierarchy of objects.
+In this hierarchy, the most superior object is {cn=Monitor}. While this object primarily serves as a container for other objects, most of which are containers, this object provides information about this server. In particular, it provides the slapd(8) version string. Example:
+
+ dn: cn=Monitor
+ monitoredInfo: OpenLDAP: slapd 2.X (Dec 7 2006 17:30:29)
+
+
+Note: Examples in this section (and its subsections) have been trimmed to show only key information.
+
+
+The cn=Backends,cn=Monitor object, itself, provides a list of available backends. The list of available backends all builtin backends, as well as backends loaded by modules. For example:
+
+ dn: cn=Backends,cn=Monitor
+ monitoredInfo: config
+ monitoredInfo: ldif
+ monitoredInfo: monitor
+ monitoredInfo: bdb
+ monitoredInfo: hdb
+
+This indicates the config, ldif, monitor, bdb, and hdb backends are available.
+The cn=Backends,cn=Monitor object is also a container for available backend objects. Each available backend object contains information about a particular backend. For example:
+
+ dn: cn=Backend 0,cn=Backends,cn=Monitor
+ monitoredInfo: config
+ monitorRuntimeConfig: TRUE
+ supportedControl: 2.16.840.1.113730.3.4.2
+ seeAlso: cn=Database 0,cn=Databases,cn=Monitor
+
+ dn: cn=Backend 1,cn=Backends,cn=Monitor
+ monitoredInfo: ldif
+ monitorRuntimeConfig: TRUE
+ supportedControl: 2.16.840.1.113730.3.4.2
+
+ dn: cn=Backend 2,cn=Backends,cn=Monitor
+ monitoredInfo: monitor
+ monitorRuntimeConfig: TRUE
+ supportedControl: 2.16.840.1.113730.3.4.2
+ seeAlso: cn=Database 2,cn=Databases,cn=Monitor
+
+ dn: cn=Backend 3,cn=Backends,cn=Monitor
+ monitoredInfo: bdb
+ monitorRuntimeConfig: TRUE
+ supportedControl: 1.3.6.1.1.12
+ supportedControl: 2.16.840.1.113730.3.4.2
+ supportedControl: 1.3.6.1.4.1.4203.666.5.2
+ supportedControl: 1.2.840.113556.1.4.319
+ supportedControl: 1.3.6.1.1.13.1
+ supportedControl: 1.3.6.1.1.13.2
+ supportedControl: 1.3.6.1.4.1.4203.1.10.1
+ supportedControl: 1.2.840.113556.1.4.1413
+ supportedControl: 1.3.6.1.4.1.4203.666.11.7.2
+ seeAlso: cn=Database 1,cn=Databases,cn=Monitor
+
+ dn: cn=Backend 4,cn=Backends,cn=Monitor
+ monitoredInfo: hdb
+ monitorRuntimeConfig: TRUE
+ supportedControl: 1.3.6.1.1.12
+ supportedControl: 2.16.840.1.113730.3.4.2
+ supportedControl: 1.3.6.1.4.1.4203.666.5.2
+ supportedControl: 1.2.840.113556.1.4.319
+ supportedControl: 1.3.6.1.1.13.1
+ supportedControl: 1.3.6.1.1.13.2
+ supportedControl: 1.3.6.1.4.1.4203.1.10.1
+ supportedControl: 1.2.840.113556.1.4.1413
+ supportedControl: 1.3.6.1.4.1.4203.666.11.7.2
+
+For each of these objects, monitorInfo indicates which backend the information in the object is about. For instance, the cn=Backend 3,cn=Backends,cn=Monitor object contains (in the example) information about the bdb backend.
+
+
+
+Attribute
+ |
+
+Description
+ |
+
+
+
+monitoredInfo
+ |
+
+Name of backend
+ |
+
+
+
+supportedControl
+ |
+
+supported LDAP control extensions
+ |
+
+
+
+seeAlso
+ |
+
+Database objects of instances of this backend
+ |
+
+
+
+
+The main entry is empty; it should contain some statistics on the number of connections.
+Dynamic child entries are created for each open connection, with stats on the activity on that connection (the format will be detailed later). There are two special child entries that show the number of total and current connections respectively.
+For example:
+Total Connections:
+
+ dn: cn=Total,cn=Connections,cn=Monitor
+ structuralObjectClass: monitorCounterObject
+ monitorCounter: 4
+ entryDN: cn=Total,cn=Connections,cn=Monitor
+ subschemaSubentry: cn=Subschema
+ hasSubordinates: FALSE
+
+Current Connections:
+
+ dn: cn=Current,cn=Connections,cn=Monitor
+ structuralObjectClass: monitorCounterObject
+ monitorCounter: 2
+ entryDN: cn=Current,cn=Connections,cn=Monitor
+ subschemaSubentry: cn=Subschema
+ hasSubordinates: FALSE
+
+
+The main entry contains the naming context of each configured database; the child entries contain, for each database, the type and the naming context.
+For example:
+
+ dn: cn=Database 2,cn=Databases,cn=Monitor
+ structuralObjectClass: monitoredObject
+ monitoredInfo: monitor
+ monitorIsShadow: FALSE
+ monitorContext: cn=Monitor
+ readOnly: FALSE
+ entryDN: cn=Database 2,cn=Databases,cn=Monitor
+ subschemaSubentry: cn=Subschema
+ hasSubordinates: FALSE
+
+
+It contains the description of the devices the server is currently listening on:
+
+ dn: cn=Listener 0,cn=Listeners,cn=Monitor
+ structuralObjectClass: monitoredObject
+ monitorConnectionLocalAddress: IP=0.0.0.0:389
+ entryDN: cn=Listener 0,cn=Listeners,cn=Monitor
+ subschemaSubentry: cn=Subschema
+ hasSubordinates: FALSE
+
+
+It contains the currently active log items. The Log subsystem allows user modify operations on the description attribute, whose values MUST be in the list of admittable log switches:
+
+ Trace
+ Packets
+ Args
+ Conns
+ BER
+ Filter
+ Config
+ ACL
+ Stats
+ Stats2
+ Shell
+ Parse
+ Sync
+
+These values can be added, replaced or deleted; they affect what messages are sent to the syslog device. Custom values could be added by custom modules.
+
+It shows some statistics on the operations performed by the server:
+
+ Initiated
+ Completed
+
+and for each operation type, i.e.:
+
+ Bind
+ Unbind
+ Add
+ Delete
+ Modrdn
+ Modify
+ Compare
+ Search
+ Abandon
+ Extended
+
+There are too many types to list example here, so please try for yourself using Monitor search example
+
+The main entry contains the type of overlays available at run-time; the child entries, for each overlay, contain the type of the overlay.
+It should also contain the modules that have been loaded if dynamic overlays are enabled:
+
+ # Overlays, Monitor
+ dn: cn=Overlays,cn=Monitor
+ structuralObjectClass: monitorContainer
+ monitoredInfo: syncprov
+ monitoredInfo: accesslog
+ monitoredInfo: glue
+ entryDN: cn=Overlays,cn=Monitor
+ subschemaSubentry: cn=Subschema
+ hasSubordinates: TRUE
+
+
+Currently empty.
+
+It shows some statistics on the data sent by the server:
+
+ Bytes
+ PDU
+ Entries
+ Referrals
+
+e.g.
+
+ # Entries, Statistics, Monitor
+ dn: cn=Entries,cn=Statistics,cn=Monitor
+ structuralObjectClass: monitorCounterObject
+ monitorCounter: 612248
+ entryDN: cn=Entries,cn=Statistics,cn=Monitor
+ subschemaSubentry: cn=Subschema
+ hasSubordinates: FALSE
+
+
+It contains the maximum number of threads enabled at startup and the current backload.
+e.g.
+
+ # Max, Threads, Monitor
+ dn: cn=Max,cn=Threads,cn=Monitor
+ structuralObjectClass: monitoredObject
+ monitoredInfo: 16
+ entryDN: cn=Max,cn=Threads,cn=Monitor
+ subschemaSubentry: cn=Subschema
+ hasSubordinates: FALSE
+
+
+It contains two child entries with the start time and the current time of the server.
+e.g.
+Start time:
+
+ dn: cn=Start,cn=Time,cn=Monitor
+ structuralObjectClass: monitoredObject
+ monitorTimestamp: 20061205124040Z
+ entryDN: cn=Start,cn=Time,cn=Monitor
+ subschemaSubentry: cn=Subschema
+ hasSubordinates: FALSE
+
+Current time:
+
+ dn: cn=Current,cn=Time,cn=Monitor
+ structuralObjectClass: monitoredObject
+ monitorTimestamp: 20061207120624Z
+ entryDN: cn=Current,cn=Time,cn=Monitor
+ subschemaSubentry: cn=Subschema
+ hasSubordinates: FALSE
+
+
+Currently empty.
+
+It contains the number of current read waiters.
+e.g.
+Read waiters:
+
+ dn: cn=Read,cn=Waiters,cn=Monitor
+ structuralObjectClass: monitorCounterObject
+ monitorCounter: 7
+ entryDN: cn=Read,cn=Waiters,cn=Monitor
+ subschemaSubentry: cn=Subschema
+ hasSubordinates: FALSE
+
+Write waiters:
+
+ dn: cn=Write,cn=Waiters,cn=Monitor
+ structuralObjectClass: monitorCounterObject
+ monitorCounter: 0
+ entryDN: cn=Write,cn=Waiters,cn=Monitor
+ subschemaSubentry: cn=Subschema
+ hasSubordinates: FALSE
+
+Add new monitored things here and discuss, referencing man pages and present examples
+
+
+
+This is perhaps one of the most important chapters in the guide, because if you have not tuned slapd(8) correctly or grasped how to design your directory and environment, you can expect very poor performance.
+Reading, understanding and experimenting using the instructions and information in the following sections, will enable you to fully understand how to tailor your directory server to your specific requirements.
+It should be noted that the following information has been collected over time from our community based FAQ. So obviously the benefit of this real world experience and advice should be of great value to the reader.
+
+Various factors can play a part in how your directory performs on your chosen hardware and environment. We will attempt to discuss these here.
+
+Scale your cache to use available memory and increase system memory if you can.
+More info here.
+
+Use fast subsystems. Put each database and logs on separate disks.
+Example showing config settings
+
+http://www.openldap.org/faq/data/cache/363.html
+Drawing here.
+
+Reference to other sections and good/bad drawing here.
+
+Discussion.
+
+
+If you're searching on a filter that has been indexed, then the search reads the index and pulls exactly the entries that are referenced by the index. If the filter term has not been indexed, then the search must read every single entry in the target scope and test to see if each entry matches the filter. Obviously indexing can save a lot of work when it's used correctly.
+
+You should create indices to match the actual filter terms used in search queries.
+
+ index cn,sn,givenname,mail eq
+
+Each attribute index can be tuned further by selecting the set of index types to generate. For example, substring and approximate search for organizations (o) may make little sense (and isn't like done very often). And searching for userPassword likely makes no sense what so ever.
+General rule: don't go overboard with indexes. Unused indexes must be maintained and hence can only slow things down.
+See slapd.conf(8) and slapdindex(8) for more information
+
+If your client application uses presence filters and if the target attribute exists on the majority of entries in your target scope, then all of those entries are going to be read anyway, because they are valid members of the result set. In a subtree where 100% of the entries are going to contain the same attributes, the presence index does absolutely NOTHING to benefit the search, because 100% of the entries match that presence filter.
+So the resource cost of generating the index is a complete waste of CPU time, disk, and memory. Don't do it unless you know that it will be used, and that the attribute in question occurs very infrequently in the target data.
+Almost no applications use presence filters in their search queries. Presence indexing is pointless when the target attribute exists on the majority of entries in the database. In most LDAP deployments, presence indexing should not be done, it's just wasted overhead.
+See the Logging section below on what to watch our for if you have a frequently searched for attribute that is unindexed.
+
+
+The default of loglevel 256 is really the best bet. There's a corollary to this when problems *do* arise, don't try to trace them using syslog. Use the debug flag instead, and capture slapd's stderr output. syslog is too slow for debug tracing, and it's inherently lossy - it will throw away messages when it can't keep up.
+Contrary to popular belief, loglevel 0 is not ideal for production as you won't be able to track when problems first arise.
+
+The most common message you'll see that you should pay attention to is:
+
+ "<= bdb_equality_candidates: (foo) index_param failed (18)"
+
+That means that some application tried to use an equality filter (foo=<somevalue>) and attribute foo does not have an equality index. If you see a lot of these messages, you should add the index. If you see one every month or so, it may be acceptable to ignore it.
+The default syslog level is 256 which logs the basic parameters of each request; it usually produces 1-3 lines of output. On Solaris and systems that only provide synchronous syslog, you may want to turn it off completely, but usually you want to leave it enabled so that you'll be able to see index messages whenever they arise. On Linux you can configure syslogd to run asynchronously, in which case the performance hit for moderate syslog traffic pretty much disappears.
+
+You can improve logging performance on some systems by configuring syslog not to sync the file system with every write (man syslogd/syslog.conf). In Linux, you can prepend the log file name with a "-" in syslog.conf. For example, if you are using the default LOCAL4 logging you could try:
+
+ # LDAP logs
+ LOCAL4.* -/var/log/ldap
+
+For syslog-ng, add or modify the following line in syslog-ng.conf:
+
+ options { sync(n); };
+
+where n is the number of lines which will be buffered before a write.
+
+We all know what caching is, don't we?
+In brief, "A cache is a block of memory for temporary storage of data likely to be used again" - http://en.wikipedia.org/wiki/Cache
+There are 3 types of caches, BerkeleyDB's own cache, slapd(8) entry cache and IDL (IDL) cache.
+
+BerkeleyDB's own data cache operates on page-sized blocks of raw data.
+Note that while the BDB cache is just raw chunks of memory and configured as a memory size, the slapd(8) entry cache holds parsed entries, and the size of each entry is variable.
+There is also an IDL cache which is used for Index Data Lookups. If you can fit all of your database into slapd's entry cache, and all of your index lookups fit in the IDL cache, that will provide the maximum throughput.
+If not, but you can fit the entire database into the BDB cache, then you should do that and shrink the slapd entry cache as appropriate.
+Failing that, you should balance the BDB cache against the entry cache.
+It is worth noting that it is not absolutely necessary to configure a BerkeleyDB cache equal in size to your entire database. All that you need is a cache that's large enough for your "working set."
+That means, large enough to hold all of the most frequently accessed data, plus a few less-frequently accessed items.
+ORACLE LINKS HERE
+
+The back-bdb database lives in two main files, dn2id.bdb and id2entry.bdb. These are B-tree databases. We have never documented the back-bdb internal layout before, because it didn't seem like something anyone should have to worry about, nor was it necessarily cast in stone. But here's how it works today, in OpenLDAP 2.4.
+A B-tree is a balanced tree; it stores data in its leaf nodes and bookkeeping data in its interior nodes (If you don't know what tree data structures look like in general, Google for some references, because that's getting far too elementary for the purposes of this discussion).
+For decent performance, you need enough cache memory to contain all the nodes along the path from the root of the tree down to the particular data item you're accessing. That's enough cache for a single search. For the general case, you want enough cache to contain all the internal nodes in the database.
+
+ db_stat -d
+
+will tell you how many internal pages are present in a database. You should check this number for both dn2id and id2entry.
+Also note that id2entry always uses 16KB per "page", while dn2id uses whatever the underlying filesystem uses, typically 4 or 8KB. To avoid thrashing the, your cache must be at least as large as the number of internal pages in both the dn2id and id2entry databases, plus some extra space to accommodate the actual leaf data pages.
+For example, in my OpenLDAP 2.4 test database, I have an input LDIF file that's about 360MB. With the back-hdb backend this creates a dn2id.bdb that's 68MB, and an id2entry that's 800MB. db_stat tells me that dn2id uses 4KB pages, has 433 internal pages, and 6378 leaf pages. The id2entry uses 16KB pages, has 52 internal pages, and 45912 leaf pages. In order to efficiently retrieve any single entry in this database, the cache should be at least
+
+ (433+1) * 4KB + (52+1) * 16KB in size: 1736KB + 848KB =~ 2.5MB.
+
+This doesn't take into account other library overhead, so this is even lower than the barest minimum. The default cache size, when nothing is configured, is only 256KB.
+This 2.5MB number also doesn't take indexing into account. Each indexed attribute uses another database file of its own, using a Hash structure.
+Unlike the B-trees, where you only need to touch one data page to find an entry of interest, doing an index lookup generally touches multiple keys, and the point of a hash structure is that the keys are evenly distributed across the data space. That means there's no convenient compact subset of the database that you can keep in the cache to insure quick operation, you can pretty much expect references to be scattered across the whole thing. My strategy here would be to provide enough cache for at least 50% of all of the hash data.
+
+ (Number of hash buckets + number of overflow pages + number of duplicate pages) * page size / 2.
+
+The objectClass index for my example database is 5.9MB and uses 3 hash buckets and 656 duplicate pages. So:
+
+ ( 3 + 656 ) * 4KB / 2 =~ 1.3MB.
+
+With only this index enabled, I'd figure at least a 4MB cache for this backend. (Of course you're using a single cache shared among all of the database files, so the cache pages will most likely get used for something other than what you accounted for, but this gives you a fighting chance.)
+With this 4MB cache I can slapcat this entire database on my 1.3GHz PIII in 1 minute, 40 seconds. With the cache doubled to 8MB, it still takes the same 1:40s. Once you've got enough cache to fit the B-tree internal pages, increasing it further won't have any effect until the cache really is large enough to hold 100% of the data pages. I don't have enough free RAM to hold all the 800MB id2entry data, so 4MB is good enough.
+With back-bdb and back-hdb you can use "db_stat -m" to check how well the database cache is performing.
+
+The slapd(8) entry cache operates on decoded entries. The rationale - entries in the entry cache can be used directly, giving the fastest response. If an entry isn't in the entry cache but can be extracted from the BDB page cache, that will avoid an I/O but it will still require parsing, so this will be slower.
+If the entry is in neither cache then BDB will have to flush some of its current cached pages and bring in the needed pages, resulting in a couple of expensive I/Os as well as parsing.
+As far as balancing the entry cache vs the BDB cache - parsed entries in memory are generally about twice as large as they are on disk.
+As we have already mentioned, not having a proper database cache size will cause performance issues. These issues are not an indication of corruption occurring in the database. It is merely the fact that the cache is thrashing itself that causes performance/response time to slowdown.
+MOVE BELOW AROUND:
+If you want to setup the cache size, please read:
+(Xref) How do I configure the BDB backend? (Xref) What are the DB_CONFIG configuration directives? http://www.sleepycat.com/docs/utility/db_recover.html
+A default config can be found in the answer:
+(Xref) What are the DB_CONFIG configuration directives?
+just change the set_lg_dir to point to your .log directory or comment that line.
+Quick guide:
+
+- Create a DB_CONFIG file in your ldap home directory (/var/lib/ldap/DB_CONFIG) with the correct "set_cachesize" value
+
- stop your ldap server and run db_recover -h /var/lib/ldap
+
- start your ldap server and check the new cache size with:
+db_stat -h /var/lib/ldap -m | head -n 2
+
+- this procedure is only needed if you use OpenLDAP 2.2 with the BDB or HDB backends; In OpenLDAP 2.3 DB recovery is performed automatically whenever the DB_CONFIG file is changed or when an unclean shutdown is detected.
+- On Tuesday, February 22, 2005 12:15 PM -0500 Dusty Doris <openldap@mail.doris.cc> wrote:
+Few questions, if you change the cachesize and idlecachesize entries, do you have to do anything special aside from restarting slapd, such as run slapindex or db_recover?
+Also, is there any way to tell how much memory these caches are taking up to make sure they are not set too large? What happens if you set your cachesize too large and you don't have enough available memory to store these? Will that cause an issue with openldap, or will it just not cache those entries that would make it exceed its available memory. Will it just use some sort of FIFO on those caches?
+It will consume the memory resources of your system, and likely cause issues.
+Finally, what do most people try to achieve with these values? Would the goal be to make these as big as the directory? So, if I have 400,000 dn's in my directory, would it be safe to set these at 400000 or would something like 20,000 be good enough to get a nice performance increase?
+I try to cache the most actively used entries. Unless you expect all 400,000 entries of your DB to be accessed regularly, there is no need to cache that many entries. My entry cache is set to 20,000 (out of a little over 400,000 entries).
+The idlcache has to do with how many unique result sets of searches you want to store in memory. Setting up this cache will allow your most frequently placed searches to get results much faster, but I doubt you want to try and cache the results of every search that hits your system. ;)
+
+
+http://www.openldap.org/faq/data/cache/1076.html
+
+
+
+If you're having trouble using OpenLDAP, get onto the OpenLDAP-Software mailing list, or:
+
+Chances are the problem has been solved and explained in detail many times before.
+
+More often than not, an error is caused by a configuration problem or a misunderstanding of what you are trying to implement and/or achieve.
+We will now attempt to discuss common user errors.
+
+The following checklist can help track down your problem. Please try to use if before posting to the list, or in the rare circumstances of reporting a bug.
+
+- Use the slaptest tool to verify configurations before starting slapd
+
+
+ - Verify that slapd is listening to the specified port(s) (389 and 636, generally) before trying the ldapsearch
+
+
+ - Can you issue an ldapsearch?
+
+
+ - If not, have you enabled complex ACLs without fully understanding them?
+
+
+ - Do you have a system wide LDAP setting pointing to the wrong LDAP Directory?
+
+
+ - Are you using TLS?
+
+
+ - Have your certificates expired?
+
+Sometimes you may encounter an actual OpenLDAP bug, in which case please visit our Issue Tracking system http://www.openldap.org/its/ and report it. However, make sure it's not already a known bug or a common user problem.
+
+- bugs in historic versions of OpenLDAP will not be considered;
+
- bugs in released versions that are no longer present in HEAD code, either because they have been fixed or because they no longer apply, will not be considered as well;
+
- bugs in distributions of OpenLDAP software that are not related to the software as provided by OpenLDAP will not be considered; in those cases please refer to the distributor.
+
+Note: Our Issue Tracking system is NOT for OpenLDAP Support, please join our mailing Lists: http://www.openldap.org/lists/ for that.
+
+The information you should provide in your bug report is discussed in our FAQ-O-MATIC at http://www.openldap.org/faq/data/cache/59.html
+
+The OpenLDAP Project only supports OpenLDAP software.
+You may however seek commercial support (http://www.openldap.org/support/) or join the general LDAP forum for non-commercial discussions and information relating to LDAP at: http://www.umich.edu/~dirsvcs/ldap/mailinglist.html
+
+
+
+
+After reading through the above sections and before e-mailing the OpenLDAP lists, you might want to try out some of the following to track down the cause of your problems:
+
+- Loglevel 256 is generally a good first loglevel to try for getting information useful to list members on issues
+
- Running slapd -d -1 can often track down fairly simple issues, such as missing schemas and incorrect file permissions for the slapd user to things like certs
+
- Check your logs for errors, as discussed at http://www.openldap.org/faq/data/cache/358.html
+
+The firms listed at http://www.openldap.org/support/ offer technical support services catering to OpenLDAP community.
+The listing of any given firm should not be viewed as an endorsement or recommendation of any kind, nor as otherwise indicating there exists a business relationship or an affiliation between any listed firm and the OpenLDAP Foundation or the OpenLDAP Project or its contributors.
+
+
+
+The following sections attempt to summarize the new features and changes in OpenLDAP software since the 2.3.x release and the OpenLDAP Admin Guide.
+
+In order to make the Admin Guide more thorough and cover the majority of questions asked on the OpenLDAP mailing lists and scenarios discussed there, we have added the following new sections:
+
+Also, the table of contents is now 3 levels deep to ease navigation.
+
+
+There is a new slapd-config(5) manpage for the cn=config backend. The original design called for auto-renaming of config entries when you insert or delete entries with ordered names, but that was not implemented in 2.3. It is now in 2.4. This means, e.g., if you have
+
+ olcDatabase={1}bdb,cn=config
+ olcSuffix: dc=example,dc=com
+
+and you want to add a new subordinate, now you can ldapadd:
+
+ olcDatabase={1}bdb,cn=config
+ olcSuffix: dc=foo,dc=example,dc=com
+
+This will insert a new BDB database in slot 1 and bump all following databases down one, so the original BDB database will now be named:
+
+ olcDatabase={2}bdb,cn=config
+ olcSuffix: dc=example,dc=com
+
+
+In 2.3 you were only able to add new schema elements, not delete or modify existing elements. In 2.4 you can modify schema at will. (Except for the hardcoded system schema, of course.)
+
+The original implementation of Syncrepl in OpenLDAP 2.2 was intended to support multiple consumers within the same database, but that feature never worked and was removed from OpenLDAP 2.3; you could only configure a single consumer in any database.
+In 2.4 you can configure multiple consumers in a single database. The configuration possibilities here are quite complex and numerous. You can configure consumers over arbitrary subtrees of a database (disjoint or overlapping). Any portion of the database may in turn be provided to other consumers using the Syncprov overlay. The Syncprov overlay works with any number of consumers over a single database or over arbitrarily many glued databases.
+
+As a consequence of the work to support multiple consumer contexts, the syncrepl system now supports full N-Way multimaster replication with entry-level conflict resolution. There are some important constraints, of course: In order to maintain consistent results across all servers, you must maintain tightly synchronized clocks across all participating servers (e.g., you must use NTP on all servers).
+The entryCSNs used for replication now record timestamps with microsecond resolution, instead of just seconds. The delta-syncrepl code has not been updated to support multimaster usage yet, that will come later in the 2.4 cycle.
+
+Syncrepl was explicitly disabled on cn=config in 2.3. It is now fully supported in 2.4; you can use syncrepl to replicate an entire server configuration from one server to arbitrarily many other servers. It's possible to clone an entire running slapd using just a small (less than 10 lines) seed configuration, or you can just replicate the schema subtrees, etc. Tests 049 and 050 in the test suite provide working examples of these capabilities.
+
+In 2.3 you could configure syncrepl as a full push-mode replicator by using it in conjunction with a back-ldap pointed at the target server. But because the back-ldap database needs to have a suffix corresponding to the target's suffix, you could only configure one instance per slapd.
+In 2.4 you can define a database to be "hidden", which means that its suffix is ignored when checking for name collisions, and the database will never be used to answer requests received by the frontend. Using this "hidden" database feature allows you to configure multiple databases with the same suffix, allowing you to set up multiple back-ldap instances for pushing replication of a single database to multiple targets. There may be other uses for hidden databases as well (e.g., using a syncrepl consumer to maintain a *local* mirror of a database on a separate filesystem).
+
+In 2.3, the TLS configuration in slapd was only used by the slapd listeners. For outbound connections used by e.g. back-ldap or syncrepl their TLS parameters came from the system's ldap.conf file.
+In 2.4 all of these sessions inherit their settings from the main slapd configuration, but settings can be individually overridden on a per-config-item basis. This is particularly helpful if you use certificate-based authentication and need to use a different client certificate for different destinations.
+
+Too many to list. Some notable changes - ldapadd used to be a couple of orders of magnitude slower than "slapadd -q". It's now at worst only about half the speed of slapadd -q. Some comparisons of all the 2.x OpenLDAP releases are available at http://www.openldap.org/pub/hyc/scale2007.pdf
+That compared 2.0.27, 2.1.30, 2.2.30, 2.3.33, and HEAD). Toward the latter end of the "Cached Search Performance" chart it gets hard to see the difference because the run times are so small, but the new code is about 25% faster than 2.3, which was about 20% faster than 2.2, which was about 100% faster than 2.1, which was about 100% faster than 2.0, in that particular search scenario. That test basically searched a 1.3GB DB of 380836 entries (all in the slapd entry cache) in under 1 second. i.e., on a 2.4GHz CPU with DDR400 ECC/Registered RAM we can search over 500 thousand entries per second. The search was on an unindexed attribute using a filter that would not match any entry, forcing slapd to examine every entry in the DB, testing the filter for a match.
+Essentially the slapd entry cache in back-bdb/back-hdb is so efficient the search processing time is almost invisible; the runtime is limited only by the memory bandwidth of the machine. (The search data rate corresponds to about 3.5GB/sec; the memory bandwidth on the machine is only about 4GB/sec due to ECC and register latency.)
+
+
+- slapo-constraint (Attribute value constraints)
+
- slapo-dds (Dynamic Directory Services, RFC 2589)
+
- slapo-memberof (reverse group membership maintenance)
+
+
+- slapo-pcache
+- Inspection/Maintenance
+- the cache database can be directly accessed via LDAP by adding a specific control to each LDAP request; a specific extended operation allows to consistently remove cached entries and entire cached queries
+ - Hot Restart
+- cached queries are saved on disk at shutdown, and reloaded if not expired yet at subsequent restart
+ - slapo-rwm can safely interoperate with other overlays
+
- Dyngroup/Dynlist merge, plus security enhancements
+- added dgIdentity support (draft-haripriya-dynamicgroup)
+
+
+- monitoring of back-{b,h}db: cache fill-in, non-indexed searches,
+
- session tracking control (draft-wahl-ldap-session)
+
- subtree delete in back-sql (draft-armijo-ldap-treedelete)
+
+
+- ldap_sync client API (LDAP Content Sync Operation, RFC 4533)
+
+
+- ldapexop for arbitrary extended operations
+
- Complete support of controls in request/response for all clients
+
- LDAP Client tools now honor SRV records
+
+
+- Support for building against GnuTLS
+
+These features were strongly deprecated in 2.3 and removed in 2.4.
+
+Please read the Replication section as to why this is no longer in OpenLDAP
+
+back-ldbm was both slow and unreliable. Its byzantine indexing code was prone to spontaneous corruption, as were the underlying database libraries that were commonly used (e.g. GDBM or NDBM). back-bdb and back-hdb are superior in every aspect, with simplified indexing to avoid index corruption, fine-grained locking for greater concurrency, hierarchical caching for greater performance, streamlined on-disk format for greater efficiency and portability, and full transaction support for greater reliability.
+
+
+
+The following sections attempt to document the steps you will need to take in order to upgrade from the latest 2.3.x OpenLDAP version.
+The normal upgrade procedure, as discussed in the Maintenance section, should of course still be followed prior to doing any of this.
+
+
+Note: This is a temporary requirement and is subject to change over the next 2.4.x beta release cycle
+
+A monitor (slapd-monitor(5)) now needs a rootdn entry. If you do not have one, slapd will fail to start up with an error message like so:
+
+ monitor_back_register_entry_attrs(""): base="cn=databases,cn=monitor" scope=one
+ filter="(namingContexts:distinguishedNameMatch:=dc=example,dc=com)": unable to find entry
+ backend_startup_one: bi_db_open failed! (1)
+ slap_startup failed (test would succeed using the -u switch)
+
+Here is a complete database monitor example:
+
+ database monitor
+ rootdn cn=monitor
+ rootpw change_me
+
+
+Quite a few olc* attributes have now become obsolete, if you see in your logs entries like below, just remove them from the relevant ldif file.
+
+ olcReplicationInterval: value #0: <olcReplicationInterval> keyword is obsolete (ignored)
+
+ADD MORE HERE
+
+
+
+The following sections attempt to summarize the most common causes of LDAP errors when using OpenLDAP
+
+
+The {[B:Can't contact LDAP server}} error is usually returned when the LDAP server cannot be contacted. This may occur for many reasons:
+
+- the LDAP server is not running; this can be checked by running, for example,
+
+ telnet <host> <port>
+
+replacing <host> and <port> with the hostname and the port the server is supposed to listen on.
+
+- the client has not been instructed to contact a running server; with OpenLDAP command-line tools this is accomplished by providing the -H switch, whose argument is a valid LDAP url corresponding to the interface the server is supposed to be listening on.
+
+The no such object error is generally returned when the target DN of the operation cannot be located. This section details reasons common to all operations. You should also look for answers specific to the operation (as indicated in the error message).
+The most common reason for this error is non-existence of the named object. First, check for typos.
+Also note that, by default, a new directory server holds no objects (except for a few system entries). So, if you are setting up a new directory server and get this message, it may simply be that you have yet to add the object you are trying to locate.
+The error commonly occurs because a DN was not specified and a default was not properly configured.
+If you have a suffix specified in slapd.conf eg.
+
+ suffix "dc=example,dc=com"
+
+You should use
+
+ ldapsearch -b 'dc=example,dc=com' '(cn=jane*)'
+
+to tell it where to start the search.
+The -b should be specified for all LDAP commands unless you have an ldap.conf(5) default configured.
+See Also: ldapsearch(1), ldapmodify(1), and (Xref) How do I specify default base DN for clients? Also, slapadd(8) and its ancillary programs are very strict about the syntax of the LDIF file. Some liberties in the LDIF file may result in an apparently successful creation of the database, but accessing some parts of it may be difficult.
+One known common error in database creation is putting a blank line before the first entry in the LDIF file. There must be no leading blank lines in the LDIF file.
+It is generally recommended that ldapadd(1) be used instead of slapadd(8) when adding new entries your directory. slapadd(8) should be used to bulk load entries known to be valid. Another cause of this message is a referral entry to an unpopulated directory. Either remove the referral, or add a single record with the referral base DN to the empty directory. This error may also occur when slapd is unable to access the contents of its database because of file permission problems. For instance, on a Red Hat Linux system, slapd runs as user 'ldap'. When slapadd is run as root to create a database from scratch, the contents of /var/lib/ldap are created with user and group root and with permission 600, making the contents inaccessible to the slapd server.
+
+This is caused by the line
+
+ referral ldap://root.openldap.org
+
+in slapd.conf, It was provided as an example for how to use referrals in the original file. however if your machine is not permanently connected to the Internet, it will fail to find the server, and hence produce an error message.
+To resolve, just place a # in front of line and restart slapd or point it to an available ldap server. See also: ldapadd(1) ldapmodify(1) slapd.conf(5)
+
+The OpenLDAP server will return an unwilling to perform error if the backend holding the target entry does not support the given operation. The password backend is only willing to perform searches. It will return an unwilling to perform error for all other operations. The shell backend is configurable and may support a limited subset of operations. Check for other errors indicating a shortage of resources required by the directory server. i.e. you may have a full disk etc
+
+This error occurs when server denies the operation due to insufficient access. This is usually caused by binding to a DN with insufficient privileges (or binding anonymously) to perform the operation. You can bind as the rootdn/rootpw specified in slapd.conf(5) to gain full access. Otherwise, you must bind to an entry which has been granted the appropriate rights through access controls. See also: ldapadd(1) ldapdelete(1) ldapmodify(1) ldapmodrdn(1) ldapsearch(1) slapd.conf(5) (Xref) ldap_bind: Insufficient access (Xref) Access Control
+
+The target (or other) DN of the operation is invalid. This implies that either the string representation of the DN is not in the required form, one of the types in the attribute value assertions is not defined, or one of the values in the attribute value assertions does not conform to the appropriate syntax.
+
+This error generally occurs when the client chases a referral which refers itself back to a server it already contacted. The server responds as it did before and the client loops. This loop is detected when the hop limit is exceeded.
+This is most often caused through misconfiguration of the server's default referral. The default referral should not be itself:
+That is, on ldap://myldap/ the default referral should not be ldap://myldap/ (or any hostname/ip which is equivalent to myldap).
+
+In some versions of slapd(8), operationsError was returned instead of other. See also: (Xref) ldap_*: other error.
+
+The other result code indicates an internal error has occurred. While the additional information provided with the result code might provide some hint as to the problem, often one will need to consult the server's log files.
+
+This error is reported when a value of an attribute does not conform to syntax restrictions. Additional information is commonly provided stating which value of which attribute was found to be invalid. Double check this value and other values (the server will only report the first error it finds).
+Common causes include:
+
+- extraneous white space (especially trailing white space)
+
- improperly encoded characters (LDAPv3 uses UTF-8 encoded Unicode)
+
- empty values (few syntaxes allow empty values)
+For certain syntax, like OBJECT IDENTIFIER (OID), this error can indicate that the OID descriptor (a "short name") provided is unrecognized. For instance, this error is returned if the objectClass value provided is unrecognized.
+
+This error is returned with the entry to be added or the entry as modified violates the object class schema rules. Normally additional information is returned the error detailing the violation. Some of these are detailed below.
+Violations related to the entry's attributes:
+
+ Attribute not allowed A provided attribute is not allowed by the entry's object class(es).
+ Missing required attribute An attribute required by the entry's object class(es) was not provided.
+
+Violations related to the entry's class(es):
+
+ Entry has no objectClass attribute The entry did not state which object classes it belonged to.
+ Unrecognized objectClass One (or more) of the listed objectClass values is not recognized.
+ No structural object class provided None of the listed objectClass values is structural.
+ Invalid structural object class chain Two or more structural objectClass values are not in same structural object class chain. See also (Xref) ldap add: invalid structural object class chain.
+ Structural object class modification Modify operation attempts to change the structural class of the entry. See also (Xref) ldap_modify: cannot modify object class.
+ Instanstantiation of abstract objectClass. An abstract class is not subordinate to any listed structural or auxiliary class.
+ Invalid structural object class Other structural object class problem.
+ No structuralObjectClass operational attribute This is commonly returned when a shadow server is provided an entry which does not contain the structuralObjectClass operational attribute.
+
+Note that the above error messages as well as the above answer assumes basic knowledge of LDAP/X.500 schema.
+
+The "ldap_add: No such object" error is commonly returned if parent of the entry being added does not exist. Add the parent entry first...
+For example, if you are adding "cn=bob,dc=domain,dc=com" and you get:
+
+ ldap_add: No such object
+
+The entry "dc=domain,dc=com" likely doesn't exist. You can use ldapsearch to see if does exist:
+
+ ldapsearch -b 'dc=domain,dc=com' -s base '(objectclass=*)'
+
+If it doesn't, add it. See the Quick Start Guide (http://www.openldap.org/doc/admin/quickstart.html) for assistance.
+
+Note: if the entry being added is the same as database suffix, it's parent isn't required. i.e.: if your suffix is "dc=domain,dc=com", "dc=com" doesn't need to exist to add "dc=domain,dc=com". This error will also occur if you try to add any entry that the server is not configured to hold.
+
+For example, if your database suffix is "dc=domain,dc=com" and you attempt to add "dc=domain2,dc=com", "dc=com", "dc=domain,dc=org", "o=domain,c=us", or an other DN in the "dc=domain,dc=com" subtree, the server will return a "No such object" (or referral) error.
+slapd(8) will generally return "no global superior knowledge" as additional information indicating its return noSuchObject instead of a referral as the server is not configured with knowledge of a global superior server. See also: ldapadd(1) ldapmodify(1) (Xref) ldap_add/delete/modify/rename: no global superior knowledge
+
+This particular error refers to the rule about STRUCTURAL objectclasses, which states that an object is of one STRUCTURAL class, the structural class of the object. The object is said to belong to this class, zero or more auxiliaries classes, and their super classes. While all of these classes are commonly listed in the objectClass attribute of the entry, one of these classes is the structural object class of the entry. Thus, it is OK for an objectClass attribute to contain inetOrgPerson, organizationalPerson, and person because they inherit one from another to form a single super class chain. That is, inetOrgPerson SUPs organizationPerson SUPs person. On the other hand, it is invalid for both inetOrgPerson and account to be listed in objectClass as inetOrgPerson and account are not part of the same super class chain (unless some other class is also listed with is a subclass of both).
+To resolve this problem, one must determine which class will better serve structural object class for the entry, adding this class to the objectClass attribute (if not already present), and remove any other structural class from the entry's objectClass attribute which is not a super class of the structural object class.
+Which object class is better depends on the particulars of the situation. One generally should consult the documentation for the applications one is using for help in making the determination.
+
+ldapadd(1) may error:
+
+ adding new entry "uid=XXX,ou=People,o=campus,c=ru"
+ ldap_add: Internal (implementation specific) error (80)
+ additional info: no structuralObjectClass operational attribute
+
+when slapd(8) cannot determine, based upon the contents of the objectClass attribute, what the structural class of the object should be.
+While this normally should produce an object class violation error, some versions of slapd(8) contain a minor bug which cause the object class error not to be properly detected. In these versions, slapd(8) instead catches its failure to populate the structuralObjectClass operational attribute (hence the internal error). Kurt@OpenLDAP.org See also: (Xref) ldap add: invalid structural object class chain Kurt@OpenLDAP.org
+
+OpenLDAP's slapd checks for naming attributes and distinguished values consistency, according to RFC 4512.
+Naming attributes are those attributeTypes that appear in an entry's RDN; distinguished values are the values of the naming attributes that appear in an entry's RDN, e.g, in
+
+ cn=Someone+mail=someone@example.com,dc=example,dc=com
+
+the naming attributes are cn and mail, and the distinguished values are Someone and someone@example.com.
+OpenLDAP's slapd checks for consistency when:
+
+- adding an entry
+
- modifying an entry, if the values of the naming attributes are changed
+
- renaming an entry, if the RDN of the entry changes
+Possible causes of error are:
+
+- the naming attributes are not present in the entry; for example:
+
+ dn: dc=example,dc=com
+ objectClass: organization
+ o: Example
+ # note: "dc: example" is missing
+
+
+- the naming attributes are present in the entry, but in the attributeType definition they are marked as: o collective o operational o obsolete
+
- the naming attributes are present in the entry, but the distinguished values are not; for example:
+
+ dn: dc=example,dc=com
+ objectClass: domain
+ dc: foobar
+ # note: "dc" is present, but the value is not "example"
+
+
+- the naming attributes are present in the entry, with the distinguished values, but the naming attributes: o do not have an equality field, so equality cannot be asserted o the matching rule is not supported (yet) o the matching rule is not appropriate
+
- the given distinguished values do not comply with their syntax
+
- other errors occurred during the validation/normalization/match process; this is a catchall: look at previous logs for details in case none of the above apply to your case.
+In any case, make sure that the attributeType definition for the naming attributes contains an appropriate EQUALITY field; or that of the superior, if they are defined based on a superior attributeType (look at the SUP field). See RFC 4512 for details. ando@sys-net.it, Kurt@OpenLDAP.org
+
+If the target entry name places is not within any of the databases the server is configured to hold and the server has no knowledge of a global superior, the server will indicate it is unwilling to perform the operation and provide the text "no global superior knowledge" as additional text.
+Likely the entry name is incorrect, or the server is not properly configured to hold the named entry, or, in distributed directory environments, a default referral was not configured. Kurt@OpenLDAP.org
+
+Current versions of slapd(8) requires that clients have authentication permission to attribute types used for authentication purposes before accessing them to perform the bind operation. As all bind operations are done anonymously (regardless of previous bind success), the auth access must be granted to anonymous.
+In the example ACL below grants the following access:
+
+- to anonymous users: o permission to authenticate using values of userPassword
+
- to authenticated users: o permission to update (but not read) their userPassword o permission to read any object excepting values of userPassword
+All other access is denied.
+
+ access to attr=userPassword
+ by self =w
+ by anonymous auth
+ access *
+ by self write
+ by users read
+
+Note that latest versions of slapd(8) will report invalid credentials in cases where the client has insufficient access to complete the operation. This is avoid inappropriate disclosure of the validity of the user's name. See also: ldapadd(1) ldapdelete(1) ldapmodify(1) ldapmodrdn(1) ldapsearch(1) slapd.conf(5) (Xref) Access Control
+
+The error usually occurs when the credentials (password) provided does not match the userPassword held in entry you are binding to.
+The error can also occur when the bind DN specified is not known to the server.
+Check both! In addition to the cases mentioned above you should check if the server denied access to userPassword on selected parts of the directory. In fact, slapd always returns "Invalid credentials" in case of failed bind, regardless of the failure reason, since other return codes could reveal the validity of the user's name.
+To debug access rules defined in slapd.conf, add "ACL" to log level. See also: ldapadd(1) ldapdelete(1) ldapmodify(1) ldapmodrdn(1) ldapsearch(1) slapd.conf(5) (Xref) ldap_bind: No such object
+
+This answer is specific to OpenLDAP 1.2 and earlier releases. In later releases, ldap_bind returns (Xref) ldap_bind: Invalid credentials instead. 'No such object' is only returned by ldap_bind operation in a few special cases. Normally, the server returns (Xref) ldap_bind: Invalid credentials when the entry associated with the bind DN cannot be located. This error occurs when binding using the rootdn and the asserted value doesn't match configured password value. Rootpw values must be conform to RFC 2307 format defined for userPassword. See also: ldapadd(1) ldapdelete(1) ldapmodify(1) ldapmodrdn(1) ldapsearch(1) slapd.conf(5) (Xref) ldap_bind: Invalid credentials
+
+There error is generally occurs when the LDAP version requested by the client is not supported by the server.
+The OpenLDAP Software 1.x server only accepts version 2 LDAP Bind requests. Note that 1.x server expects U-Mich LDAP, an LDAPv2 variant, to be used. This variant is sometimes referred to as LDAPv2+.
+The OpenLDAP Software 2.x server, by default, only accepts version 3 LDAP Bind requests but can be configured to accept a version 2 LDAP Bind request. Note that the 2.x server expects LDAPv3 [RFC4510] to be used when the client requests version 3 and expects a limited LDAPv3 variant (basically, LDAPv3 syntax and semantics in an LDAPv2 PDUs) to be used when version 2 is expected. This variant is also sometimes referred to as LDAPv2+, but differs from the U-Mich LDAP variant in a number of ways.
+Use of LDAPv3! See also: (Xref) How to configure slapd(8) with LDAPv2 support (for legacy clients)?.
+
+This message is commonly returned when attempting to modify the objectClass attribute in a manner inconsistent with the LDAP/X.500 information model. In particular, it commonly occurs when one tries to change the structure of the object from one class to another, for instance, trying to change an 'apple' into a 'pear' or a 'fruit' into a 'pear'. Such changes are disallowed by the slapd(8) in accordance with LDAP and X.500 restrictions.
+To overcome this restriction in 2.3 (and prior releases), one must re-create the object with the desired new structural object class (e.g., delete old object then add new object). In 2.4, support for a new control will (hopefully) be introduced to allow the (authorized) user to request this (and various other model restrictions) be temporarily relaxed.
+
+If you intended to bind using a DN and password and get an error from ldap_sasl_interactive_bind_s, you likely forgot to provide a '-x' option to the command. By default, SASL authentication is used. '-x' is necessary to select "simple" authentication. Kurt@OpenLDAP.org
+
+This indicates that LDAP SASL authentication function could not read the Root DSE. The error will occur when the server doesn't provide a root DSE. This may be due to access controls.
+Note, also, that LDAPv2 servers, such as those OpenLDAP 1.x's slapd(8), do not provide a root DSE. Use -P 2 when LDAPv2 is desired. LDAPv2 servers also do not support SASL binds, so you will need to use a "simple" bind instead.
+
+Note: SASL bind is the default for all OpenLDAP tools. To force use of "simple" bind, use the "-x" option. Use of "simple" bind is not recommended unless one has adequate confidentiality protection in place (e.g. TLS/SSL, IPSEC).
+
+
+This indicates that LDAP SASL authentication function could read the Root DSE but it contained no supportedSASLMechanism attribute. The supportedSASLmechanism attribute lists mechanisms currently available. The list may be empty because none of the supported mechanisms are currently available. For example, EXTERNAL is listed only if the client has established its identity by authenticating at a lower level (e.g. TLS).
+
+Note: the attribute may not be visible due to access controls
+
+
+Note: SASL bind is the default for all OpenLDAP tools, e.g. ldapsearch(1), ldapmodify(1). To force use of "simple" bind, use the "-x" option. Use of "simple" bind is not recommended unless one has adequate confidentiality protection in place (e.g. TLS/SSL, IPSEC).
+
+
+This indicates that none of the SASL authentication supported by the server are supported by the client, or that they are too weak or otherwise inappropriate for use by the client. Note that the default security options disallows the use of certain mechanisms such as ANONYMOUS and PLAIN (without TLS).
+
+Note: SASL bind is the default for all OpenLDAP tools. To force use of "simple" bind, use the "-x" option. Use of "simple" bind is not recommended unless one has adequate confidentiality protection in place (e.g. TLS/SSL, IPSEC).
+
+
+Apparently not having forward and reverse DNS entries for the LDAP server can result in this error.
+
+This error is returned with the server responses to an LDAPv2 search query with both results (zero or more matched entries) and references (referrals to other servers). See also: ldapsearch(1). If the updatedn on the replica does not exist, a referral will be returned. It may do this as well if the ACL needs tweaking.
+
+ldapsearch(1) and other tools will return
+
+ ldap_start_tls: Operations error (1)
+ additional info: TLS already started
+
+when the user (though command line options and/or ldap.conf(5)) has requested TLS (SSL) be started twice. For instance, when specifying both "-H ldaps://server.do.main" and "-ZZ".
+
+
+This slapd error generally indicates that the client sent a message that exceeded an administrative limit. See sockbuf_max_incoming and sockbuf_max_incoming_auth configuration directives in slapd.conf(5).
+
+This message is not indicative of abnormal behavior or error. It simply means that expected data is not yet available from the resource, in this context, a network socket. slapd(8) will process the data once it does becomes available.
+
+This message indicates that the operating system does not support one of the (protocol) address families which slapd(8) was configured to support. Most commonly, this occurs when slapd(8) was configured to support IPv6 yet the operating system kernel wasn't. In such cases, the message can be ignored.
+
+This message means that slapd is not running as root and, thus, it cannot get its Kerberos 5 key from the keytab, usually file /etc/krb5.keytab.
+A keytab file is used to store keys that are to be used by services or daemons that are started at boot time. It is very important that these secrets are kept beyond reach of intruders.
+That's why the default keytab file is owned by root and protected from being read by others. Do not mess with these permissions, build a different keytab file for slapd instead.
+To do this, start kadmin, and enter the following commands:
+
+- addprinc -randkey ldap/ldap.example.com@EXAMPLE.COM
+
- ktadd -k /etc/openldap/ldap.keytab ldap/ldap.example.com@EXAMPLE.COM
+Then, on the shell, do:
+
+- chown ldap.ldap /etc/openldap/ldap.keytab
+
- chmod 600 /etc/openldap/ldap.keytab
+Now you have to tell slapd (well, actually tell the gssapi library in Kerberos 5 that is invoked by Cyrus SASL) where to find the new keytab. You do this by setting the environment variable KRB5_KTNAME like this:
+export KRB5_KTNAME="FILE:/etc/openldap/ldap.keytab"
+Set that environment variable on the slapd start script (Red Hat users might find /etc/sysconfig/ldap a perfect place). jsanchez@openldap.org, hyc@openldap.org This only works if you are using MIT kerberos. It doesn't work with Heimdal, for instance. andreas@conectiva.com.br In Heimdal there is a function gsskrb5_register_acceptor_identity() that sets the path of the keytab file you want to use. In Cyrus SASL 2 you can add
+keytab: /path/to/file
+to your application's SASL config file to use this feature. This only works with Heimdal. hyc@openldap.org
+
+This related to TCP wrappers. See hosts_access(5) for more information. in the log file: "access from unknown denied" This related to TCP wrappers. See hosts_access(5) for more information. for example: add the line "slapd: .hosts.you.want.to.allow" in /etc/hosts.allow to get rid of the error.
+
+This message occurs normally. It means that pending data is not yet available from the resource, a network socket. slapd(8) will process the data once it becomes available.
+
+Some times, `make test' fails at the very first test with an obscure message like
+make test make[1]: Entering directory `/ldap_files/openldap-2.2.13/tests' make[2]: Entering directory `/ldap_files/openldap-2.2.13/tests' Initiating LDAP tests for BDB... Cleaning up test run directory leftover from previous run. Running ./scripts/all...
+
+>>>> Executing all LDAP tests for bdb
+>>>> Starting test000-rootdse ... running defines.sh Starting slapd on TCP/IP port 9011... Using ldapsearch to retrieve the root DSE... Waiting 5 seconds for slapd to start...
+
+
+/scripts/test000-rootdse: line 40: 10607 Segmentation fault $SLAPD -f $CONF1 -h $URI1 -d $LVL $TIMING >$LOG1 2>&1 Waiting 5 seconds for slapd to start... Waiting 5 seconds for slapd to start... Waiting 5 seconds for slapd to start... Waiting 5 seconds for slapd to start... Waiting 5 seconds for slapd to start...
+
+/scripts/test000-rootdse: kill: (10607) - No such pid ldap_bind: Can't contact LDAP server (-1)
+
+>>>> Test failed
+>>>> ./scripts/test000-rootdse failed (exit 1) make[2]: *** [bdb-yes] Error 1 make[2]: Leaving directory `/ldap_files/openldap-2.2.13/tests' make[1]: *** [test] Error 2 make[1]: Leaving directory `/ldap_files/openldap-2.2.13/tests' make: *** [test] Error 2
+
+or so. Usually, the five lines
+Waiting 5 seconds for slapd to start...
+indicate that slapd didn't start at all.
+For OpenLDAP 2.2 and later, in tests/testrun/slapd.1.log there is a full log of what slapd wrote while trying to start. The log level can be increased by setting the environment variable SLAPD_DEBUG to the corresponding value; see loglevel in slapd.conf(5) for the meaning of log levels.
+A typical reason for this behavior is a runtime link problem, i.e. slapd cannot find some dynamic libraries it was linked against. Try running ldd(1) on slapd (for those architectures that support runtime linking).
+There might well be other reasons; the contents of the log file should help clarifying them.
+Tests that fire up multiple instances of slapd typically log to tests/testrun/slapd.<n>.log, with a distinct <n> for each instance of slapd; list tests/testrun/ for possible values of <n>. ando@sys-net.it
+
+This seems to be related with wrong ownership of the BDB's dir (/var/lib/ldap) and files. chmod -r openldap:openldap /var/lib/ldap fixes it in Debian Etch. I don't really know how the wrong permission went into place, but I suspect it has something to do with slapd's starting, no database existing (I had deleted it to get a new, fresh one), and slapd creating one before chroot. After a bug report, some insightful feedback, and some amount of testing, i found out that the 'wrong ownership of new files' problem is not with slapd but with slapadd. This happens when one initially populates the Directory. Oh, and the right switch of chown is '-R', not '-r'. My God! What a mess! The right command to correct this problem is: chown -R /var/lib/ldap
+pedrorandrade@gmail.com
+
+Using SASL, when a client contacts LDAP server, the slapd service dies immediately and client gets an error : SASL/GSSAPI authentication started ldap_sasl_interactive_bind_s: Can't contact LDAP server (-1) Then check the slapd service, it stopped. This may come from incompatible of using different versions of BerkeleyDB for installing of SASL and installing of OpenLDAP. The problem arises in case of using multiple version of BerkeleyDB. Solution: - Check which version of BerkeleyDB when install Cyrus SASL. - Reinstall OpenLDAP with the version of BerkeleyDB above. It was my case and that was the solution I did and it worked :) Hope this gives you some information.
+
+
+
+
+This appendix details the recommended versions of the software that OpenLDAP depends on.
+Please read the Prerequisite software section for more information on the following software dependencies.
+
+
+Table 8.5: OpenLDAP Software Dependency Versions
+
+
+Feature
+ |
+
+Software
+ |
+
+Version
+ |
+
+
+
+ Transport Layer Security:
+ |
+
+
+ |
+
+
+ |
+
+
+
+
+ |
+
+ OpenSSL
+ |
+
+0.9.7+
+ |
+
+
+
+
+ |
+
+ GnuTLS
+ |
+
+2.0.1
+ |
+
+
+
+ Simple Authentication and Security Layer
+ |
+
+ Cyrus SASL
+ |
+
+2.1.21+
+ |
+
+
+
+ Kerberos Authentication Service:
+ |
+
+
+ |
+
+
+ |
+
+
+
+
+ |
+
+ Heimdal
+ |
+
+Version
+ |
+
+
+
+
+ |
+
+ MIT Kerberos
+ |
+
+Version
+ |
+
+
+
+Database Software
+ |
+
+ Berkeley DB:
+ |
+
+
+ |
+
+
+
+
+ |
+
+
+ |
+
+4.2
+ |
+
+
+
+
+ |
+
+
+ |
+
+4.4
+ |
+
+
+
+
+ |
+
+
+ |
+
+4.5
+ |
+
+
+
+
+ |
+
+
+ |
+
+4.6
+ |
+
+
+
+
+ |
+
+
+ |
+
+Note: It is highly recommended to apply the patches from for a given release.
+ |
+
+
+
+Threads:
+ |
+
+
+ |
+
+
+ |
+
+
+
+
+ |
+
+POSIX pthreads
+ |
+
+Version
+ |
+
+
+
+
+ |
+
+Mach CThreads
+ |
+
+Version
+ |
+
+
+
+TCP Wrappers
+ |
+
+Name
+ |
+
+Version
+ |
+
+
+
+
+
+
+Examples and discussions
+
+
+
+The following sections attempt to summarize the various contributions in OpenLDAP software, as found in openldap_src/contrib
+
+Intro and discuss
+
+Intro and discuss
+
+Intro and discuss
+
+Intro and complete/expand correct names for below:
+
+
+
+
+
+
+
+
+
+
+
+
+Intro and discuss
+
+statslog
+
+Intro and discuss
+
+More
+
+
+
+
+
+
+
+
+
+For the purposes of this guide, we have incorporated the standard LDAP result codes from Appendix A. LDAP Result Codes of rfc4511. A copy of which can be found in doc/rfc of the OpenLDAP source code.
+We have expanded the description of each error in relation to the OpenLDAP toolsets.
+
+These result codes (called "non-error" result codes) do not indicate an error condition:
+
+ success (0),
+ compareFalse (5),
+ compareTrue (6),
+ referral (10), and
+ saslBindInProgress (14).
+
+The success, compareTrue, and compareFalse result codes indicate successful completion (and, hence, are referred to as "successful" result codes).
+The referral and saslBindInProgress result codes indicate the client needs to take additional action to complete the operation.
+
+Existing LDAP result codes are described as follows:
+
+Indicates the successful completion of an operation.
+
+Note: this code is not used with the Compare operation. See compareFalse (5) and compareTrue (6).
+
+
+Indicates that the operation is not properly sequenced with relation to other operations (of same or different type).
+For example, this code is returned if the client attempts to StartTLS [RFC4346] while there are other uncompleted operations or if a TLS layer was already installed.
+
+Indicates the server received data that is not well-formed.
+For Bind operation only, this code is also used to indicate that the server does not support the requested protocol version.
+For Extended operations only, this code is also used to indicate that the server does not support (by design or configuration) the Extended operation associated with the requestName.
+For request operations specifying multiple controls, this may be used to indicate that the server cannot ignore the order of the controls as specified, or that the combination of the specified controls is invalid or unspecified.
+
+Indicates that the time limit specified by the client was exceeded before the operation could be completed.
+
+Indicates that the size limit specified by the client was exceeded before the operation could be completed.
+
+Indicates that the Compare operation has successfully completed and the assertion has evaluated to FALSE or Undefined.
+
+Indicates that the Compare operation has successfully completed and the assertion has evaluated to TRUE.
+
+Indicates that the authentication method or mechanism is not supported.
+
+Indicates the server requires strong(er) authentication in order to complete the operation.
+When used with the Notice of Disconnection operation, this code indicates that the server has detected that an established security association between the client and server has unexpectedly failed or been compromised.
+
+Indicates that a referral needs to be chased to complete the operation (see Section 4.1.10).
+
+Indicates that an administrative limit has been exceeded.
+
+Indicates a critical control is unrecognized (see Section 4.1.11).
+
+Indicates that data confidentiality protections are required.
+
+Indicates the server requires the client to send a new bind request, with the same SASL mechanism, to continue the authentication process (see Section 4.2).
+
+Indicates that the named entry does not contain the specified attribute or attribute value.
+
+Indicates that a request field contains an unrecognized attribute description.
+
+Indicates that an attempt was made (e.g., in an assertion) to use a matching rule not defined for the attribute type concerned.
+
+Indicates that the client supplied an attribute value that does not conform to the constraints placed upon it by the data model.
+For example, this code is returned when multiple values are supplied to an attribute that has a SINGLE-VALUE constraint.
+
+Indicates that the client supplied an attribute or value to be added to an entry, but the attribute or value already exists.
+
+Indicates that a purported attribute value does not conform to the syntax of the attribute.
+
+Indicates that the object does not exist in the DIT.
+
+Indicates that an alias problem has occurred. For example, the code may used to indicate an alias has been dereferenced that names no object.
+
+Indicates that an LDAPDN or RelativeLDAPDN field (e.g., search base, target entry, ModifyDN newrdn, etc.) of a request does not conform to the required syntax or contains attribute values that do not conform to the syntax of the attribute's type.
+
+Indicates that a problem occurred while dereferencing an alias. Typically, an alias was encountered in a situation where it was not allowed or where access was denied.
+
+Indicates the server requires the client that had attempted to bind anonymously or without supplying credentials to provide some form of credentials.
+
+Indicates that the provided credentials (e.g., the user's name and password) are invalid.
+
+Indicates that the client does not have sufficient access rights to perform the operation.
+
+Indicates that the server is too busy to service the operation.
+
+Indicates that the server is shutting down or a subsystem necessary to complete the operation is offline.
+
+Indicates that the server is unwilling to perform the operation.
+
+Indicates that the server has detected an internal loop (e.g., while dereferencing aliases or chaining an operation).
+
+Indicates that the entry's name violates naming restrictions.
+
+Indicates that the entry violates object class restrictions.
+
+Indicates that the operation is inappropriately acting upon a non-leaf entry.
+
+Indicates that the operation is inappropriately attempting to remove a value that forms the entry's relative distinguished name.
+
+Indicates that the request cannot be fulfilled (added, moved, or renamed) as the target entry already exists.
+
+Indicates that an attempt to modify the object class(es) of an entry's 'objectClass' attribute is prohibited.
+For example, this code is returned when a client attempts to modify the structural object class of an entry.
+
+Indicates that the operation cannot be performed as it would affect multiple servers (DSAs).
+
+Indicates the server has encountered an internal error.
+
+
+
+
+
+
+
+Term
+ |
+
+Definition
+ |
+
+
+
+3DES
+ |
+
+Triple DES
+ |
+
+
+
+ABNF
+ |
+
+Augmented Backus-Naur Form
+ |
+
+
+
+ACDF
+ |
+
+Access Control Decision Function
+ |
+
+
+
+ACE
+ |
+
+ASCII Compatible Encoding
+ |
+
+
+
+ASCII
+ |
+
+American Standard Code for Information Interchange
+ |
+
+
+
+ACID
+ |
+
+Atomicity, Consistency, Isolation, and Durability
+ |
+
+
+
+ACI
+ |
+
+Access Control Information
+ |
+
+
+
+ACL
+ |
+
+Access Control List
+ |
+
+
+
+AES
+ |
+
+Advance Encryption Standard
+ |
+
+
+
+ABI
+ |
+
+Application Binary Interface
+ |
+
+
+
+API
+ |
+
+Application Program Interface
+ |
+
+
+
+ASN.1
+ |
+
+Abstract Syntax Notation - One
+ |
+
+
+
+AVA
+ |
+
+Attribute Value Assertion
+ |
+
+
+
+AuthcDN
+ |
+
+Authentication DN
+ |
+
+
+
+AuthcId
+ |
+
+Authentication Identity
+ |
+
+
+
+AuthzDN
+ |
+
+Authorizaiton DN
+ |
+
+
+
+AuthzId
+ |
+
+Authorization Identity
+ |
+
+
+
+BCP
+ |
+
+Best Current Practice
+ |
+
+
+
+BDB
+ |
+
+Berkeley DB (Backend)
+ |
+
+
+
+BER
+ |
+
+Basic Encoding Rules
+ |
+
+
+
+BNF
+ |
+
+Backus-Naur Form
+ |
+
+
+
+C
+ |
+
+The C Programming Language
+ |
+
+
+
+CA
+ |
+
+Certificate Authority
+ |
+
+
+
+CER
+ |
+
+Canonical Encoding Rules
+ |
+
+
+
+CLDAP
+ |
+
+Connection-less LDAP
+ |
+
+
+
+CN
+ |
+
+Common Name
+ |
+
+
+
+CRAM-MD5
+ |
+
+SASL MD5 Challedge/Response Authentication Mechanism
+ |
+
+
+
+CRL
+ |
+
+Certificate Revocation List
+ |
+
+
+
+DAP
+ |
+
+Directory Access Protocol
+ |
+
+
+
+DC
+ |
+
+Domain Component
+ |
+
+
+
+DER
+ |
+
+Distinguished Encoding Rules
+ |
+
+
+
+DES
+ |
+
+Data Encryption Standard
+ |
+
+
+
+DIB
+ |
+
+Directory Information Base
+ |
+
+
+
+DIGEST-MD5
+ |
+
+SASL Digest MD5 Authentication Mechanism
+ |
+
+
+
+DISP
+ |
+
+Directory Information Shadowing Protocol
+ |
+
+
+
+DIT
+ |
+
+Directory Information Tree
+ |
+
+
+
+DNS
+ |
+
+Domain Name System
+ |
+
+
+
+DN
+ |
+
+Distinguished Name
+ |
+
+
+
+DOP
+ |
+
+Directory Operational Binding Management Protocol
+ |
+
+
+
+DSAIT
+ |
+
+DSA Information Tree
+ |
+
+
+
+DSA
+ |
+
+Directory System Agent
+ |
+
+
+
+DSE
+ |
+
+DSA-specific Entry
+ |
+
+
+
+DSP
+ |
+
+Directory System Protocol
+ |
+
+
+
+DS
+ |
+
+Draft Standard
+ |
+
+
+
+DUA
+ |
+
+Directory User Agent
+ |
+
+
+
+EXTERNAL
+ |
+
+SASL External Authentication Mechanism
+ |
+
+
+
+FAQ
+ |
+
+Frequently Asked Questions
+ |
+
+
+
+FTP
+ |
+
+File Transfer Protocol
+ |
+
+
+
+FYI
+ |
+
+For Your Information
+ |
+
+
+
+GSER
+ |
+
+Generic String Encoding Rules
+ |
+
+
+
+GSS-API
+ |
+
+Generic Security Service Application Program Interface
+ |
+
+
+
+GSSAPI
+ |
+
+SASL Kerberos V GSS-API Authentication Mechanism
+ |
+
+
+
+HDB
+ |
+
+Hierarchical Database (Backend)
+ |
+
+
+
+I-D
+ |
+
+Internet-Draft
+ |
+
+
+
+IA5
+ |
+
+International Alphabet 5
+ |
+
+
+
+IDNA
+ |
+
+Internationalized Domain Names in Applications
+ |
+
+
+
+IDN
+ |
+
+Internationalized Domain Name
+ |
+
+
+
+ID
+ |
+
+Identifier
+ |
+
+
+
+IDL
+ |
+
+Index Data Lookups
+ |
+
+
+
+IP
+ |
+
+Internet Protocol
+ |
+
+
+
+IPC
+ |
+
+Inter-process communication
+ |
+
+
+
+IPsec
+ |
+
+Internet Protocol Security
+ |
+
+
+
+IPv4
+ |
+
+Internet Protocol, version 4
+ |
+
+
+
+IPv6
+ |
+
+Internet Protocol, version 6
+ |
+
+
+
+ITS
+ |
+
+Issue Tracking System
+ |
+
+
+
+JPEG
+ |
+
+Joint Photographic Experts Group
+ |
+
+
+
+Kerberos
+ |
+
+Kerberos Authentication Service
+ |
+
+
+
+LBER
+ |
+
+Lightweight BER
+ |
+
+
+
+LDAP
+ |
+
+Lightweight Directory Access Protocol
+ |
+
+
+
+LDAP Sync
+ |
+
+LDAP Content Sychronization
+ |
+
+
+
+LDAPv3
+ |
+
+LDAP, version 3
+ |
+
+
+
+LDIF
+ |
+
+LDAP Data Interchange Format
+ |
+
+
+
+MD5
+ |
+
+Message Digest 5
+ |
+
+
+
+MIB
+ |
+
+Management Information Base
+ |
+
+
+
+MODDN
+ |
+
+Modify DN
+ |
+
+
+
+MODRDN
+ |
+
+Modify RDN
+ |
+
+
+
+NSSR
+ |
+
+Non-specific Subordinate Reference
+ |
+
+
+
+OID
+ |
+
+Object Identifier
+ |
+
+
+
+OSI
+ |
+
+Open Systems Interconnect
+ |
+
+
+
+OTP
+ |
+
+One Time Password
+ |
+
+
+
+PDU
+ |
+
+Protocol Data Unit
+ |
+
+
+
+PEM
+ |
+
+Privacy Enhanced eMail
+ |
+
+
+
+PEN
+ |
+
+Private Enterprise Number
+ |
+
+
+
+PKCS
+ |
+
+Public Key Cryptosystem
+ |
+
+
+
+PKI
+ |
+
+Public Key Infrastructure
+ |
+
+
+
+PKIX
+ |
+
+Public Key Infrastructure (X.509)
+ |
+
+
+
+PLAIN
+ |
+
+SASL Plaintext Password Authentication Mechanism
+ |
+
+
+
+POSIX
+ |
+
+Portable Operating System Interface
+ |
+
+
+
+PS
+ |
+
+Proposed Standard
+ |
+
+
+
+RDN
+ |
+
+Relative Distinguished Name
+ |
+
+
+
+RFC
+ |
+
+Request for Comments
+ |
+
+
+
+RPC
+ |
+
+Remote Procedure Call
+ |
+
+
+
+RXER
+ |
+
+Robust XML Encoding Rules
+ |
+
+
+
+SASL
+ |
+
+Simple Authentication and Security Layer
+ |
+
+
+
+SDF
+ |
+
+Simple Document Format
+ |
+
+
+
+SDSE
+ |
+
+Shadowed DSE
+ |
+
+
+
+SHA1
+ |
+
+Secure Hash Algorithm 1
+ |
+
+
+
+SLAPD
+ |
+
+Standalone LDAP Daemon
+ |
+
+
+
+SLURPD
+ |
+
+Standalone LDAP Update Replication Daemon
+ |
+
+
+
+SMTP
+ |
+
+Simple Mail Transfer Protocol
+ |
+
+
+
+SNMP
+ |
+
+Simple Network Management Protocol
+ |
+
+
+
+SQL
+ |
+
+Structured Query Language
+ |
+
+
+
+SRP
+ |
+
+Secure Remote Password
+ |
+
+
+
+SSF
+ |
+
+Security Strength Factor
+ |
+
+
+
+SSL
+ |
+
+Secure Socket Layer
+ |
+
+
+
+STD
+ |
+
+Internet Standard
+ |
+
+
+
+TCP
+ |
+
+Transmission Control Protocol
+ |
+
+
+
+TLS
+ |
+
+Transport Layer Security
+ |
+
+
+
+UCS
+ |
+
+Universal Multiple-Octet Coded Character Set
+ |
+
+
+
+UDP
+ |
+
+User Datagram Protocol
+ |
+
+
+
+UID
+ |
+
+User Identifier
+ |
+
+
+
+Unicode
+ |
+
+The Unicode Standard
+ |
+
+
+
+UNIX
+ |
+
+Unix
+ |
+
+
+
+URI
+ |
+
+Uniform Resource Identifier
+ |
+
+
+
+URL
+ |
+
+Uniform Resource Locator
+ |
+
+
+
+URN
+ |
+
+Uniform Resource Name
+ |
+
+
+
+UTF-8
+ |
+
+8-bit UCS/Unicode Transformation Format
+ |
+
+
+
+UTR
+ |
+
+Unicode Technical Report
+ |
+
+
+
+UUID
+ |
+
+Universally Unique Identifier
+ |
+
+
+
+WWW
+ |
+
+World Wide Web
+ |
+
+
+
+X.500
+ |
+
+X.500 Directory Services
+ |
+
+
+
+X.509
+ |
+
+X.509 Public Key and Attribute Certificate Frameworks
+ |
+
+
+
+XED
+ |
+
+XML Enabled Directory
+ |
+
+
+
+XER
+ |
+
+XML Encoding Rules
+ |
+
+
+
+XML
+ |
+
+Extensible Markup Language
+ |
+
+
+
+syncrepl
+ |
+
+LDAP Sync-based Replication
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Basic Installation
==================
@@ -4572,27 +8645,27 @@ operates.
-
-
-Copyright 1998-2005 The OpenLDAP Foundation.
All rights reserved.
+
+
+Copyright 1998-2007 The OpenLDAP Foundation.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted only as authorized by the OpenLDAP Public License.
A copy of this license is available in file LICENSE in the top-level directory of the distribution or, alternatively, at <http://www.OpenLDAP.org/license.html>.
OpenLDAP is a registered trademark of the OpenLDAP Foundation.
Individual files and/or contributed packages may be copyright by other parties and their use subject to additional restrictions.
-This work is derived from the University of Michigan LDAP v3.3 distribution. Information concerning this software is available at <http://www.umich.edu/~dirsvcs/ldap/>.
+This work is derived from the University of Michigan LDAP v3.3 distribution. Information concerning this software is available at <http://www.umich.edu/~dirsvcs/ldap/ldap.html>.
This work also contains materials derived from public sources.
Additional information about OpenLDAP software can be obtained at <http://www.OpenLDAP.org/>.
-
-Portions Copyright 1998-2005 Kurt D. Zeilenga.
Portions Copyright 1998-2005 Net Boolean Incorporated.
Portions Copyright 2001-2005 IBM Corporation.
All rights reserved.
+
+Portions Copyright 1998-2006 Kurt D. Zeilenga.
Portions Copyright 1998-2006 Net Boolean Incorporated.
Portions Copyright 2001-2006 IBM Corporation.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted only as authorized by the OpenLDAP Public License.
-Portions Copyright 1999-2005 Howard Y.H. Chu.
Portions Copyright 1999-2005 Symas Corporation.
Portions Copyright 1998-2003 Hallvard B. Furuseth.
All rights reserved.
+Portions Copyright 1999-2007 Howard Y.H. Chu.
Portions Copyright 1999-2007 Symas Corporation.
Portions Copyright 1998-2003 Hallvard B. Furuseth.
Portions Copyright 2007 Gavin Henry
Portions Copyright 2007 Suretec Systems
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that this notice is preserved. The names of the copyright holders may not be used to endorse or promote products derived from this software without their specific prior written permission. This software is provided ``as is'' without express or implied warranty.
-
+
Portions Copyright 1992-1996 Regents of the University of Michigan.
All rights reserved.
Redistribution and use in source and binary forms are permitted provided that this notice is preserved and that due credit is given to the University of Michigan at Ann Arbor. The name of the University may not be used to endorse or promote products derived from this software without specific prior written permission. This software is provided ``as is'' without express or implied warranty.
-
+
The OpenLDAP Public License
Version 2.8, 17 August 2003
@@ -4651,7 +8724,7 @@ distribute verbatim copies of this document is granted.
________________
-© Copyright 2005, OpenLDAP Foundation, info@OpenLDAP.org
+© Copyright 2007, OpenLDAP Foundation, info@OpenLDAP.org
diff --git a/ldap.init b/ldap.init
index d7f6311..3f3614c 100644
--- a/ldap.init
+++ b/ldap.init
@@ -1,7 +1,7 @@
#!/bin/bash
#
# ldap This shell script takes care of starting and stopping
-# ldap servers (slapd and slurpd).
+# ldap servers (slapd).
#
# chkconfig: - 27 73
# description: LDAP stands for Lightweight Directory Access Protocol, used \
@@ -23,7 +23,7 @@ fi
SLAPD_LDAP="yes"
SLAPD_LDAPI="no"
SLAPD_LDAPS="no"
-# OPTIONS, SLAPD_OPTIONS, SLURPD_OPTIONS and KTB5_KTNAME are not defined
+# OPTIONS, SLAPD_OPTIONS and KTB5_KTNAME are not defined
# Source an auxiliary options file if we have one
if [ -r /etc/sysconfig/ldap ] ; then
@@ -31,10 +31,8 @@ if [ -r /etc/sysconfig/ldap ] ; then
fi
slapd=/usr/sbin/slapd
-slurpd=/usr/sbin/slurpd
slaptest=/usr/sbin/slaptest
[ -x ${slapd} ] || exit 1
-[ -x ${slurpd} ] || exit 1
RETVAL=0
@@ -99,7 +97,7 @@ function configtest() {
prog=`basename ${slapd}`
ldapuid=`id -u $user`
# Unaccessible database files.
- slaptestflags=
+ slaptestflags=""
for dbdir in `LANG=C egrep '^directory[[:space:]]+[[:print:]]+$' /etc/openldap/slapd.conf | sed s,^directory,,` ; do
for file in `find ${dbdir}/ -not -uid $ldapuid -and \( -name "*.dbb" -or -name "*.gdbm" -or -name "*.bdb" -or -name "__db.*" -or -name "log.*" -or -name alock \)` ; do
echo -n $"$file is not owned by \"$user\"" ; warning ; echo
@@ -107,7 +105,7 @@ function configtest() {
if ! test -s ${dbdir}/id2entry.dbb ; then
if ! test -s ${dbdir}/id2entry.gdbm ; then
if ! test -s ${dbdir}/id2entry.bdb ; then
- slaptestflags=-u
+ slaptestflags="-u"
fi
fi
fi
@@ -167,28 +165,6 @@ function start() {
echo -n $"Starting $prog: "
daemon --check=$prog ${slapd} -h "\"$harg\"" -u ${user} $OPTIONS $SLAPD_OPTIONS
RETVAL=$?
- echo
- if [ $RETVAL -eq 0 ]; then
- if grep -q "^replogfile" /etc/openldap/slapd.conf; then
- prog=`basename ${slurpd}`
- i=1;
- for replogfile in `grep "^replogfile" /etc/openldap/slapd.conf`
- do
- if [ "$replogfile" != "replogfile" ]
- then
- echo -n $"Starting $prog: "
- daemon ${slurpd} -r $replogfile -n $i $SLURPD_OPTIONS
- # make the return value nozero if any of the slurpd failed
- RET=$?
- if [ $RET -ne 0 ] ; then
- RETVAL=$RET
- fi
- i=$[i+1]
- echo
- fi
- done
- fi
- fi
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/ldap
return $RETVAL
}
@@ -199,16 +175,6 @@ function stop() {
echo -n $"Stopping $prog: "
killproc ${slapd}
RETVAL=$?
- echo
- if [ $RETVAL -eq 0 ]; then
- if grep -q "^replogfile" /etc/openldap/slapd.conf; then
- prog=`basename ${slurpd}`
- echo -n $"Stopping $prog: "
- killproc ${slurpd}
- RETVAL=$?
- echo
- fi
- fi
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/ldap /var/run/slapd.args
return $RETVAL
}
@@ -229,13 +195,6 @@ case "$1" in
status)
status ${slapd}
RETVAL=$?
- if grep -q "^replogfile" /etc/openldap/slapd.conf ; then
- status ${slurpd}
- RET=$?
- if [ $RET -ne 0 ] ; then
- RETVAL=$RET;
- fi
- fi
;;
restart)
stop
diff --git a/openldap-2.3.34-quiet-slaptest.patch b/openldap-2.3.34-quiet-slaptest.patch
deleted file mode 100644
index de02adf..0000000
--- a/openldap-2.3.34-quiet-slaptest.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Force slaptest to be quiet when no problem is found. Use -v to display "success" message.
-Patch sent upstream (ITS#4930: slaptest should be quiet on success)
-
---- openldap-2.3.34/servers/slapd/slaptest.c.orig 2007-01-02 22:43:59.000000000 +0100
-+++ openldap-2.3.34/servers/slapd/slaptest.c 2007-04-17 10:54:36.000000000 +0200
-@@ -103,7 +103,8 @@
- }
- }
-
-- fprintf( stderr, "config file testing succeeded\n");
-+ if (verbose)
-+ fprintf( stderr, "config file testing succeeded\n");
-
- slap_tool_destroy();
-
diff --git a/openldap-2.4.6-config.patch b/openldap-2.4.6-config.patch
new file mode 100644
index 0000000..e4fd1ef
--- /dev/null
+++ b/openldap-2.4.6-config.patch
@@ -0,0 +1,117 @@
+diff -up openldap-2.4.6/servers/slapd/slapd.conf.old openldap-2.4.6/servers/slapd/slapd.conf
+--- openldap-2.4.6/servers/slapd/slapd.conf.old 2007-11-20 16:02:19.000000000 +0100
++++ openldap-2.4.6/servers/slapd/slapd.conf 2007-11-20 16:02:26.000000000 +0100
+@@ -2,22 +2,57 @@
+ # See slapd.conf(5) for details on configuration options.
+ # This file should NOT be world readable.
+ #
+-include %SYSCONFDIR%/schema/core.schema
+
+-# Define global ACLs to disable default read access.
++include /etc/openldap/schema/corba.schema
++include /etc/openldap/schema/core.schema
++include /etc/openldap/schema/cosine.schema
++include /etc/openldap/schema/duaconf.schema
++include /etc/openldap/schema/dyngroup.schema
++include /etc/openldap/schema/inetorgperson.schema
++include /etc/openldap/schema/java.schema
++include /etc/openldap/schema/misc.schema
++include /etc/openldap/schema/nis.schema
++include /etc/openldap/schema/openldap.schema
++include /etc/openldap/schema/ppolicy.schema
++include /etc/openldap/schema/collective.schema
++
++# Allow LDAPv2 client connections. This is NOT the default.
++allow bind_v2
+
+ # Do not enable referrals until AFTER you have a working directory
+ # service AND an understanding of referrals.
+ #referral ldap://root.openldap.org
+
+-pidfile %LOCALSTATEDIR%/run/slapd.pid
+-argsfile %LOCALSTATEDIR%/run/slapd.args
++pidfile /var/run/openldap/slapd.pid
++argsfile /var/run/openldap/slapd.args
+
+ # Load dynamic backend modules:
+-# modulepath %MODULEDIR%
+-# moduleload back_bdb.la
+-# moduleload back_hdb.la
+-# moduleload back_ldap.la
++# modulepath /usr/lib/openldap # or /usr/lib64/openldap
++# moduleload accesslog.la
++# moduleload auditlog.la
++# moduleload back_sql.la
++# moduleload denyop.la
++# moduleload dyngroup.la
++# moduleload dynlist.la
++# moduleload lastmod.la
++# moduleload pcache.la
++# moduleload ppolicy.la
++# moduleload refint.la
++# moduleload retcode.la
++# moduleload rwm.la
++# moduleload syncprov.la
++# moduleload translucent.la
++# moduleload unique.la
++# moduleload valsort.la
++
++# The next three lines allow use of TLS for encrypting connections using a
++# dummy test certificate which you can generate by changing to
++# /etc/pki/tls/certs, running "make slapd.pem", and fixing permissions on
++# slapd.pem so that the ldap user or group can read it. Your client software
++# may balk at self-signed certificates, however.
++# TLSCACertificateFile /etc/pki/tls/certs/ca-bundle.crt
++# TLSCertificateFile /etc/pki/tls/certs/slapd.pem
++# TLSCertificateKeyFile /etc/pki/tls/certs/slapd.pem
+
+ # Sample security restrictions
+ # Require integrity protection (prevent hijacking)
+@@ -47,19 +83,41 @@ argsfile %LOCALSTATEDIR%/run/slapd.args
+ # rootdn can always read and write EVERYTHING!
+
+ #######################################################################
+-# BDB database definitions
++# ldbm and/or bdb database definitions
+ #######################################################################
+
+ database bdb
+ suffix "dc=my-domain,dc=com"
+ rootdn "cn=Manager,dc=my-domain,dc=com"
+ # Cleartext passwords, especially for the rootdn, should
+-# be avoid. See slappasswd(8) and slapd.conf(5) for details.
++# be avoided. See slappasswd(8) and slapd.conf(5) for details.
+ # Use of strong authentication encouraged.
+-rootpw secret
++# rootpw secret
++# rootpw {crypt}ijFYNcSNctBYg
++
+ # The database directory MUST exist prior to running slapd AND
+ # should only be accessible by the slapd and slap tools.
+ # Mode 700 recommended.
+-directory %LOCALSTATEDIR%/openldap-data
+-# Indices to maintain
+-index objectClass eq
++directory /var/lib/ldap
++
++# Indices to maintain for this database
++index objectClass eq,pres
++index ou,cn,mail,surname,givenname eq,pres,sub
++index uidNumber,gidNumber,loginShell eq,pres
++index uid,memberUid eq,pres,sub
++index nisMapName,nisMapEntry eq,pres,sub
++
++# Replicas of this database
++#replogfile /var/lib/ldap/openldap-master-replog
++#replica host=ldap-1.example.com:389 starttls=critical
++# bindmethod=sasl saslmech=GSSAPI
++# authcId=host/ldap-master.example.com@EXAMPLE.COM
++
++
++# enable monitoring
++database monitor
++
++# allow onlu rootdn to read the monitor
++access to *
++ by dn.exact="cn=Manager,dc=my-domain,dc=com" read
++ by * none
diff --git a/openldap-ntlm.diff b/openldap-2.4.6-evolution-ntlm.patch
similarity index 74%
rename from openldap-ntlm.diff
rename to openldap-2.4.6-evolution-ntlm.patch
index 1e52f99..754c689 100644
--- a/openldap-ntlm.diff
+++ b/openldap-2.4.6-evolution-ntlm.patch
@@ -1,18 +1,9 @@
-(Note that this patch is not useful on its own... it just adds some
-hooks to work with the LDAP authentication process at a lower level
-than the API otherwise allows. The code that calls these hooks and
-actually drives the NTLM authentication process is in
-lib/e2k-global-catalog.c, and the code that actually implements the
-NTLM algorithms is in xntlm/.)
-
-This is a patch against OpenLDAP 2.2.6. Apply with -p0
-
-
---- include/ldap.h.orig 2004-01-01 13:16:28.000000000 -0500
-+++ include/ldap.h 2004-07-14 11:58:49.000000000 -0400
-@@ -1753,5 +1753,26 @@
- LDAPControl **cctrls ));
+diff -up evo-openldap-2.4.6/include/ldap.h.evolution-ntlm evo-openldap-2.4.6/include/ldap.h
+--- evo-openldap-2.4.6/include/ldap.h.evolution-ntlm 2007-09-01 01:13:53.000000000 +0200
++++ evo-openldap-2.4.6/include/ldap.h 2007-11-02 15:22:49.000000000 +0100
+@@ -2343,5 +2343,26 @@ ldap_parse_session_tracking_control LDAP
+ #endif /* LDAP_CONTROL_X_SESSION_TRACKING */
+/*
+ * hacks for NTLM
@@ -37,28 +28,30 @@ This is a patch against OpenLDAP 2.2.6. Apply with -p0
+
LDAP_END_DECL
#endif /* _LDAP_H */
---- libraries/libldap/Makefile.in.orig 2004-01-01 13:16:29.000000000 -0500
-+++ libraries/libldap/Makefile.in 2004-07-14 13:37:23.000000000 -0400
-@@ -20,7 +20,7 @@
+diff -up evo-openldap-2.4.6/libraries/libldap/Makefile.in.evolution-ntlm evo-openldap-2.4.6/libraries/libldap/Makefile.in
+--- evo-openldap-2.4.6/libraries/libldap/Makefile.in.evolution-ntlm 2007-09-01 01:13:54.000000000 +0200
++++ evo-openldap-2.4.6/libraries/libldap/Makefile.in 2007-11-02 15:24:24.000000000 +0100
+@@ -20,7 +20,7 @@ PROGRAMS = apitest dntest ftest ltest ur
SRCS = bind.c open.c result.c error.c compare.c search.c \
controls.c messages.c references.c extended.c cyrus.c \
modify.c add.c modrdn.c delete.c abandon.c \
-- sasl.c sbind.c kbind.c unbind.c cancel.c \
-+ sasl.c ntlm.c sbind.c kbind.c unbind.c cancel.c \
+- sasl.c sbind.c unbind.c cancel.c \
++ sasl.c ntlm.c sbind.c unbind.c cancel.c \
filter.c free.c sort.c passwd.c whoami.c \
getdn.c getentry.c getattr.c getvalues.c addentry.c \
- request.c os-ip.c url.c sortctrl.c vlvctrl.c \
-@@ -29,7 +29,7 @@
+ request.c os-ip.c url.c pagectrl.c sortctrl.c vlvctrl.c \
+@@ -31,7 +31,7 @@ SRCS = bind.c open.c result.c error.c co
OBJS = bind.lo open.lo result.lo error.lo compare.lo search.lo \
controls.lo messages.lo references.lo extended.lo cyrus.lo \
modify.lo add.lo modrdn.lo delete.lo abandon.lo \
-- sasl.lo sbind.lo kbind.lo unbind.lo cancel.lo \
-+ sasl.lo ntlm.lo sbind.lo kbind.lo unbind.lo cancel.lo \
+- sasl.lo sbind.lo unbind.lo cancel.lo \
++ sasl.lo ntlm.lo sbind.lo unbind.lo cancel.lo \
filter.lo free.lo sort.lo passwd.lo whoami.lo \
getdn.lo getentry.lo getattr.lo getvalues.lo addentry.lo \
- request.lo os-ip.lo url.lo sortctrl.lo vlvctrl.lo \
---- /dev/null 2004-06-30 15:04:37.000000000 -0400
-+++ libraries/libldap/ntlm.c 2004-07-14 13:44:18.000000000 -0400
+ request.lo os-ip.lo url.lo pagectrl.lo sortctrl.lo vlvctrl.lo \
+diff -up /dev/null evo-openldap-2.4.6/libraries/libldap/ntlm.c
+--- /dev/null 2007-11-02 11:28:37.758699524 +0100
++++ evo-openldap-2.4.6/libraries/libldap/ntlm.c 2007-11-02 15:22:49.000000000 +0100
@@ -0,0 +1,137 @@
+/* $OpenLDAP: pkg/ldap/libraries/libldap/ntlm.c,v 1.1.4.10 2002/01/04 20:38:21 kurt Exp $ */
+/*
diff --git a/openldap-2.3.38-multilib.patch b/openldap-2.4.6-multilib.patch
similarity index 52%
rename from openldap-2.3.38-multilib.patch
rename to openldap-2.4.6-multilib.patch
index a375c80..1a2c186 100644
--- a/openldap-2.3.38-multilib.patch
+++ b/openldap-2.4.6-multilib.patch
@@ -1,33 +1,3 @@
-diff -up openldap-2.3.38/doc/man/man8/slurpd.8.orig openldap-2.3.38/doc/man/man8/slurpd.8
---- openldap-2.3.38/doc/man/man8/slurpd.8.orig 2007-01-02 22:43:46.000000000 +0100
-+++ openldap-2.3.38/doc/man/man8/slurpd.8 2007-10-23 15:03:25.000000000 +0200
-@@ -5,7 +5,7 @@
- .SH NAME
- slurpd \- Standalone LDAP Update Replication Daemon
- .SH SYNOPSIS
--.B LIBEXECDIR/slurpd [\-d debug\-level]
-+.B slurpd [\-d debug\-level]
- .B [\-f slapd\-config\-file] [\-r slapd\-replog\-file]
- .B [\-t temp\-dir] [\-o]
- .B
-@@ -131,7 +131,7 @@ just type:
- .LP
- .nf
- .ft tt
-- LIBEXECDIR/slurpd
-+ slurpd
- .ft
- .fi
- .LP
-@@ -144,7 +144,7 @@ on voluminous debugging which will be pr
- .LP
- .nf
- .ft tt
-- LIBEXECDIR/slurpd -f ETCDIR/slapd.conf -d 255
-+ slurpd -f ETCDIR/slapd.conf -d 255
- .ft
- .fi
- .LP
diff -up openldap-2.3.38/doc/man/man8/slapd.8.orig openldap-2.3.38/doc/man/man8/slapd.8
--- openldap-2.3.38/doc/man/man8/slapd.8.orig 2007-01-02 22:43:46.000000000 +0100
+++ openldap-2.3.38/doc/man/man8/slapd.8 2007-10-23 15:03:13.000000000 +0200
diff --git a/openldap-2.4.6-nosql.patch b/openldap-2.4.6-nosql.patch
new file mode 100644
index 0000000..f78ffbf
--- /dev/null
+++ b/openldap-2.4.6-nosql.patch
@@ -0,0 +1,12 @@
+diff -up openldap-2.4.6/build/top.mk.nosql openldap-2.4.6/build/top.mk
+--- openldap-2.4.6/build/top.mk.nosql 2007-09-01 01:13:50.000000000 +0200
++++ openldap-2.4.6/build/top.mk 2007-11-02 14:55:23.000000000 +0100
+@@ -199,7 +199,7 @@ SLAPD_SQL_LDFLAGS = @SLAPD_SQL_LDFLAGS@
+ SLAPD_SQL_INCLUDES = @SLAPD_SQL_INCLUDES@
+ SLAPD_SQL_LIBS = @SLAPD_SQL_LIBS@
+
+-SLAPD_LIBS = @SLAPD_LIBS@ @SLAPD_PERL_LDFLAGS@ @SLAPD_SQL_LDFLAGS@ @SLAPD_SQL_LIBS@ @SLAPD_SLP_LIBS@ @SLAPD_GMP_LIBS@ $(ICU_LIBS)
++SLAPD_LIBS = @SLAPD_LIBS@ @SLAPD_SLP_LIBS@ $(ICU_LIBS)
+
+ # Our Defaults
+ CC = $(AC_CC)
diff --git a/openldap-2.4.6-pie.patch b/openldap-2.4.6-pie.patch
new file mode 100644
index 0000000..ff3fbd2
--- /dev/null
+++ b/openldap-2.4.6-pie.patch
@@ -0,0 +1,15 @@
+Build both slapd as position-independent executables. This really
+should be threaded into the various autotools, but I guess this is what we have
+until that happens, if it happens.
+
+--- openldap-2.2.13/servers/slapd/Makefile.in 2004-04-12 14:07:40.000000000 -0400
++++ openldap-2.2.13/servers/slapd/Makefile.in 2004-06-15 13:45:45.000000000 -0400
+@@ -255,7 +255,7 @@
+ cp slapi/.libs/libslapi.a .
+
+ slapd: $(SLAPD_DEPENDS) @LIBSLAPI@
+- $(LTLINK) -o $@ $(SLAPD_OBJECTS) $(LIBS) \
++ $(LTLINK) -pie -Wl,-z,defs -o $@ $(SLAPD_OBJECTS) $(LIBS) \
+ $(WRAP_LIBS)
+ rm -f $(SLAPTOOLS)
+ for i in $(SLAPTOOLS); do \
diff --git a/openldap.spec b/openldap.spec
index cf2d679..14802ca 100644
--- a/openldap.spec
+++ b/openldap.spec
@@ -1,22 +1,22 @@
%define migtools_version 47
%define db_version 4.4.20
%define ldbm_backend berkeley
-%define version_22 2.2.29
%define version_23 2.3.39
+%define version_24 2.4.6
%define evolution_connector_prefix %{_libdir}/evolution-openldap
%define evolution_connector_includedir %{evolution_connector_prefix}/include
%define evolution_connector_libdir %{evolution_connector_prefix}/%{_lib}
-# For Fedora Core 5, we want 2.2 compatibility.
-%define compat_version %{version_22}
+# For Fedora 9, we want 2.3 compatibility.
+%define compat_version %{version_23}
Summary: The configuration files, libraries, and documentation for OpenLDAP
Name: openldap
-Version: %{version_23}
+Version: %{version_24}
Release: 1%{?dist}
License: OpenLDAP
Group: System Environment/Daemons
-Source0: ftp://ftp.OpenLDAP.org/pub/OpenLDAP/openldap-release/openldap-%{version_23}.tgz
-Source1: ftp://ftp.OpenLDAP.org/pub/OpenLDAP/openldap-release/openldap-%{version_22}.tgz
+Source0: ftp://ftp.OpenLDAP.org/pub/OpenLDAP/openldap-release/openldap-%{version_24}.tgz
+Source1: ftp://ftp.OpenLDAP.org/pub/OpenLDAP/openldap-release/openldap-%{version_23}.tgz
Source2: http://download.oracle.com/berkeley-db/db-%{db_version}.tar.gz
Source3: ftp://ftp.padl.com/pub/MigrationTools-%{migtools_version}.tar.gz
Source4: ldap.init
@@ -27,26 +27,24 @@ Source8: http://www.OpenLDAP.org/doc/admin/guide.html
Source9: README.evolution
Source10: ldap.sysconfig
-# Patches that are still valid for 2.3
-Patch0: openldap-2.3.34-config.patch
+# Patches for 2.4
+Patch0: openldap-2.4.6-config.patch
Patch1: openldap-2.0.11-ldaprc.patch
Patch2: openldap-2.2.13-setugid.patch
-Patch3: openldap-2.2.13-pie.patch
+Patch3: openldap-2.4.6-pie.patch
Patch4: openldap-2.3.11-toollinks.patch
-Patch5: openldap-2.3.11-nosql.patch
+Patch5: openldap-2.4.6-nosql.patch
Patch6: openldap-2.3.19-gethostbyXXXX_r.patch
-Patch7: openldap-2.3.34-quiet-slaptest.patch
Patch8: openldap-2.3.34-pthread.patch
Patch9: openldap-2.3.37-smbk5pwd.patch
-Patch10: openldap-2.3.38-multilib.patch
+Patch10: openldap-2.4.6-multilib.patch
-# Patches for 2.2.29 for the compat-openldap package.
-Patch100: openldap-2.2.13-tls-fix-connection-test.patch
-Patch101: openldap-2.2.23-resolv.patch
-Patch102: openldap-2.2.29-ads.patch
+# Patches for 2.3.39
+Patch100: openldap-2.2.13-pie.patch
+Patch101: openldap-2.3.11-nosql.patch
# Patches for the evolution library
-Patch200: openldap-ntlm.diff
+Patch200: openldap-2.4.6-evolution-ntlm.patch
# Patches for the MigrationTools package
Patch300: MigrationTools-38-instdir.patch
@@ -63,10 +61,10 @@ Patch400: db-4.4.20-1.patch
Patch401: db-4.4.20-2.patch
URL: http://www.openldap.org/
-BuildRoot: %{_tmppath}/%{name}-%{version_23}-root
+BuildRoot: %{_tmppath}/%{name}-%{version_24}-root
BuildRequires: cyrus-sasl-devel >= 2.1, gdbm-devel, libtool >= 1.5.6-2, krb5-devel
BuildRequires: openssl-devel, pam-devel, perl, pkgconfig, tcp_wrappers-devel,
-BuildRequires: unixODBC-devel, libtool-ltdl-devel
+BuildRequires: unixODBC-devel, libtool-ltdl-devel, groff
Requires: glibc >= 2.2.3-48, mktemp
%description
@@ -81,8 +79,8 @@ libraries, and documentation for OpenLDAP.
%package devel
Summary: OpenLDAP development libraries and header files.
Group: Development/Libraries
-Requires: openldap = %{version_23}-%{release}, cyrus-sasl-devel >= 2.1
-Provides: openldap-evolution-devel = %{version_23}-%{release}
+Requires: openldap = %{version_24}-%{release}, cyrus-sasl-devel >= 2.1
+Provides: openldap-evolution-devel = %{version_24}-%{release}
%description devel
The openldap-devel package includes the development libraries and
@@ -96,7 +94,7 @@ customized LDAP clients.
Summary: OpenLDAP servers and related files.
# OpenLDAP server includes Berkeley DB library, which is licensed under Sleepycat and BSD licenses)
License: OpenLDAP and (Sleepycat and BSD)
-Requires: fileutils, make, openldap = %{version_23}-%{release}, openssl, /usr/sbin/useradd, /sbin/chkconfig, /sbin/runuser
+Requires: fileutils, make, openldap = %{version_24}-%{release}, openssl, /usr/sbin/useradd, /sbin/chkconfig, /sbin/runuser
Group: System Environment/Daemons
%description servers
@@ -105,12 +103,12 @@ Protocol) applications and development tools. LDAP is a set of
protocols for accessing directory services (usually phone book style
information, but other information is possible) over the Internet,
similar to the way DNS (Domain Name System) information is propagated
-over the Internet. This package contains the slapd and slurpd servers,
+over the Internet. This package contains the slapd server,
migration scripts, and related files.
%package servers-sql
Summary: OpenLDAP server SQL support module.
-Requires: openldap-servers = %{version_23}-%{release}
+Requires: openldap-servers = %{version_24}-%{release}
Group: System Environment/Daemons
%description servers-sql
@@ -124,7 +122,7 @@ slapd server can use to read data from an RDBMS.
%package clients
Summary: Client programs for OpenLDAP.
-Requires: openldap = %{version_23}-%{release}
+Requires: openldap = %{version_24}-%{release}
Group: Applications/Internet
%description clients
@@ -143,10 +141,10 @@ Summary: OpenLDAP compatibility shared libraries.
Group: System Environment/Libraries
# Require the current OpenLDAP libraries package in an attempt to ensure that
# we have a /etc/openldap/ldap.conf file on the system.
-Requires: openldap = %{version_23}-%{release}
+Requires: openldap = %{version_24}-%{release}
# Why this weirdo version number? We want to ensure that version comparisons
# for this package always sort in the same order as the main openldap package.
-Version: %{version_23}_%{compat_version}
+Version: %{version_24}_%{compat_version}
%description -n compat-openldap
OpenLDAP is an open source suite of LDAP (Lightweight Directory Access
@@ -162,7 +160,7 @@ pushd db-%{db_version}
%patch401 -b .patch2
popd
-pushd openldap-%{version_23}
+pushd openldap-%{version_24}
%patch0 -p1 -b .config
%patch1 -p1 -b .ldaprc
%patch2 -p1 -b .setugid
@@ -170,7 +168,6 @@ pushd openldap-%{version_23}
%patch4 -p1 -b .toollinks
%patch5 -p1 -b .nosql
%patch6 -p1 -b .gethostbyname_r
-%patch7 -p1 -b .quiet-slaptest
%patch8 -p1 -b .pthread
%patch9 -p1 -b .smbk5pwd
%patch10 -p1 -b .multilib
@@ -182,12 +179,12 @@ popd
# non-standard NTLM bind type which is needed to connect to Win2k GC servers
# (Win2k3 supports SASL with DIGEST-MD5, so this shouldn't be needed for those
# servers, though as of version 1.4 the connector doesn't try SASL first).
-if ! cp -al openldap-%{version_23} evo-openldap-%{version_23} ; then
- rm -fr evo-openldap-%{version_23}
- cp -a openldap-%{version_23} evo-openldap-%{version_23}
+if ! cp -al openldap-%{version_24} evo-openldap-%{version_24} ; then
+ rm -fr evo-openldap-%{version_24}
+ cp -a openldap-%{version_24} evo-openldap-%{version_24}
fi
-pushd evo-openldap-%{version_23}
-%patch200 -p0 -b .evolution-ntlm
+pushd evo-openldap-%{version_24}
+%patch200 -p1 -b .evolution-ntlm
popd
pushd MigrationTools-%{migtools_version}
@@ -201,17 +198,16 @@ pushd MigrationTools-%{migtools_version}
%patch307 -p1
popd
-pushd openldap-%{version_22}
-%patch100 -p1 -b .resolv
-%patch101 -p1 -b .CAN-2005-2069
-%patch102 -p1 -b .ads
+pushd openldap-%{version_23}
+%patch100 -p1
+%patch101 -p1
for subdir in build-servers build-compat ; do
mkdir $subdir
ln -s ../configure $subdir
done
popd
-pushd openldap-%{version_23}
+pushd openldap-%{version_24}
for subdir in build-servers build-clients ; do
mkdir $subdir
ln -s ../configure $subdir
@@ -306,11 +302,10 @@ make %{_smp_mflags} LIBTOOL="$libtool"
# Build the servers with Kerberos support (for password checking, mainly).
LIBS=-lpthread; export LIBS
LD_LIBRARY_PATH=${dbdir}/%{_lib}${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}; export LD_LIBRARY_PATH
-pushd openldap-%{version_23}/build-servers
+pushd openldap-%{version_24}/build-servers
build \
--enable-plugins \
--enable-slapd \
- --enable-slurpd \
--enable-multimaster \
--enable-bdb \
--enable-hdb \
@@ -335,10 +330,9 @@ popd
# Build clients without Kerberos password-checking support, which is only
# useful in the server anyway, to avoid stray dependencies.
-pushd openldap-%{version_23}/build-clients
+pushd openldap-%{version_24}/build-clients
build \
--disable-slapd \
- --disable-slurpd \
--enable-shared \
--enable-dynamic \
--enable-static \
@@ -348,10 +342,9 @@ popd
# Build evolution-specific clients just as we would normal clients, except with
# a different installation directory in mind and no shared libraries.
-pushd evo-openldap-%{version_23}
+pushd evo-openldap-%{version_24}
build \
--disable-slapd \
- --disable-slurpd \
--disable-shared \
--disable-dynamic \
--enable-static \
@@ -390,7 +383,7 @@ pushd db-%{db_version}
mv LICENSE LICENSE.bdb-backend
popd
-pushd openldap-%{version_23}/build-servers
+pushd openldap-%{version_24}/build-servers
make install DESTDIR=$RPM_BUILD_ROOT libdir=%{_libdir} LIBTOOL="$libtool" STRIP=""
popd
@@ -403,7 +396,7 @@ popd
# Install clients and shared libraries. Install the evo-specific versions
# first so that any conflicting files are overwritten by generic versions.
-pushd evo-openldap-%{version_23}
+pushd evo-openldap-%{version_24}
make install DESTDIR=$RPM_BUILD_ROOT \
includedir=%{evolution_connector_includedir} \
libdir=%{evolution_connector_libdir} \
@@ -414,7 +407,7 @@ install -m644 \
$RPM_SOURCE_DIR/README.evolution \
$RPM_BUILD_ROOT/%{evolution_connector_prefix}/
popd
-pushd openldap-%{version_23}/build-clients
+pushd openldap-%{version_24}/build-clients
make install DESTDIR=$RPM_BUILD_ROOT libdir=%{_libdir} LIBTOOL="$libtool" STRIP=""
popd
@@ -467,7 +460,7 @@ install -m644 \
$RPM_BUILD_ROOT%{_sysconfdir}/openldap/schema/redhat/
# Move slapd and slurpd out of _libdir
-mv $RPM_BUILD_ROOT/%{_libdir}/sl{apd,urpd} $RPM_BUILD_ROOT/%{_sbindir}/
+mv $RPM_BUILD_ROOT/%{_libdir}/slapd $RPM_BUILD_ROOT/%{_sbindir}/
rm -f $RPM_BUILD_ROOT/%{_sbindir}/slap{acl,add,auth,cat,dn,index,passwd,test}
rm -f $RPM_BUILD_ROOT/%{_libdir}/slap{acl,add,auth,cat,dn,index,passwd,test}
for X in acl add auth cat dn index passwd test; do ln -s slapd $RPM_BUILD_ROOT/%{_sbindir}/slap$X ; done
@@ -485,7 +478,7 @@ rm -f $RPM_BUILD_ROOT/%{_libdir}/openldap/*.a
rm -f $RPM_BUILD_ROOT/%{_libdir}/openldap/*.so
rm -f $RPM_BUILD_ROOT%{_localstatedir}/openldap-data/DB_CONFIG.example
-rmdir $RPM_BUILD_ROOT%{_localstatedir}/openldap-slurp $RPM_BUILD_ROOT%{_localstatedir}/openldap-data
+rmdir $RPM_BUILD_ROOT%{_localstatedir}/openldap-data
%clean
rm -rf $RPM_BUILD_ROOT
@@ -584,17 +577,17 @@ fi
%files
%defattr(-,root,root)
-%doc openldap-%{version_23}/ANNOUNCEMENT
-%doc openldap-%{version_23}/CHANGES
-%doc openldap-%{version_23}/COPYRIGHT
-%doc openldap-%{version_23}/LICENSE
-%doc openldap-%{version_23}/README
+%doc openldap-%{version_24}/ANNOUNCEMENT
+%doc openldap-%{version_24}/CHANGES
+%doc openldap-%{version_24}/COPYRIGHT
+%doc openldap-%{version_24}/LICENSE
+%doc openldap-%{version_24}/README
%attr(0755,root,root) %dir %{_sysconfdir}/openldap
%attr(0755,root,root) %dir %{_sysconfdir}/openldap/cacerts
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/openldap/ldap*.conf
-%attr(0755,root,root) %{_libdir}/liblber-2.3*.so.*
-%attr(0755,root,root) %{_libdir}/libldap-2.3*.so.*
-%attr(0755,root,root) %{_libdir}/libldap_r-2.3*.so.*
+%attr(0755,root,root) %{_libdir}/liblber-2.4*.so.*
+%attr(0755,root,root) %{_libdir}/libldap-2.4*.so.*
+%attr(0755,root,root) %{_libdir}/libldap_r-2.4*.so.*
%attr(0644,root,root) %{_mandir}/man5/ldif.5*
%attr(0644,root,root) %{_mandir}/man5/ldap.conf.5*
%attr(0755,root,root) %dir %{_datadir}/openldap
@@ -604,9 +597,9 @@ fi
%doc openldap-%{compat_version}/ANNOUNCEMENT
%doc openldap-%{compat_version}/COPYRIGHT
%doc openldap-%{compat_version}/LICENSE
-%attr(0755,root,root) %{_libdir}/liblber-2.2.so.*
-%attr(0755,root,root) %{_libdir}/libldap-2.2.so.*
-%attr(0755,root,root) %{_libdir}/libldap_r-2.2.so.*
+%attr(0755,root,root) %{_libdir}/liblber-2.3.so.*
+%attr(0755,root,root) %{_libdir}/libldap-2.3.so.*
+%attr(0755,root,root) %{_libdir}/libldap_r-2.3.so.*
%attr(0755,ldap,ldap) %dir %{_libdir}/compat-openldap
%attr(0755,root,root) %{_libdir}/compat-openldap/slapcat
@@ -617,8 +610,8 @@ fi
%doc TOOLS.migration
%doc db-%{db_version}/LICENSE.bdb-backend
%doc $RPM_SOURCE_DIR/README.upgrading $RPM_SOURCE_DIR/guide.html
-%doc openldap-%{version_23}/contrib/slapd-modules/smbk5pwd/README.smbk5pwd
-%doc openldap-%{version_23}/doc/guide/admin/*.gif
+%doc openldap-%{version_24}/contrib/slapd-modules/smbk5pwd/README.smbk5pwd
+%doc openldap-%{version_24}/doc/guide/admin/*.gif
%ghost %config %{_sysconfdir}/pki/tls/certs/slapd.pem
%attr(0755,root,root) %config %{_sysconfdir}/rc.d/init.d/ldap
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/openldap/ldap*.conf
@@ -641,8 +634,6 @@ fi
%attr(0755,root,root) %{_datadir}/openldap/migration/*.pl
%attr(0755,root,root) %{_datadir}/openldap/migration/*.sh
%attr(0644,root,root) %{_datadir}/openldap/migration/*.txt
-%attr(0755,root,root) %dir %{_datadir}/openldap/ucdata
-%attr(0644,root,root) %dir %{_datadir}/openldap/ucdata/*
%attr(0700,ldap,ldap) %dir /var/lib/ldap
%attr(0755,ldap,ldap) %dir /var/run/openldap
%attr(0755,root,root) %{_libdir}/libslapd_db-*.*.so
@@ -651,8 +642,8 @@ fi
%files servers-sql
%defattr(-,root,root)
-%doc openldap-%{version_23}/servers/slapd/back-sql/docs/*
-%doc openldap-%{version_23}/servers/slapd/back-sql/rdbms_depend
+%doc openldap-%{version_24}/servers/slapd/back-sql/docs/*
+%doc openldap-%{version_24}/servers/slapd/back-sql/rdbms_depend
%attr(0755,root,root) %{_libdir}/openldap/back_sql.la
%attr(0755,root,root) %{_libdir}/openldap/back_sql*.so.*
@@ -663,7 +654,7 @@ fi
%files devel
%defattr(-,root,root)
-%doc openldap-%{version_23}/doc/drafts openldap-%{version_23}/doc/rfc
+%doc openldap-%{version_24}/doc/drafts openldap-%{version_24}/doc/rfc
%attr(0755,root,root) %{_libdir}/libl*.so
%attr(0644,root,root) %{_libdir}/libl*.a
%attr(0644,root,root) %{_includedir}/*
@@ -676,6 +667,9 @@ fi
%attr(0644,root,root) %{evolution_connector_libdir}/*.a
%changelog
+* Fri Nov 2 2007 Jan Safranek 2.4.6-1%{?dist}
+- new upstream version (openldap-2.4)
+
* Mon Nov 5 2007 Jan Safranek 2.3.39-1%{?dist}
- new upstream release
diff --git a/sources b/sources
index 39c84f7..c214e8f 100644
--- a/sources
+++ b/sources
@@ -1,4 +1,4 @@
-6c4c72a1336aa45b463e738034c078d6 openldap-2.2.29.tgz
+e3fec2953c948f6990ccdc3af7bf7f18 openldap-2.3.39.tgz
3faf83eb8482e55979bda47f1d1e6501 MigrationTools-47.tar.gz
33851f01b455cca48aa601956de93c6f db-4.4.20.tar.gz
-e3fec2953c948f6990ccdc3af7bf7f18 openldap-2.3.39.tgz
+4418da48649297587a3d07c987808a5e openldap-2.4.6.tgz