FredHutch/openldap

Name: openldap

Owner: Fred Hutchinson Cancer Research Center

Description: Development repository for openldap Chef Cookbook

Forked from: chef-cookbooks/openldap

Created: 2016-06-22 19:39:00.0

Updated: 2016-06-22 19:44:26.0

Pushed: 2016-06-22 23:49:47.0

Homepage: https://supermarket.chef.io/cookbooks/openldap

Size: 233

Language: Ruby

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

openldap Cookbook

Build Status Cookbook Version

Configures a server to be an OpenLDAP master, OpenLDAP replication slave, or OpenLDAP client.

Requirements
Platforms Chef Cookbooks

Note: The openldap::auth recipe will restart sshd and nscd if the openssh or nscd recipes are included in the runlist

Attributes

Be aware of the attributes used by this cookbook and adjust the defaults for your environment where required, in attributes/default.rb.

Overall install attributes
Client node attributes
Server node attributes
Recipes
auth

Sets up the system for using openldap for user authentication.

default

Empty placeholder recipe.

client

Install the openldap client packages.

server

Set up openldap to be a slapd server. Use this if your environment would only have a single slapd server.

master

Sets the node['openldap']['slapd_type'] to master and then includes the openldap::server recipe.

slave

Sets the node['openldap']['slapd_type'] to slave, then includes the openldap::server recipe. If the node is running chef-solo, then the node['openldap']['slapd_replpw'] and node['openldap']['slapd_master'] attributes must be set in the JSON attributes file passed to chef-solo.

Usage

Edit Rakefile variables for SSL certificate.

On client systems,

ude_recipe "openldap::auth"

This will install the required packages and configuration for client systems. This is required on openldap server installs as well, so this is a good candidate for inclusion in a base role or cookbook.

On server systems, if there's only on LDAP server, then use the openldap::server recipe. If replication is required, use the openldap::master and openldap::slave recipes instead.

A note about certificates

Certificates created by the Rakefile are self signed. If you have a purchased CA, that can be used.

We provide two methods of managing SSL certificates, based off of openldap['manage_ssl'].

If openldap['manage_ssl'] is true, then this cookbook manage your certificates itself, and will expect all certificates, intermediate certificates, and keys to be in the same file as defined in openldap['ssl_cert']. To prevent forking this cookbook you can provide the cookbook that contains the cert files using the openldap['ssl_cert_source_cookbook'] and openldap['ssl_key_source_cookbook'] attributes. By default they expect the files to exist within this cookbook.

If openldap['manage_ssl'] is false, then you will need to place the SSL certificates on the client file system prior to this cookbook being run. This provides you the flexibility to provide the same set of SSL certificates for multiple uses as well as in one place across your environment, but you will need to manage them.

New Directory

If installing for the first time, the initial directory needs to be created. Create an ldif file, and start populating the directory.

Passwords

Set the password, openldap['rootpw'] for the rootdn in the node's attributes. This should be a password hash generated from slappasswd. The default slappasswd command on Ubuntu 8.10 and Mac OS X 10.5 will generate a SHA1 hash:

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

Set this by default in the attributes file, or on the node's entry in the webui.

License & Authors

Author: Cookbook Engineering Team (cookbooks@chef.io)

Copyright: 2008-2015, Chef Software, Inc.

nsed under the Apache License, Version 2.0 (the "License");
may not use this file except in compliance with the License.
may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

ss required by applicable law or agreed to in writing, software
ributed under the License is distributed on an "AS IS" BASIS,
OUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
the License for the specific language governing permissions and
tations under the License.

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.