Sign inSign up

lanycrost/openldap

By lanycrost

Updated almost 8 years ago

OpenLDAP server w/TLS + replication support, S6 overlay, Fusion Directory schema's included.

Image
0

10K+

lanycrost/openldap repository overview

Docker OpenLDAP container w/ Fusion Directory schema's included

Build Status Docker Pulls Docker Stars Docker Layers

Introduction

Dockerfile to build a OpenLDAP Server for maintaining a directory with Fusion Directory Schema's Included. Upon starting this image it will give you a ready to run server with many configurable options.

  • This Container uses a Alpine Linux.
  • Compiles from source
  • Multiple backends (bdb, hdb, mdb, sql)
  • All overlays compiled
  • Supports TLS encryption
  • Supports Replication
  • Scheduled Backups of Data
  • Ability to choose NIS or rfc2307bis Schema
  • Two Password Checking Modules - check_password.so and ppm.so

NOTE:This Container uses a customized Alpine Linux which includes s6 overlay enabled for PID 1 Init capabilities, Cron also installed along with other tools (bash, curl, less, vim) for easier management.

Table of Contents

Dependencies

To utilize, you must also have the Fusion Directory image built and available.

Installation

Automated builds of the image are available on Registry and is the recommended method of installation.

docker pull lanycrost/openldap

Quick Start

Start openldap using:

docker-compose up

NOTE: Please allow up to 2 minutes for the application to start for the first time if you are generating TLS certificates.

Data-Volumes

The following directories are used for configuration and can be mapped for persistent storage.

DirectoryDescription
/var/lib/openldapData Directory
/etc/openldap/slapd.dConfiguration Directory
/assets/custom-scripts/If you'd like to execute a script during the initialization process drop it here (Useful for using this image as a base)
/assets/slapd/certs/Drop TLS Certificates here
/data/backupBackup Directory
/assets/fusiondirectory-custom/Place Schema files here to be imported into Fusion Directory

Environment Variables

Below is the complete list of available options that can be used to customize your installation.

Required and used for new ldap server only:

VariableDescription
DOMAINLDAP domain. Default vtg.local
BASE_DNLDAP base DN. If empty automatically set from DOMAIN value. Default (empty)
ADMIN_PASSLdap Admin password. Default admin
CONFIG_PASSLdap Config password. Default config
ORGANIZATIONOrganization Name Default: VTG Software
ENABLE_READONLY_USERAdd a read only user. Defaultfalse
READONLY_USER_USERRead only user username. Default `readonly
READONLY_USER_PASSRead only user password. Default readonly
SCHEMA_TYPEUse nis or rfc2307bis core schema. Default nis

Required and used for Fusion Directory:

VariableDescription
FUSIONDIRECTORY_ADMIN_USERDefault FD Admin User - Default fd-admin
FUSIONDIRECTORY_ADMIN_PASSDefault FD Admin Password - Default admin
ORGANIZATIONOrganization Name Default: VTG Software
VariableDescription
BACKENDLdap backend. bdb hdb mdb and others. Default mdb
LOG_LEVELSet LDAP Log Level - Default 256

Backup Options:

VariableDescription
BACKUP_CONFIG_CRON_PERIODCron expression to schedule OpenLDAP config backup. Defaults 0 4 * * * Every day at 4am.
BACKUP_DATA_CRON_PERIODCron expression to schedule OpenLDAP data backup. Defaults 0 4 * * * Every day at 4am.
BACKUP_TTL Automatically cleanup backup after how many days. Default 15

Password Policy Options:

If you already have a check_password.conf or ppm.conf in /etc/openldap/ the following environment variables will not be applied

VariableDescription
PPOLICY_CHECK_RDNCheck RDN Parameter (ppm.so) - Default 0
PPOLICY_FORBIDDEN_CHARACTERSForbidden Characters (ppm.so) - Default ``
PPOLICY_MAX_CONSECMaximum Consective Character Pattern - Default 0
PPOLICY_MIN_DIGITMinimum Digit Characters - Default 0
PPOLICY_MIN_LOWERMinimum Lowercase Characters - Default 0
PPOLICY_MIN_POINTSMinimum Points required to pass checker - Default 3
PPOLICY_MIN_PUNCTMinimum Punctuation Characters - Default 0
PPOLICY_MIN_UPPERMinimum Uppercase Characters - Default 0
PPOLICY_USE_CRACKLIBUse Cracklib for verifying words (ppm.so) - Default 1

TLS options:

VariableDescription
ENABLE_TLSAdd TLS capabilities. Can't be removed once set to true. Defaults true
TLS_CRT_FILENAMELdap ssl certificate filename. Default cert.pem
TLS_KEY_FILENAMELdap ssl certificate private key filename. Default key.pem
TLS_CA_CRT_FILENAMELdap ssl CA certificate filename. Default ca.pem
TLS_ENFORCEEnforce TLS. Can't be disabled once set to true. Defaults false
TLS_CIPHER_SUITETLS cipher suite. Default ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:RSA+AESGCM:RSA+AES:-DHE-DSS:-RSA:!aNULL:!MD5:!DSS:!SHA
TLS_VERIFY_CLIENTTLS verify client. Default try
Help: http://www.openldap.org/doc/admin24/tls.html

Replication options:

VariableDescription
ENABLE_REPLICATIONAdd replication capabilities. Multimaster only at present. Default false
REPLICATION_CONFIG_SYNCPROVolcSyncRepl options used for the config database. Without rid and provider which are automatically added based on REPLICATION_HOSTS. Default binddn="cn=admin,cn=config" bindmethod=simple credentials=$CONFIG_PASS searchbase="cn=config" type=refreshAndPersist retry="60 +" timeout=1 starttls=critical
REPLICATION_DB_SYNCPROVolcSyncRepl options used for the database. Without rid and provider which are automatically added based on REPLICATION_HOSTS. Default binddn="cn=admin,$BASE_DN" bindmethod=simple credentials=$ADMIN_PASS searchbase="$BASE_DN" type=refreshAndPersist interval=00:00:00:10 retry="60 +" timeout=1 starttls=critical
REPLICATION_HOSTSlist of replication hosts seperated by a space, must contain the current container hostname set by --hostname on docker run command. If replicating all hosts must be set in the same order. Example - ldap://ldap1.example.com ldap://ldap2.example.com ldap://ldap3.example.com

Other environment variables:

VariableDescription
REMOVE_CONFIG_AFTER_SETUPDelete config folder after setup. Default true
SSL_HELPER_PREFIXSsl-helper environment variables prefix. Default ldap, ssl-helper first search config from SSL_HELPER_* variables, before SSL_HELPER_* variables.

Fusion Directory Schema Installation

Depending on your choices, the following schemas are available for installation. You must have these also enabled on the Fusion Directory application image to make use of it. If you would like to reapply the schemas set REAPPLY_PLUGIN_SCHEMAS to TRUE.

VariableDescription
REAPPLY_PLUGIN_SCHEMASReapply Plugin Schemas TRUE or FALSE - Default: FALSE
PLUGIN_ALIASMail Aliases - Default: FALSE
PLUGIN_APPLICATIONSApplications - Default: FALSE
PLUGIN_ARGONAUTArgonaut - Default: FALSE
PLUGIN_AUDITAudit Trail - Default: TRUE
PLUGIN_AUTOFSAutoFS - Default: FALSE
PLUGIN_CERTIFICATESManage Certificates - Default: FALSE
PLUGIN_COMMUNITYCommunity Plugin - Default: FALSE
PLUGIN_CYRUSCyrus IMAP - Default: FALSE
PLUGIN_DEBCONFArgonaut Debconf - Default: FALSE
PLUGIN_DEVELOPERSDevelopers Plugin - Default: FALSE
PLUGIN_DHCPManage DHCP - Default: FALSE
PLUGIN_DNSManage DNS - Default: FALSE
PLUGIN_DOVECOTDovecot IMAP - Default: FALSE
PLUGIN_DSASystem Accounts - Default: TRUE
PLUGIN_EJBCAUnknown - Default: FALSE
PLUGIN_FAIUnknown - Default: FALSE
PLUGIN_FREERADIUSFreeRadius Management - Default: FALSE
PLUGIN_FUSIONINVENTORYInventory Plugin - Default: FALSE
PLUGIN_GPGManage GPG Keys - Default: FALSE
PLUGIN_IPMIIPMI Management - Default: FALSE
PLUGIN_MAILMail Attributes - Default: TRUE
PLUGIN_MIXEDGROUPSUnix/LDAP Groups - Default: FALSE
PLUGIN_NAGIOSNagios Monitoring - Default: FALSE
PLUGIN_NETGROUPSNIS - Default: FALSE
PLUGIN_NEWSLETTERManage Newsletters - Default: FALSE
PLUGIN_OPSIInventory - Default: FALSE
PLUGIN_PERSONALPersonal Details - Default: TRUE
PLUGIN_POSIXPosix Groups - Default: FALSE
PLUGIN_POSTFIXPostfix SMTP - Default: FALSE
PLUGIN_PPOLICYPassword Policy - Default: TRUE
PLUGIN_PUPPETPuppet CI - Default: FALSE
PLUGIN_PUREFTPDFTP Server - Default: FALSE
PLUGIN_QUOTAManage Quotas - Default: FALSE
PLUGIN_RENATER_PARTAGEUnknown - Default: FALSE
PLUGIN_REPOSITORYArgonaut Deployment Registry - Default: FALSE
PLUGIN_SAMBAFile Sharing - Default: FALSE
PLUGIN_SOGOGroupware - Default: FALSE
PLUGIN_SPAMASSASSINAnti Spam - Default: FALSE
PLUGIN_SQUIDProxy - Default: FALSE
PLUGIN_SSHManage SSH Keys - Default: TRUE
PLUGIN_SUBCONTRACTINGUnknown - Default: FALSE
PLUGIN_SUDOManage SUDO on Hosts - Default: FALSE
PLUGIN_SUPANNSUPANN - Default: FALSE
PLUGIN_SYMPASympa Mailing List - Default: FALSE
PLUGIN_SYSTEMSSystems Management - Default: TRUE
PLUGIN_USER_REMINDERPassword Expiry - Default: FALSE
PLUGIN_WEBLINKDisplay Weblink - Default: FALSE

Networking

The following ports are exposed and available to public interfaces

VariableDescription
389Unecrypted LDAP
636TLS Encrypted LDAP

Maintenance

Shell Access

For debugging and maintenance purposes you may want access the containers shell.

docker exec -it (whatever your container name is e.g. openldap) bash

Authors

References

Tag summary

Content type

Image

Digest

Size

166.5 MB

Last updated

almost 8 years ago

docker pull lanycrost/openldap