Back-end components after component sharing - LDAP warehouse docker-openlda

Back-end components after component sharing - LDAP warehouse docker-openlda

background

Recently, we are exploring various common components and tools on the front-end, back-end, and system side, and reorganize some of the common components to form a standardized component topic, which will later include some commonly used components in various languages. Welcome everyone to continue to pay attention.

Component Basic Information

content

What we share in this section is the LDAP warehouse docker-openldap , which allows us to quickly install ldap for use.

The specific installation is as follows:
1. docker installation

docker run --name my-openldap-container --detach osixia/openldap:1.5.0

Create new ldap server

docker run \
    --env LDAP_ORGANISATION="My Company" \
    --env LDAP_DOMAIN="my-company.com" \
    --env LDAP_ADMIN_PASSWORD="JonSn0w" \
    --detach osixia/openldap:1.5.0

For new ldap servers only:

  • LDAP_ORGANISATION : Organization name. The default isExample Inc.

  • LDAP_DOMAIN : LDAP domain. The default isexample.org

  • LDAP_BASE_DN : LDAP base DN. If empty, automatically set from LDAP_DOMAIN value. The default is(empty)

  • LDAP_ADMIN_PASSWORD LDAP administrator password. The default isadmin

  • LDAP_CONFIG_PASSWORD Ldap configuration password. The default isconfig

  • LDAP_READONLY_USER adds a read-only user. The default isfalse

    NOTE: Read- only users do have write access to their own passwords.

  • LDAP_READONLY_USER_USERNAME Read-only username. The default isreadonly

  • LDAP_READONLY_USER_PASSWORD只读用户密码。默认为readonly

  • LDAP_RFC2307BIS_SCHEMA使用 rfc2307bis 模式而不是 nis 模式。默认为false

后端:

TLS 选项:

  • LDAP_TLS:添加 openldap TLS 功能。设置为 true 后无法删除。默认为true.

  • LDAP_TLS_CRT_FILENAME:Ldap ssl 证书文件名。默认为ldap.crt

  • LDAP_TLS_KEY_FILENAME:Ldap ssl 证书私钥文件名。默认为ldap.key

  • LDAP_TLS_DH_PARAM_FILENAME:Ldap ssl 证书 dh 参数文件。默认为dhparam.pem

  • LDAP_TLS_CA_CRT_FILENAME:Ldap ssl CA 证书文件名。默认为ca.crt

  • LDAP_TLS_ENFORCE:强制执行 TLS,但 ldapi 连接除外。设置为 true 后无法禁用。默认为false.

  • LDAP_TLS_CIPHER_SUITE:TLS 密码套件。默认为SECURE256:+SECURE128:-VERS-TLS-ALL:+VERS-TLS1.2:-RSA:-DHE-DSS:-CAMELLIA-128-CBC:-CAMELLIA-256-CBC,基于 Red Hat 的TLS 强化指南

  • LDAP_TLS_VERIFY_CLIENT:TLS 验证客户端。默认为demand

    帮助:https ://www.openldap.org/doc/admin24/tls.html

复制选项:

  • LDAP_REPLICATION:添加 openldap 复制功能。可能的值:true, false, own. 默认为false. 将此设置为own允许通过自定义引导 ldifs 提供自己的复制设置。

  • LDAP_REPLICATION_CONFIG_SYNCPROV:用于配置数据库的 olcSyncRepl 选项。没有根据 LDAP_REPLICATION_HOSTS 自动添加的ridprovider 。默认为binddn="cn=admin,cn=config" bindmethod=simple credentials=$LDAP_CONFIG_PASSWORD searchbase="cn=config" type=refreshAndPersist retry="60 +" timeout=1 starttls=critical

  • LDAP_REPLICATION_DB_SYNCPROV:用于数据库的 olcSyncRepl 选项。没有根据 LDAP_REPLICATION_HOSTS 自动添加的ridprovider 。默认为binddn="cn=admin,$LDAP_BASE_DN" bindmethod=simple credentials=$LDAP_ADMIN_PASSWORD searchbase="$LDAP_BASE_DN" type=refreshAndPersist interval=00:00:00:10 retry="60 +" timeout=1 starttls=critical

  • LDAP_REPLICATION_HOSTS:复制主机列表,必须包含由 --hostname 在 docker run 命令上设置的当前容器主机名。默认为:

    - ldap://ldap.example.org
    - ldap://ldap2.example.org

    如果要在 docker run 命令中设置此变量,请添加标签#PYTHON2BASH:并在 python 中转换 yaml:

    docker run --env LDAP_REPLICATION_HOSTS="#PYTHON2BASH:['ldap://ldap.example.org','ldap://ldap2.example.org']" --detach osixia/openldap:1.5.0

    在线将 yaml 转换为 python:https ://yaml-online-parser.appspot.com/

其他环境变量:

  • KEEP_EXISTING_CONFIG:不要更改 ldap 配置。默认为false

    • 如果在现有数据库中设置为true ,则配置将保持不变。映像 tls 和复制配置将不会运行。容器可以在 LDAP_ADMIN_PASSWORD 和 LDAP_CONFIG_PASSWORD 为空或填充虚假数据的情况下启动。
    • 如果在引导新数据库时设置为true,则不会添加引导 ldif 和模式,并且不会运行 tls 和复制配置。
  • LDAP_REMOVE_CONFIG_AFTER_SETUP:设置后删除配置文件夹。默认为true

  • LDAP_SSL_HELPER_PREFIX:ssl-helper 环境变量前缀。默认为ldap, ssl-helper 首先从 LDAP_SSL_HELPER_* 变量中搜索配置,在 SSL_HELPER_* 变量之前。

  • HOSTNAME:设置正在运行的 openldap 服务器的主机名。默认为 docker 创建的任何内容。

  • DISABLE_CHOWN:不执行任何 chown 来修复文件所有权。默认为false

  • LDAP_OPENLDAP_UID:运行时 docker 用户 uid 以运行容器

  • LDAP_OPENLDAP_GID:运行时 docker 用户 gid 来运行容器

具体使用方式可以参见该文档

本文声明:
88x31.png
Creative Commons License
This work is licensed by CN Hua Shao under the Creative Commons Attribution-Noncommercial 4.0 International License.

Guess you like

Origin blog.csdn.net/csde12/article/details/125536389