Skip to content

sous-chefs/openldap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

521 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

openldap Cookbook

Cookbook Version CI State OpenCollective OpenCollective License

Configures a server to be an OpenLDAP provider or replication consumer with custom resources. It does not set up LDAP auth clients as there are several ways to do this. We recommend looking at the sssd_ldap cookbook.

Maintainers

This cookbook is maintained by the Sous Chefs. The Sous Chefs are a community of Chef cookbook maintainers working together to maintain important cookbooks. If you’d like to know more please visit sous-chefs.org or come chat with us on the Chef Community Slack in #sous-chefs.

Requirements

Platforms

  • Ubuntu 22.04+
  • Debian 12+
  • RHEL-family 8 NOTE: RHEL 8 removed support for openldap. We provide support via a repository provided by the OSUOSL.
  • Amazon Linux 2023
  • Fedora
  • openSUSE Leap

Chef

  • Chef 15.3+

Cookbooks

  • dpkg_autostart

Migration

This cookbook no longer ships recipes or attributes. See migration.md for the breaking change from openldap::default and node['openldap'] attributes to custom resources.

Resource Properties

This is not an exhaustive list of properties as most are directly comparable to their OpenLDAP equivalents.

Required

  • rootpw

This should be a password hash generated from slappasswd. The default slappasswd command will generate a salted SHA1 hash:

$ slappasswd -s "secretsauce"
{SSHA}6BjlvtSbVCL88li8IorkqMSofkLio58/

Set this property from a wrapper cookbook or data bag value. OpenLDAP will fail to start if this is not set.

Install/Upgrade

  • package_action - The action to be taken for all packages in the install resource. Defaults to :install, but can also be set to :upgrade.

General configuration

  • schemas - Array of LDAP schema file names to load
  • modules - Array of slapd modules names to load
  • indexes - Array of indexes to use
  • admin_cn - Admin CN name administrators (default)
  • user_attrs - User access attributes userPassword,shadowLastChange (default)

TLS/SSL

If ldaps_enabled or tls_enabled are set, then tls_cert and tls_key must also be set and the files must exist prior to execution. Depending on the certificates, tls_cafile may also need to be set. See the test cookbook for an example.

  • ldaps_enabled - listen on LDAPS (636) true | false (default)
  • tls_enabled - true | false (default)
  • tls_cert - full path to your SSL certificate
  • tls_key - full path to your SSL key
  • tls_cafile - full path to your CA certificate (or intermediate authorities), if needed.
  • tls_ciphersuite - OpenSSL cipher suite specification to use, defaults to none (use system default)

Replication

Attributes related to replication (syncrepl). Only used if a provider or consumer.

  • slapd_type - 'provider' | 'consumer', default is nil
  • slapd_provider - hostname of slapd provider
  • slapd_replpw - replication password
  • slapd_rid - unique integer ID, required if type is consumer
  • syncrepl_uri - ldap (default) | ldaps
  • syncrepl_port - '389 (default) | 636'
  • syncrepl_cn - the CN (only) of the user to use as binddn as consumer

The following syncrepl values are set by default, others can be added by setting the appropriate key value pair in syncrepl_*_config (See the OpenLDAP Adminstrator Guide):

  • syncrepl_provider_config['overlay'] - defaults to syncprov
  • syncrepl_provider_config['syncprov-checkpoint'] - defaults to 100 10
  • syncrepl_provider_config['syncprov-sessionlog'] - defaults to 100
  • syncrepl_consumer_config['type'] - defaults to refreshAndPersist
  • syncrepl_consumer_config['interval'] - interval for the sync. Defaults to 1 day
  • syncrepl_consumer_config['searchbase'] - calculated from basedn
  • syncrepl_consumer_config['filter'] - search filter to use in the replication
  • syncrepl_consumer_config['scope'] - defaults to sub
  • syncrepl_consumer_config['schemachecking'] - defaults to off
  • syncrepl_consumer_config['bindmethod'] - defaults to simple
  • syncrepl_consumer_config['binddn'] - calculated from syncrepl_cn and basedn
  • syncrepl_consumer_config['starttls'] - yes | no (default)
  • syncrepl_consumer_config['credentials'] - defaults to slapd_replpw

Resources

Contributors

This project exists thanks to all the people who contribute.

Backers

Thank you to all our backers!

https://opencollective.com/sous-chefs#backers

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website.

https://opencollective.com/sous-chefs/sponsor/0/website https://opencollective.com/sous-chefs/sponsor/1/website https://opencollective.com/sous-chefs/sponsor/2/website https://opencollective.com/sous-chefs/sponsor/3/website https://opencollective.com/sous-chefs/sponsor/4/website https://opencollective.com/sous-chefs/sponsor/5/website https://opencollective.com/sous-chefs/sponsor/6/website https://opencollective.com/sous-chefs/sponsor/7/website https://opencollective.com/sous-chefs/sponsor/8/website https://opencollective.com/sous-chefs/sponsor/9/website

Sponsor this project

Packages

 
 
 

Contributors