1.2. 安装 Active Directory LDAPS 证书
OpenStack Identity (keystone)使用 LDAPS 查询来验证用户帐户。要加密此流量,keystone 使用 keystone.conf 定义的证书文件。要配置 LDAPS 证书,请将从 Active Directory 接收的公钥转换为 .crt 格式,并将证书复制到 keystone 能够引用它的位置。
当使用多个域进行 LDAP 身份验证时,您可能会收到各种错误,如 Unable to retrieve authorized projects,或者 Peer 的证书签发者无法识别。如果 keystone 对某个域使用不正确的证书,则会出现这种情况。作为临时解决方案,将所有 LDAPS 公钥合并到一个 .crt 捆绑包中,并配置所有 keystone 域以使用此文件。
先决条件
- 活动目录凭证已配置。
- LDAPS 证书从 Active Directory 导出。
流程
将 LDAPS 公钥复制到运行 OpenStack 身份的节点,并将
.cer转换为.crt。本例使用名为addc.lab.local.cer的源证书文件:# openssl x509 -inform der -in addc.lab.local.cer -out addc.lab.local.crt # cp addc.lab.local.crt /etc/pki/ca-trust/source/anchors可选:如果您需要运行诊断命令,如
ldapsearch,您还需要将证书添加到 RHEL 证书存储中:将
.cer转换为.pem。本例使用名为addc.lab.local.cer的源证书文件:# openssl x509 -inform der -in addc.lab.local.cer -out addc.lab.local.pem在 Controller 节点上安装
.pem。例如,在 Red Hat Enterprise Linux 中:# cp addc.lab.local.pem /etc/pki/ca-trust/source/anchors/ # update-ca-trust