Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bodgit/puppet-openldap
Puppet Module for managing OpenLDAP
https://github.com/bodgit/puppet-openldap
openldap puppet
Last synced: 4 months ago
JSON representation
Puppet Module for managing OpenLDAP
- Host: GitHub
- URL: https://github.com/bodgit/puppet-openldap
- Owner: bodgit
- License: apache-2.0
- Created: 2015-01-15T23:53:15.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2020-02-05T11:36:59.000Z (almost 5 years ago)
- Last Synced: 2024-10-01T05:23:46.398Z (4 months ago)
- Topics: openldap, puppet
- Language: Ruby
- Homepage: https://forge.puppetlabs.com/bodgit/openldap
- Size: 404 KB
- Stars: 8
- Watchers: 6
- Forks: 5
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# openldap
Tested with Travis CI
[![Build Status](https://travis-ci.org/bodgit/puppet-openldap.svg?branch=master)](https://travis-ci.org/bodgit/puppet-openldap)
[![Coverage Status](https://coveralls.io/repos/bodgit/puppet-openldap/badge.svg?branch=master&service=github)](https://coveralls.io/github/bodgit/puppet-openldap?branch=master)
[![Puppet Forge](http://img.shields.io/puppetforge/v/bodgit/openldap.svg)](https://forge.puppetlabs.com/bodgit/openldap)
[![Dependency Status](https://gemnasium.com/bodgit/puppet-openldap.svg)](https://gemnasium.com/bodgit/puppet-openldap)#### Table of Contents
1. [Description](#description)
2. [Setup - The basics of getting started with openldap](#setup)
* [Setup requirements](#setup-requirements)
* [Beginning with openldap](#beginning-with-openldap)
3. [Usage - Configuration options and additional functionality](#usage)
4. [Reference - An under-the-hood peek at what the module is doing and how](#reference)
5. [Limitations - OS compatibility, etc.](#limitations)
6. [Development - Guide for contributing to the module](#development)## Description
This module can install LDAP libraries, client utilities and more importantly
install and configure the `slapd` ḋaemon to provide directory services.RHEL/CentOS, Ubuntu, Debian and OpenBSD are supported using Puppet 4.4.0 or
later.## Setup
### Setup Requirements
You will need pluginsync enabled.
### Beginning with openldap
```puppet
include ::openldap
```## Usage
Install the LDAP libraries and create a global `ldap.conf` mimicking the stock
RHEL/CentOS install as well as a per-user `.ldaprc` for any subsequently
created users. Also install the client utilities:```puppet
class { '::openldap':
tls_cacertdir => '/etc/openldap/certs'
}::openldap::configuration { '/etc/skel/.ldaprc':
ensure => file,
owner => 0,
group => 0,
mode => '0640',
base => 'dc=example,dc=com',
uri => ['ldap://ldap.example.com/'],
}::Openldap::Configuration['/etc/skel/.ldaprc'] -> User <||>
include ::openldap::client
```Create a standalone directory server listening on the standard LDAP TCP port
389 that disallows anonymous reads and allows users to update their own object:```puppet
include ::openldap
include ::openldap::clientclass { '::openldap::server':
root_dn => 'cn=Manager,dc=example,dc=com',
root_password => '{SSHA}7dSAJPGe4YKKEvUPuGJIeSL/03GV2IMY',
suffix => 'dc=example,dc=com',
access => [
[
{
'attrs' => ['userPassword'],
},
[
{
'who' => ['self'],
'access' => '=xw',
},
{
'who' => ['anonymous'],
'access' => 'auth',
},
],
],
[
{
'dn' => '*',
},
[
{
'who' => ['dn.base="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth"'],
'access' => 'manage',
},
{
'who' => ['self'],
'access' => 'write',
},
{
'who' => ['users'],
'access' => 'read',
},
],
],
],
indices => [
[['objectClass'], ['eq', 'pres']],
[['ou', 'cn', 'mail', 'surname', 'givenname'], ['eq', 'pres', 'sub']],
],
interfaces => ["ldap://${::ipaddress}/"],
}
::openldap::server::schema { 'cosine':
ensure => present,
}
::openldap::server::schema { 'inetorgperson':
ensure => present,
}
::openldap::server::schema { 'nis':
ensure => present,
require => ::Openldap::Server::Schema['cosine'],
}
```## Reference
The reference documentation is generated with
[puppet-strings](https://github.com/puppetlabs/puppet-strings) and the latest
version of the documentation is hosted at
[https://bodgit.github.io/puppet-openldap/](https://bodgit.github.io/puppet-openldap/).## Limitations
Rather than expose overlays, modules, databases, etc. as defined or native
types and leave the user to build their own configuration this module takes
the decision to hide most of this complexity and build what most people
probably want out of OpenLDAP; a single database, possibly replicated. This
is largely due to a number of behaviours and idiosyncrasies of OpenLDAP; the
order of overlays matters for example.Most of the attributes or objects are additive and cannot be deleted without
manually editing the configuration with the server stopped. This module will
always try and issue the necessary LDIF commands however the server will likely
be "unwilling to perform" them. Experimental delete support is apparently
available as a compile-time option which may allow this module to remove
configuration more easily but I have not tested it.This means that if you try to convert from say a replicating producer back to a
standalone server you will probably get errors from trying to remove the
various replication objects. However things should always build from scratch
cleanly.This module has been built on and tested against Puppet 4.4.0 and higher.
The module has been tested on:
* RedHat Enterprise Linux 6/7
* Ubuntu 14.04/16.04
* Debian 7/8
* OpenBSD 6.0/6.1/6.2/6.3## Development
The module has both [rspec-puppet](http://rspec-puppet.com) and
[beaker-rspec](https://github.com/puppetlabs/beaker-rspec) tests. Run them
with:```
$ bundle exec rake test
$ PUPPET_INSTALL_TYPE=agent PUPPET_INSTALL_VERSION=x.y.z bundle exec rake beaker:
```Please log issues or pull requests at
[github](https://github.com/bodgit/puppet-openldap).