OpenLDAP SSL集成-修改cn = config的ACL权限

时间:2018-07-06 12:12:46

标签: ssl openldap

我正在尝试在f(1 + 1/2 + 1/4 + 1/8 + 1/16 + ...) = f(2) = 1中添加ssl证书。

olcTLSCertificateFile

我已经在CentOS7上使用OpenSSL将这些证书创建为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

这是我添加到使用中的ACL权限

openssl req -new -x509 -nodes -out /etc/openldap/certs/file.crt -keyout /etc/openldap/certs/file.key -days 3650

最后,我正在修改文件并出现错误:

#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
  

ldap_modify:访问权限不足(50)

2 个答案:

答案 0 :(得分:0)

我终于找到了解决方案。只需更改密钥和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

答案 1 :(得分:0)

您为什么使用两个单独的LDAP请求?

我强烈建议使用单个LDAP修改请求,因为单个LDAP写操作是原子的:

dn: cn=config
changetype: modify
replace: olcTLSCertificateKeyFile
olcTLSCertificateKeyFile: /etc/openldap/certs/file.key
-
replace: olcTLSCertificateFile
olcTLSCertificateFile: /etc/openldap/certs/file.crt
-