配置 LDAP

Ceph Object Gateway 使用简单标识和密码向 LDAP 服务器进行认证,因此连接需要 LDAP 的 SSL 证书。 LDAP 工作后,配置 Ceph Object Gateway 服务器以信任 Directory Server 的证书。

  1. 抽取/下载签署 LDAP 服务器 SSL 证书的认证中心 (CA) 的 PEM 格式证书。

  2. 确认 /etc/openldap/ldap.conf 未设置 TLS_REQCERT

  3. 确认 /etc/openldap/ldap.conf 包含 TLS_CACERTDIR /etc/openldap/certs 设置。

  4. 使用 certutil 命令将 AD CA 添加到位于 /etc/openldap/certs. 的存储中,例如,如果 CA 为 "msad-frog-MSAD-FROG-CA" ,并且 PEM 格式的 CA 文件为 ldap.pem,请使用以下命令:

    示例

    # certutil -d /etc/openldap/certs -A -t "TC,," -n "msad-frog-MSAD-FROG-CA" -i /path/to/ldap.pem
  5. 在所有远程 LDAP 站点上更新 SELinux:

    示例

    # setsebool -P httpd_can_network_connect on
    注: 即使 SELinux 处于许可方式,仍必须设置此项。
  6. 使 certs 数据库具有可读性:

    示例

    # chmod 644 /etc/openldap/certs/*
  7. 以非 root 用户身份使用 "ldapwhoami" 命令连接到服务器。

    示例

    $ ldapwhoami -H ldaps://redhat-directory-server.example.com -d 9

    -d 9 选项将提供调试信息,以防 SSL 协商出错。