ssl - OpenLDAP SSL 集成 - 修改 cn=config 的 ACL 权限
问题描述
我正在尝试在olcTLSCertificateFile
.
dn: cn=config
changetype: modify
replace: olcTLSCertificateFile
olcTLSCertificateFile: /etc/openldap/certs/file.crt
dn: cn=config
changetype: modify
replace: olcTLSCertificateKeyFile
olcTLSCertificateKeyFile: /etc/openldap/certs/file.key
Single Sign-on
我在 CentOS7 上使用 OpenSSL创建了这些证书。
openssl req -new -x509 -nodes -out /etc/openldap/certs/file.crt -keyout /etc/openldap/certs/file.key -days 3650
这是我添加到 using 的 ACL 权限
#monitor.ldif
dn: olcDatabase={1}monitor,cn=config
changetype: modify
replace: olcAccess
olcAccess: {0}to * by dn.base="gidNumber=0+uidNumber=0,cn=peercred,cn=external, cn=auth" read by dn.base="cn=Manager,dc=domain,dc=com" read by * none
最后,我正在修改文件并收到错误:
ldapmodify -x -W -D "cn=Manager,dc=domain,dc=com" -H ldapi:/// -f certs.ldif
Enter LDAP Password:
modifying entry "cn=config"
ldap_modify:访问权限不足 (50)
解决方案
我终于找到了解决方案。只需更改密钥和 crt 文件的顺序即可。
dn: cn=config
changetype: modify
replace: olcTLSCertificateKeyFile
olcTLSCertificateKeyFile: /etc/openldap/certs/file.key
dn: cn=config
changetype: modify
replace: olcTLSCertificateFile
olcTLSCertificateFile: /etc/openldap/certs/file.crt
推荐阅读
- java - 如何使用 Hibernate (5.4) Criteria 将两个表与组查询连接起来?
- python - 用python美汤提取html元素
- javascript - 在插入数组之前检查重复项
- sql - 为什么这会重新筛选不是“SHOP”的项目
- c# - 在 Linq 中连接具有不同数据类型的表
- docker - WSO2 API Manager 3.2.0 Docker Compose MySQL 连接过多
- c - 函数“fopen_s”的隐式声明在 C99 中无效
- javascript - React Native - 导航参数重置
- javascript - PIXI.js 掩码未应用于精灵
- javascript - 如何检测丢失的 YouTube 视频缩略图