This module manages OpenLDAP using convensional slapd.conf configuration.
include openldap_slapd
argsfile: OpenLDAP args file, default/var/run/openldap/slapd.argspidfile: Location of slapd pidfile that will hold the slapd server's process IDconf_file: Configuration file location, default/etc/openldap/slapd.confloglevel: OpenLDAP loglevel, defaultstatsthreads: Maximum size of the primary thread pool, default 16idletimeout: Maximum time of seconds to leave an idle connection open, default 600.
global_acls: A hash containing global ACL's, seeparams.ppfor default settingsauthz_regexp: A hash of authz-regexp entries, default{}databases: A hash of custom databases, default{}modules: An array of modules to loadschemas: A hash of schemas to include
local_ssf: Configures the localSSF settingpassword_hash: Password hash, must be one of{SSHA},{SHA},{SMD5},{MD5},{CRYPT}, or{CLEARTEXT}, default{CRYPT}password_salt_format: default$6$%.12ssec_allow: An array ofallowentriessec_disallow: An array ofdisallowentriessec_require: An array ofrequireentriessecurity: Specify a set of required security strength factors.
tls_enabled: Enable TLS configuration, defaulttruetls_certificate_file: Location of TLS certtls_key_file: Location of TLS keytls_ca_certificate_file: Location of TLS CA certtlc_cipher_suite: Accepted ciphers and the preference order.tls_dh_param_file: Location of parameters file for Diffie-Hellman ephemeral key exchangetls_protocol_min: Minimum SSL/TLS protocol version that will be negotiated, default none
Creates one access control rule set
to: A set of entries or attributes to which access if granted. If omitted, $name will be used instead.rules: A hash of rules. Each rule must contain keyby(requestor) andactionposition: Position number for the acl. Acls are ordered in the slapd.conf ascending order based on the position value
Example for configuring global acls in slapd.conf. ACL configuration is read from parameter hash ::openldap_slapd::global_acls.
::openldap_slapd::global_acls:
attrs=userPassword:
to: attrs=userPassword
position: 1
rules:
- by: 'group.base="cn=replica,ou=groups,dc=example,dc=com"'
action: read
- by: 'group.base="cn=admins,ou=groups,dc=example,dc=ch"'
action: =sw
- by: '*'
action: authwould create the following configuration
access to
attrs=userPassword
by group.base="cn=replica,ou=groups,dc=example,dc=com" read
by group.base="cn=admins,ou=groups,dc=example,dc=ch" =sw
by * authorder: Order number for the database. Databases are ordered in the slapd.conf ascending order based on the order valueacls: A hash of ACLs. See the section for parameters for defineopenldap_slapd::acladd_content_acl: Controls whether Add operations will perform ACL checks on the content of the entry being addedbackend: The database typecheckpoint: The frequency for flushing the database disk buffers or checkpointing the database transaction logs. Depends on the used database typedbnosync: If true, on-disk database contents are not be immediately synchronized with in memory changesdirectory: The database directory. If the directory does not exist it is created with mode 700 and ldap:ldap (owner:group)envflags: Envflags for a database with typemdb. Possible values: nosync, nometasync, writemap, mapasync, nordaheadindexes: Indexes to maintainlastmod: Controls whether slapd will automatically maintain certain timestamp attributes for entrieslimits: Time and size limits based on the operation's initiator or base DN.maxsize: The maximum size of the database in bytes. Only applicable for databases with typemdbmirrormode: Enable / disable mirrormodemode: The file protection mode that newly created database files should have. Only applicable for certain database typesmonitoring: Controls database-specific monitoring. Only applicable for databases with typebdborhdboverlays: A hash of overlays added for the database.rebind_as_user: If set to true, the client's bind credentials are remembered for rebinds, when trying to re-establish a broken connection. Only applicable for databases with typeldaprootdn: The DN that is not subject to access control or administrative limit restrictions for operations on this databaserootpw: A password (or hash of the password) for the rootdnsizelimit: The maximum number of entries to return from a search operationsuffix: The DN suffix of queries that will be passed to this backend databasesyncrepl: A hash of syncrepl attributestimelimit: The maximum number of seconds slapd will spend answering a search requesturi: LDAP uri forldaptype database
- More documentation on available options!
- Tests
- Puppet 4.x compatibility