3.5. 将网关配置为使用 Active Directory

在 Ceph 集群的管理节点上,在 rgw_ldap_secret 设置后,将下列设置添加到 Ceph 配置文件的 [global] 部分中:例如:

[global]
rgw_ldap_secret = "/etc/bindpass"
...
rgw_ldap_uri = ldaps://<fqdn>:636
rgw_ldap_binddn = "<binddn>"
rgw_ldap_searchdn = "<seachdn>"
rgw_ldap_dnattr = "cn"
rgw_s3_auth_use_ldap = true

对于 rgw_ldap_uri 设置,将 <fqdn> 替换为 LDAP 服务器的完全限定域名。如果有多个 LDAP 服务器,请指定每个域。

对于 rgw_ldap_binddn 设置,将 <binddn> 替换为 bind 域。对于 example.com 域以及 用户和 帐户 下的 ceph 用户,它应如下所示:

rgw_ldap_binddn = "uid=ceph,cn=users,cn=accounts,dc=example,dc=com"

对于 rgw_ldap_searchdn 设置,将 <searchdn> 替换为搜索域。对于 example.com 域以及 用户和 帐户 下的用户,它应如下所示:

rgw_ldap_searchdn = "cn=users,cn=accounts,dc=example,dc=com"

将更新的配置文件复制到每个 Ceph 节点。

scp /etc/ceph/ceph.conf <hostname>:/etc/ceph

最后,重新启动 Ceph 对象网关。它应该是:

# systemctl restart ceph-radosgw
# systemctl restart ceph-radosgw@rgw.`hostname -s`