activando o suporte a ldaps, obtendo erros específicos de implementação

1

Sistema: Ubuntu 16.04 executando o OpenLDAP 2.4.42

Estou seguindo o tutorial para configurar o OpenLDAP para TLS. O arquivo LDIF que acabei criando é o seguinte:

dn: cn=config
changetype: modify
replace: olcTLSCACertificateFile
olcTLSCACertificateFile: /etc/ssl/certs/cacert.pem
-
replace: olcTLSCertificateKeyFile
olcTLSCertificateKeyFile: /etc/ssl/private/mysite_slapd_key.pem
-
replace: olcTLSCertificateFile
olcTLSCertificateFile: /etc/ssl/certs/mysite_slapd_cert.pem

O problema é que, quando executo sudo ldapmodify -H ldapi:/// -Y EXTERNAL -f myFile.ldif , recebo o seguinte erro:

$ sudo ldapmodify -H ldapi:/// -Y EXTERNAL -f myFile.ldif
SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
modifying entry "cn=config"
ldap_modify: Other (e.g., implementation specific) error (80)

Eu pesquisei por isso e deparei com esta postagem de falha do servidor . Eu tentei de tudo nas respostas, mas ainda recebo o erro.

Para elaborar, /etc/ssl/certs/mysite_slapd_cert.pem é de propriedade do grupo ssl-cert , do qual openldap é membro, assim como as instruções na página do Ubuntu especificada. Em essência, eu executei estes comandos:

sudo adduser openldap ssl-cert
sudo chgrp ssl-cert /etc/ssl/private/mysite_slapd_key.pem
sudo chmod g+r /etc/ssl/private/mysite_slapd_key.pem
sudo chmod o-r /etc/ssl/private/mysite_slapd_key.pem

Abaixo está a saída do slapd quando rodando no modo -d 65 (como sugerido em uma das respostas para o outro post do serverfault):

57c8c219 slap_listener_activate(8):
57c8c219 >>> slap_listener(ldapi:///)
57c8c219 connection_get(15): got connid=1000
57c8c219 connection_read(15): checking for input on id=1000
ber_get_next
ber_get_next: tag 0x30 len 24 contents:
57c8c219 op tag 0x60, time 1472774681
ber_get_next
57c8c219 conn=1000 op=0 do_bind
ber_scanf fmt ({imt) ber:
ber_scanf fmt ({m) ber:
ber_scanf fmt (m) ber:
ber_scanf fmt (}}) ber:
57c8c219 >>> dnPrettyNormal: <>
57c8c219 <<< dnPrettyNormal: <>, <>
57c8c219 do_bind: dn () SASL mech EXTERNAL
57c8c219 ==>slap_sasl2dn: converting SASL name gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth to a DN
57c8c219 <==slap_sasl2dn: Converted SASL name to <nothing>
57c8c219 SASL Authorize [conn=1000]:  proxy authorization allowed authzDN=""
57c8c219 send_ldap_sasl: err=0 len=-1
57c8c219 do_bind: SASL/EXTERNAL bind: dn="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" sasl_ssf=0
57c8c219 send_ldap_response: msgid=1 tag=97 err=0
ber_flush2: 14 bytes to sd 15
57c8c219 <== slap_sasl_bind: rc=0
57c8c219 connection_get(15): got connid=1000
57c8c219 connection_read(15): checking for input on id=1000
ber_get_next
ber_get_next: tag 0x30 len 245 contents:
57c8c219 op tag 0x66, time 1472774681
ber_get_next
57c8c219 conn=1000 op=1 do_modify
ber_scanf fmt ({m) ber:
ber_scanf fmt ({e{m[W]}}) ber:
ber_scanf fmt ({e{m[W]}}) ber:
ber_scanf fmt ({e{m[W]}}) ber:
57c8c219 >>> dnPrettyNormal: <cn=config>
57c8c219 <<< dnPrettyNormal: <cn=config>, <cn=config>
57c8c219 oc_check_required entry (cn=config), objectClass "olcGlobal"
57c8c219 oc_check_allowed type "objectClass"
57c8c219 oc_check_allowed type "cn"
57c8c219 oc_check_allowed type "olcArgsFile"
57c8c219 oc_check_allowed type "olcLogLevel"
57c8c219 oc_check_allowed type "olcPidFile"
57c8c219 oc_check_allowed type "olcToolThreads"
57c8c219 oc_check_allowed type "structuralObjectClass"
57c8c219 oc_check_allowed type "entryUUID"
57c8c219 oc_check_allowed type "creatorsName"
57c8c219 oc_check_allowed type "createTimestamp"
57c8c219 oc_check_allowed type "olcTLSCACertificateFile"
57c8c219 oc_check_allowed type "olcTLSCertificateKeyFile"
57c8c219 oc_check_allowed type "olcTLSCertificateFile"
57c8c219 oc_check_allowed type "entryCSN"
57c8c219 oc_check_allowed type "modifiersName"
57c8c219 oc_check_allowed type "modifyTimestamp"
57c8c219 send_ldap_result: conn=1000 op=1 p=3
57c8c219 send_ldap_response: msgid=2 tag=103 err=80
ber_flush2: 14 bytes to sd 15
57c8c219 connection_get(15): got connid=1000
57c8c219 connection_read(15): checking for input on id=1000
ber_get_next
ber_get_next: tag 0x30 len 5 contents:
57c8c219 op tag 0x42, time 1472774681
ber_get_next
57c8c219 conn=1000 op=2 do_unbind
57c8c219 connection_close: conn=1000 sd=15
    
por Mephoros 01.09.2016 / 05:54

0 respostas