ALT Linux Community general discussions
 help / color / mirror / Atom feed
* [Comm] OpenLDAP и SSL
@ 2003-04-19  1:53 Alexey Borovskoy
  2003-04-19 10:37 ` Maxim Tyurin
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Alexey Borovskoy @ 2003-04-19  1:53 UTC (permalink / raw)
  To: community

Добрый день.

Не получается подружить openldap с openssl.
Без ssl ldap работает нормально. 

Дано:
openldap-servers-2.0.27-alt5
openldap-2.0.27-alt5
openssl-0.9.6i-alt3

1. Генерю сертификат с помощью
openssl req -new -x509 -nodes -out ldap.pem -keyout ldap.pem

cn прописываю как server.intranet. В DNS все нормально.

2. Получившийся сертификат кладу в /etc/openldap/

3. В /etc/openldap/slapd.conf раскоментирую строчки
 TLSCipherSuite         HIGH:MEDIUM:+SSLv2
 TLSCertificateFile      /etc/openldap/ldap.pem
 TLSCertificateKeyFile   /etc/openldap/ldap.pem
 TLSCACertificateFile    /etc/openldap/ldap.pem

4. Делаю service ldap start

5. Делаю netstat -tl
tcp        0      0 server.intranet:ldaps   *:*     LISTEN

6. Коннекчусь GQ, прописываю пароль rootdn и получаю ошибку
Can't contact LDAP server

7. Беру ldapsearch -ZZ -D "cn=ldapadmin,dc=intranet" -w secret -h 
server.intranet -p 636 -n -v -d 9

получаю

ldap_init( server.intranet, 636 )
ldap_create
ldap_extended_operation_s
ldap_extended_operation
ldap_send_initial_request
ldap_new_connection
ldap_int_open_connection
ldap_connect_to_host: server.intranet
ldap_new_socket: 3
ldap_prepare_socket: 3
ldap_connect_to_host: Trying 10.1.1.7:636
ldap_connect_timeout: fd: 3 tm: -1 async: 0
ldap_ndelay_on: 3
ldap_is_sock_ready: 3
ldap_ndelay_off: 3
ldap_open_defconn: successful
ldap_send_server_request
ber_flush: 31 bytes to sd 3
ldap_result msgid 1
ldap_chkResponseList for msgid=1, all=1
ldap_chkResponseList returns NULL
wait4msg (infinite timeout), msgid 1
wait4msg continue, msgid 1, all 1
** Connections:
* host: server.intranet  port: 636  (default)
  refcnt: 2  status: Connected
  last used: Sat Apr 19 14:05:27 2003

** Outstanding Requests:
 * msgid 1,  origid 1, status InProgress
   outstanding referrals 0, parent count 0
** Response Queue:
   Empty
ldap_chkResponseList for msgid=1, all=1
ldap_chkResponseList returns NULL
do_ldap_select
read1msg: msgid 1, all 1
ber_get_next
ber_get_next failed.
ldap_perror
ldap_start_tls: Can't contact LDAP server

В логах сервера:

Apr 19 14:18:18 server slapd[21284]: slapd startup: initiated.
Apr 19 14:18:18 server slapd[21284]: slapd starting
Apr 19 14:18:18 server slapd[21294]: daemon: added 6r
Apr 19 14:18:18 server slapd[21294]: daemon: select: listen=6 
active_threads=0 tvp=NULL
Apr 19 14:18:41 server slapd[21294]: daemon: activity on 1 
descriptors
Apr 19 14:18:41 server slapd[21294]: daemon: new connection on 9
Apr 19 14:18:41 server slapd[21294]: daemon: conn=0 fd=9 
connection from IP=10.1.1.10:32987 (IP=10.1.1.7:636) accepted.
Apr 19 14:18:41 server slapd[21294]: daemon: added 9r
Apr 19 14:18:41 server slapd[21294]: daemon: activity on:
Apr 19 14:18:41 server slapd[21294]:
Apr 19 14:18:41 server slapd[21294]: daemon: select: listen=6 
active_threads=0 tvp=NULL
Apr 19 14:18:41 server slapd[21294]: daemon: activity on 1 
descriptors
Apr 19 14:18:41 server slapd[21294]: daemon: activity on:
Apr 19 14:18:41 server slapd[21294]:  9r
Apr 19 14:18:41 server slapd[21294]:
Apr 19 14:18:41 server slapd[21294]: daemon: read activity on 9
Apr 19 14:18:41 server slapd[21294]: connection_get(9)
Apr 19 14:18:41 server slapd[21294]: connection_get(9): got 
connid=0
Apr 19 14:18:41 server slapd[21294]: connection_read(9): checking 
for input on id=0
Apr 19 14:18:41 server slapd[21294]: connection_read(9): TLS 
accept error error=-1 id=0, closing
Apr 19 14:18:41 server slapd[21294]: connection_closing: readying 
conn=0 sd=9 for close
Apr 19 14:18:41 server slapd[21294]: connection_close: conn=0 
sd=9
Apr 19 14:18:41 server slapd[21294]: daemon: removing 9
Apr 19 14:18:41 server slapd[21294]: conn=-1 fd=9 closed
Apr 19 14:18:41 server slapd[21294]: daemon: select: listen=6 
active_threads=0 tvp=NULL
Apr 19 14:18:41 server slapd[21294]: daemon: activity on 1 
descriptors
Apr 19 14:18:41 server slapd[21294]: daemon: select: listen=6 
active_threads=0 tvp=NULL

Что я делаю не так?

----
Алексей.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Comm] OpenLDAP и SSL
  2003-04-19  1:53 [Comm] OpenLDAP и SSL Alexey Borovskoy
@ 2003-04-19 10:37 ` Maxim Tyurin
  2003-04-21  3:11   ` Alexey Borovskoy
  2003-04-21 10:22 ` Igor Muratov
  2003-04-22 22:30 ` Dmitry Lebkov
  2 siblings, 1 reply; 13+ messages in thread
From: Maxim Tyurin @ 2003-04-19 10:37 UTC (permalink / raw)
  To: community

On Sat, Apr 19, 2003 at 02:53:48PM +1300, Alexey Borovskoy wrote:
> Добрый день.
> 
> Не получается подружить openldap с openssl.
> Без ssl ldap работает нормально. 
> 
> Дано:
> openldap-servers-2.0.27-alt5
> openldap-2.0.27-alt5
> openssl-0.9.6i-alt3
> 
> 1. Генерю сертификат с помощью
> openssl req -new -x509 -nodes -out ldap.pem -keyout ldap.pem

Есть у меня подозрения что сертификат криво сгенерировался (нет в нем
самого ключа, а только сертификат). В pem 2 секции ?
<scip>
-- 

With Best Regards, Maxim Tyurin
JID:	MrKooll@jabber.pibhe.com
			


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Comm] OpenLDAP и SSL
  2003-04-19 10:37 ` Maxim Tyurin
@ 2003-04-21  3:11   ` Alexey Borovskoy
  0 siblings, 0 replies; 13+ messages in thread
From: Alexey Borovskoy @ 2003-04-21  3:11 UTC (permalink / raw)
  To: community

* 19 Апрель 2003 23:37 Maxim Tyurin <mrkooll@tdr.pibhe.com>

> On Sat, Apr 19, 2003 at 02:53:48PM +1300, Alexey Borovskoy 
wrote:
> > Добрый день.
> >
> > Не получается подружить openldap с openssl.
> > Без ssl ldap работает нормально.
> >
> > Дано:
> > openldap-servers-2.0.27-alt5
> > openldap-2.0.27-alt5
> > openssl-0.9.6i-alt3
> >
> > 1. Генерю сертификат с помощью
> > openssl req -new -x509 -nodes -out ldap.pem -keyout ldap.pem
>
> Есть у меня подозрения что сертификат криво сгенерировался
> (нет в нем самого ключа, а только сертификат). В pem 2 секции

В файле две секции сертификат и ключ.
Я их даже по отдельности генерил с подписью ключем сертификатора. 
Т.е ca.cert, ldap.private, ldap.cert

В логах проскакивала какая-то 40 ошибка.
Я просто не могу понять где это все дохнет и почему.
Рядом стоит NUT с SSL и работает. 

Вот что говорит тестилка от openssl

[root@server openldap]# openssl s_client -connect 
server.intranet:636 -state

CONNECTED(00000004)
SSL_connect:before/connect initialization
SSL_connect:SSLv2/v3 write client hello A
SSL3 alert read:fatal:handshake failure
SSL_connect:error in SSLv2/v3 read server hello A
24884:error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 
alert handshake failure:s23_clnt.c:465:

[root@server openldap]# openssl ciphers -v ALL

DHE-DSS-RC4-SHA         SSLv3 Kx=DH       Au=DSS  Enc=RC4(128)  
Mac=SHA1
EXP1024-DHE-DSS-RC4-SHA SSLv3 Kx=DH(1024) Au=DSS  Enc=RC4(56)   
Mac=SHA1 export
EXP1024-RC4-SHA         SSLv3 Kx=RSA(1024) Au=RSA  Enc=RC4(56)   
Mac=SHA1 export
EXP1024-DHE-DSS-DES-CBC-SHA SSLv3 Kx=DH(1024) Au=DSS  Enc=DES(56)   
Mac=SHA1 export
EXP1024-DES-CBC-SHA     SSLv3 Kx=RSA(1024) Au=RSA  Enc=DES(56)   
Mac=SHA1 export
EXP1024-RC2-CBC-MD5     SSLv3 Kx=RSA(1024) Au=RSA  Enc=RC2(56)   
Mac=MD5  export
EXP1024-RC4-MD5         SSLv3 Kx=RSA(1024) Au=RSA  Enc=RC4(56)   
Mac=MD5  export
EDH-RSA-DES-CBC3-SHA    SSLv3 Kx=DH       Au=RSA  Enc=3DES(168) 
Mac=SHA1
EDH-RSA-DES-CBC-SHA     SSLv3 Kx=DH       Au=RSA  Enc=DES(56)   
Mac=SHA1
EXP-EDH-RSA-DES-CBC-SHA SSLv3 Kx=DH(512)  Au=RSA  Enc=DES(40)   
Mac=SHA1 export
EDH-DSS-DES-CBC3-SHA    SSLv3 Kx=DH       Au=DSS  Enc=3DES(168) 
Mac=SHA1
EDH-DSS-DES-CBC-SHA     SSLv3 Kx=DH       Au=DSS  Enc=DES(56)   
Mac=SHA1
EXP-EDH-DSS-DES-CBC-SHA SSLv3 Kx=DH(512)  Au=DSS  Enc=DES(40)   
Mac=SHA1 export
DES-CBC3-SHA            SSLv3 Kx=RSA      Au=RSA  Enc=3DES(168) 
Mac=SHA1
DES-CBC-SHA             SSLv3 Kx=RSA      Au=RSA  Enc=DES(56)   
Mac=SHA1
EXP-DES-CBC-SHA         SSLv3 Kx=RSA(512) Au=RSA  Enc=DES(40)   
Mac=SHA1 export
IDEA-CBC-SHA            SSLv3 Kx=RSA      Au=RSA  Enc=IDEA(128) 
Mac=SHA1
EXP-RC2-CBC-MD5         SSLv3 Kx=RSA(512) Au=RSA  Enc=RC2(40)   
Mac=MD5  export
RC4-SHA                 SSLv3 Kx=RSA      Au=RSA  Enc=RC4(128)  
Mac=SHA1
RC4-MD5                 SSLv3 Kx=RSA      Au=RSA  Enc=RC4(128)  
Mac=MD5
EXP-RC4-MD5             SSLv3 Kx=RSA(512) Au=RSA  Enc=RC4(40)   
Mac=MD5  export
ADH-DES-CBC3-SHA        SSLv3 Kx=DH       Au=None Enc=3DES(168) 
Mac=SHA1
ADH-DES-CBC-SHA         SSLv3 Kx=DH       Au=None Enc=DES(56)   
Mac=SHA1
EXP-ADH-DES-CBC-SHA     SSLv3 Kx=DH(512)  Au=None Enc=DES(40)   
Mac=SHA1 export
ADH-RC4-MD5             SSLv3 Kx=DH       Au=None Enc=RC4(128)  
Mac=MD5
EXP-ADH-RC4-MD5         SSLv3 Kx=DH(512)  Au=None Enc=RC4(40)   
Mac=MD5  export
RC4-64-MD5              SSLv2 Kx=RSA      Au=RSA  Enc=RC4(64)   
Mac=MD5
DES-CBC3-MD5            SSLv2 Kx=RSA      Au=RSA  Enc=3DES(168) 
Mac=MD5
DES-CBC-MD5             SSLv2 Kx=RSA      Au=RSA  Enc=DES(56)   
Mac=MD5
IDEA-CBC-MD5            SSLv2 Kx=RSA      Au=RSA  Enc=IDEA(128) 
Mac=MD5
RC2-CBC-MD5             SSLv2 Kx=RSA      Au=RSA  Enc=RC2(128)  
Mac=MD5
EXP-RC2-CBC-MD5         SSLv2 Kx=RSA(512) Au=RSA  Enc=RC2(40)   
Mac=MD5  export
RC4-MD5                 SSLv2 Kx=RSA      Au=RSA  Enc=RC4(128)  
Mac=MD5
EXP-RC4-MD5             SSLv2 Kx=RSA(512) Au=RSA  Enc=RC4(40)   
Mac=MD5  export

Это на клиенте
[alb@alb alb]$ cat /etc/openldap/ldap.conf

# $OpenLDAP: pkg/ldap/libraries/libldap/ldap.conf,v 1.4.8.6 
2000/09/05 17:54:38 kurt Exp $
#
# LDAP Defaults
#

# See ldap.conf(5) for details
# This file should be world readable but not world writable.

base dc=intranet
host server.intranet:636
uri ldaps://server.intranet/
tls_ciphers TLSv1
ssl start_tls
ssl on

#SIZELIMIT      12
#TIMELIMIT      15
#DEREF          never


Может какие либы не стоят?

----
Алексей.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Comm] OpenLDAP и SSL
  2003-04-19  1:53 [Comm] OpenLDAP и SSL Alexey Borovskoy
  2003-04-19 10:37 ` Maxim Tyurin
@ 2003-04-21 10:22 ` Igor Muratov
  2003-04-22  6:14   ` Alexey Borovskoy
  2003-04-22 22:30 ` Dmitry Lebkov
  2 siblings, 1 reply; 13+ messages in thread
From: Igor Muratov @ 2003-04-21 10:22 UTC (permalink / raw)
  To: community

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alexey Borovskoy пишет:
| Добрый день.
|
| Не получается подружить openldap с openssl.
| Без ssl ldap работает нормально.
|
| Дано:
| openldap-servers-2.0.27-alt5
| openldap-2.0.27-alt5
| openssl-0.9.6i-alt3
|
| 1. Генерю сертификат с помощью
| openssl req -new -x509 -nodes -out ldap.pem -keyout ldap.pem
|
| cn прописываю как server.intranet. В DNS все нормально.
|
| 2. Получившийся сертификат кладу в /etc/openldap/
|
| 3. В /etc/openldap/slapd.conf раскоментирую строчки
|  TLSCipherSuite         HIGH:MEDIUM:+SSLv2
|  TLSCertificateFile      /etc/openldap/ldap.pem
|  TLSCertificateKeyFile   /etc/openldap/ldap.pem
|  TLSCACertificateFile    /etc/openldap/ldap.pem
|
| 4. Делаю service ldap start
|
| 5. Делаю netstat -tl
| tcp        0      0 server.intranet:ldaps   *:*     LISTEN
|
| 6. Коннекчусь GQ, прописываю пароль rootdn и получаю ошибку
| Can't contact LDAP server
|
| 7. Беру ldapsearch -ZZ -D "cn=ldapadmin,dc=intranet" -w secret -h
| server.intranet -p 636 -n -v -d 9
|
| получаю

Есть еще подозрение что сервер не подхватил сертификат а на 636 порт
законнектился без всякого ssl.
Попрбуйте зайти туда telnet'ом

|
| ldap_init( server.intranet, 636 )
| ldap_create
| ldap_extended_operation_s
| ldap_extended_operation
| ldap_send_initial_request
| ldap_new_connection
| ldap_int_open_connection
| ldap_connect_to_host: server.intranet
| ldap_new_socket: 3
| ldap_prepare_socket: 3
| ldap_connect_to_host: Trying 10.1.1.7:636
| ldap_connect_timeout: fd: 3 tm: -1 async: 0
| ldap_ndelay_on: 3
| ldap_is_sock_ready: 3
| ldap_ndelay_off: 3
| ldap_open_defconn: successful
| ldap_send_server_request
| ber_flush: 31 bytes to sd 3
| ldap_result msgid 1
| ldap_chkResponseList for msgid=1, all=1
| ldap_chkResponseList returns NULL
| wait4msg (infinite timeout), msgid 1
| wait4msg continue, msgid 1, all 1
| ** Connections:
| * host: server.intranet  port: 636  (default)
|   refcnt: 2  status: Connected
|   last used: Sat Apr 19 14:05:27 2003
|
| ** Outstanding Requests:
|  * msgid 1,  origid 1, status InProgress
|    outstanding referrals 0, parent count 0
| ** Response Queue:
|    Empty
| ldap_chkResponseList for msgid=1, all=1
| ldap_chkResponseList returns NULL
| do_ldap_select
| read1msg: msgid 1, all 1
| ber_get_next
| ber_get_next failed.
| ldap_perror
| ldap_start_tls: Can't contact LDAP server
|
| В логах сервера:
|
| Apr 19 14:18:18 server slapd[21284]: slapd startup: initiated.
| Apr 19 14:18:18 server slapd[21284]: slapd starting
| Apr 19 14:18:18 server slapd[21294]: daemon: added 6r
| Apr 19 14:18:18 server slapd[21294]: daemon: select: listen=6
| active_threads=0 tvp=NULL
| Apr 19 14:18:41 server slapd[21294]: daemon: activity on 1
| descriptors
| Apr 19 14:18:41 server slapd[21294]: daemon: new connection on 9
| Apr 19 14:18:41 server slapd[21294]: daemon: conn=0 fd=9
| connection from IP=10.1.1.10:32987 (IP=10.1.1.7:636) accepted.
| Apr 19 14:18:41 server slapd[21294]: daemon: added 9r
| Apr 19 14:18:41 server slapd[21294]: daemon: activity on:
| Apr 19 14:18:41 server slapd[21294]:
| Apr 19 14:18:41 server slapd[21294]: daemon: select: listen=6
| active_threads=0 tvp=NULL
| Apr 19 14:18:41 server slapd[21294]: daemon: activity on 1
| descriptors
| Apr 19 14:18:41 server slapd[21294]: daemon: activity on:
| Apr 19 14:18:41 server slapd[21294]:  9r
| Apr 19 14:18:41 server slapd[21294]:
| Apr 19 14:18:41 server slapd[21294]: daemon: read activity on 9
| Apr 19 14:18:41 server slapd[21294]: connection_get(9)
| Apr 19 14:18:41 server slapd[21294]: connection_get(9): got
| connid=0
| Apr 19 14:18:41 server slapd[21294]: connection_read(9): checking
| for input on id=0
| Apr 19 14:18:41 server slapd[21294]: connection_read(9): TLS
| accept error error=-1 id=0, closing
| Apr 19 14:18:41 server slapd[21294]: connection_closing: readying
| conn=0 sd=9 for close
| Apr 19 14:18:41 server slapd[21294]: connection_close: conn=0
| sd=9
| Apr 19 14:18:41 server slapd[21294]: daemon: removing 9
| Apr 19 14:18:41 server slapd[21294]: conn=-1 fd=9 closed
| Apr 19 14:18:41 server slapd[21294]: daemon: select: listen=6
| active_threads=0 tvp=NULL
| Apr 19 14:18:41 server slapd[21294]: daemon: activity on 1
| descriptors
| Apr 19 14:18:41 server slapd[21294]: daemon: select: listen=6
| active_threads=0 tvp=NULL
|
| Что я делаю не так?
|
| ----
| Алексей.
| _______________________________________________
| Community mailing list
| Community@altlinux.ru
| http://www.altlinux.ru/mailman/listinfo/community


- --
With best regards                    System administrator
Igor Muratov                         mailto:migor at altlinux.ru
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE+o8Z7qjgjB/MK76QRAq3HAKCgxsRK8fV0+LqEPByIGc/Hm9Id0gCgrUSi
yzNRPb/kqF/xG+iFxsYJQog=
=MGWg
-----END PGP SIGNATURE-----



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Comm] OpenLDAP и SSL
  2003-04-21 10:22 ` Igor Muratov
@ 2003-04-22  6:14   ` Alexey Borovskoy
  2003-04-22 10:43     ` Igor Muratov
  0 siblings, 1 reply; 13+ messages in thread
From: Alexey Borovskoy @ 2003-04-22  6:14 UTC (permalink / raw)
  To: community

* 21 Апрель 2003 23:22 Igor Muratov <migor@altlinux.ru>

>
> Есть еще подозрение что сервер не подхватил сертификат а на
> 636 порт законнектился без всякого ssl.
> Попрбуйте зайти туда telnet'ом

Захожу. Черный экран. Затем сервер сбрасывает соединение.
Он должен что-то сказать?

В Гугле пишут, что надо в сертификатах передавать какой-то 
параметр DH. Что это такое я не знаю.

Я думал что я неправильно генерю сертификаты. openssl s_server и 
openssl s_client радостно через них общаются.

Вытащил из Дедала openldap-2.1 поставил, запустил. Через SSL/TLS 
не коннектится. Ошибка та же. И не работает с BDB.
Откатился на openldap-2.0.

Сегодня вытащил свежий stunnel буду дома собирать. Костыль 
конечно, но что делать.

Может общими усилиями локализовать и ликвидировать багу?
Я понимаю, что я один наступил на эти грабли. Но эти грабли 
повторяются на трех инсталляциях openldap на трех разных 
машинах/конфигурациях.

У меня такое ощущение, что при аудите части кода openldap, 
реализующего взаимодействие с ASN.1 что-то очень сильно 
поломали.

Может у кого получилась работоспособная связка
openldap-2.0 + SASL?

----
Алексей.
JID:alb@jabber.ru


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Comm] OpenLDAP и SSL
  2003-04-22  6:14   ` Alexey Borovskoy
@ 2003-04-22 10:43     ` Igor Muratov
  2003-04-22 22:18       ` Alexey Borovskoy
  0 siblings, 1 reply; 13+ messages in thread
From: Igor Muratov @ 2003-04-22 10:43 UTC (permalink / raw)
  To: community

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alexey Borovskoy пишет:
| * 21 Апрель 2003 23:22 Igor Muratov <migor@altlinux.ru>
|
|>Есть еще подозрение что сервер не подхватил сертификат а на
|>636 порт законнектился без всякого ssl.
|>Попрбуйте зайти туда telnet'ом
|
|
| Захожу. Черный экран. Затем сервер сбрасывает соединение.
| Он должен что-то сказать?
|
| В Гугле пишут, что надо в сертификатах передавать какой-то
| параметр DH. Что это такое я не знаю.
|
| Я думал что я неправильно генерю сертификаты. openssl s_server и
| openssl s_client радостно через них общаются.
|
| Вытащил из Дедала openldap-2.1 поставил, запустил. Через SSL/TLS
| не коннектится. Ошибка та же. И не работает с BDB.
| Откатился на openldap-2.0.

А не пробовали брать openldap из более ранних дистрибутивов? К примеру в
спринге это точно работало. В ALM2.0 кажется тоже.

|
| Сегодня вытащил свежий stunnel буду дома собирать. Костыль
| конечно, но что делать.

Может не стоит тратить на это время?

|
| Может общими усилиями локализовать и ликвидировать багу?
| Я понимаю, что я один наступил на эти грабли. Но эти грабли
| повторяются на трех инсталляциях openldap на трех разных
| машинах/конфигурациях.

Тогда уж покажите конфииг полностью.

|
| У меня такое ощущение, что при аудите части кода openldap,
| реализующего взаимодействие с ASN.1 что-то очень сильно
| поломали.
|
| Может у кого получилась работоспособная связка
| openldap-2.0 + SASL?
|
| ----
| Алексей.
| JID:alb@jabber.ru
| _______________________________________________
| Community mailing list
| Community@altlinux.ru
| http://www.altlinux.ru/mailman/listinfo/community


- --
With best regards                    System administrator
Igor Muratov                         mailto:migor at altlinux.ru
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE+pRy2qjgjB/MK76QRAtlaAJwKgI+Gn48I4jbaXMxemf9HqcM8igCbBQ0c
Wcm55F2rhHj/9uZSRGdhiwM=
=Dos8
-----END PGP SIGNATURE-----



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Comm] OpenLDAP и SSL
  2003-04-22 10:43     ` Igor Muratov
@ 2003-04-22 22:18       ` Alexey Borovskoy
  2003-05-05 16:17         ` Igor Muratov
  0 siblings, 1 reply; 13+ messages in thread
From: Alexey Borovskoy @ 2003-04-22 22:18 UTC (permalink / raw)
  To: community

[-- Attachment #1: Type: text/plain, Size: 1203 bytes --]

* 22 Апрель 2003 23:43 Igor Muratov <migor@altlinux.ru>

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Alexey Borovskoy пишет:
> | * 21 Апрель 2003 23:22 Igor Muratov <migor@altlinux.ru>
> |
> |>Есть еще подозрение что сервер не подхватил сертификат а на
> |>636 порт законнектился без всякого ssl.
> |>Попрбуйте зайти туда telnet'ом
> |
> | Захожу. Черный экран. Затем сервер сбрасывает соединение.
> | Он должен что-то сказать?

В файле 1.txt результат работы openssl s_client на домашней 
машине.

> А не пробовали брать openldap из более ранних дистрибутивов? К
> примеру в спринге это точно работало. В ALM2.0 кажется тоже.

Да. На Мастере 2.0 это точно работало.

>
> | Сегодня вытащил свежий stunnel буду дома собирать. Костыль
> | конечно, но что делать.
>
> Может не стоит тратить на это время?

Хотелось бы чтобы заработало без костылей.

>
> | Может общими усилиями локализовать и ликвидировать багу?
> | Я понимаю, что я один наступил на эти грабли. Но эти грабли
> | повторяются на трех инсталляциях openldap на трех разных
> | машинах/конфигурациях.
>
> Тогда уж покажите конфииг полностью.

Какие именно?
К письму приложил slapd.conf и сертификат

----
Алексей.
JID:alb@jabber.ru

[-- Attachment #2: 1.txt --]
[-- Type: text/plain, Size: 1004 bytes --]

[alb@alb 2]$ openssl s_client -connect alb.home:636 -debug
CONNECTED(00000004)
write to 0809BEB8 [0809BF00] (130 bytes => 130 (0x82))
0000 - 80 80 01 03 01 00 57 00-00 00 20 00 00 16 00 00   ......W... .....
0010 - 13 00 00 0a 07 00 c0 00-00 66 00 00 07 00 00 05   .........f......
0020 - 00 00 04 05 00 80 03 00-80 01 00 80 08 00 80 00   ................
0030 - 00 65 00 00 64 00 00 63-00 00 62 00 00 61 00 00   .e..d..c..b..a..
0040 - 60 00 00 15 00 00 12 00-00 09 06 00 40 00 00 14   `...........@...
0050 - 00 00 11 00 00 08 00 00-06 00 00 03 04 00 80 02   ................
0060 - 00 80 aa dd 8f a3 ad c5-70 56 63 2c 43 16 f6 1c   ........pVc,C...
0070 - dd 82 3a 80 cf 8d b0 f4-67 94 e4 cb c0 4f cc 61   ..:.....g....O.a
0080 - 27 ad                                             '.
read from 0809BEB8 [080A1460] (7 bytes => 7 (0x7))
0000 - 15 03 01 00 02 02 28                              ......(
2140:error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure:s23_clnt.c:465:

[-- Attachment #3: ldap.pem --]
[-- Type: application/x-x509-ca-cert, Size: 2909 bytes --]

[-- Attachment #4: slapd.conf --]
[-- Type: text/x-csrc, Size: 5458 bytes --]

# $OpenLDAP: pkg/ldap/servers/slapd/slapd.conf,v 1.8.8.7 2001/09/27 20:00:31 kurt Exp $
#
# See slapd.conf(5) for details on configuration options.
# This file should NOT be world readable.
#
# Modified by Christian Zoffoli <czoffoli@linux-mandrake.com>
# Version 0.2
# 
# Modified by Volkov Serge <vserge@altlinux.ru>
# Version 0.3
# Last modification at 26 Jun 2002
#

# Default schemas
include	/etc/openldap/schema/core.schema
include	/etc/openldap/schema/cosine.schema
include	/etc/openldap/schema/inetorgperson.schema
include	/etc/openldap/schema/misc.schema
include	/etc/openldap/schema/nis.schema
include	/etc/openldap/schema/openldap.schema 
#include	/etc/openldap/schema/krb5-kdc.schema
#include	/etc/openldap/schema/kerberosobject.schema
#include	/etc/openldap/schema/corba.schema 
#include	/etc/openldap/schema/java.schema 

# Addon schemas
#include	/etc/openldap/schema/rfc822-MailMember.schema
#include	/etc/openldap/schema/pilot.schema
#include	/etc/openldap/schema/autofs.schema
#include	/etc/openldap/schema/samba.schema
#include	/etc/openldap/schema/qmail.schema
#include	/etc/openldap/schema/qmailControl.schema
#include	/etc/openldap/schema/cron.schema
#include	/etc/openldap/schema/dns.schema
#include	/etc/openldap/schema/trust.schema
#include	/etc/openldap/schema/turbo.schema

# Netscape Roaming
#include	/etc/openldap/schema/mull.schema
#include	/etc/openldap/schema/netscape-profile.schema

# Local schema, that you will be constract 
#include	/etc/openldap/schema/local.schema

# Load dynamic backend modules:
#modulepath	/usr/lib/openldap
#moduleload	back_bdb.la
# moduleload	back_ldap.la
#moduleload	back_ldbm.la
# moduleload	back_passwd.la
# moduleload	back_shell.la

# Do not enable referrals until AFTER you have a working directory
# service AND an understanding of referrals.
#referral	ldap://root.openldap.org

pidfile		/var/run/slapd.pid
argsfile	/var/run/slapd.args

# To allow TLS-enabled connections, create /usr/share/ssl/certs/slapd.pem
# and uncomment the following lines.
 TLSCipherSuite          HIGH:MEDIUM:LOW:+SSLv2
 TLSCertificateFile      /etc/openldap/ldap.pem
 TLSCertificateKeyFile   /etc/openldap/ldap.pem
# TLSCACertificateFile    /etc/openldap/ldap.pem


# Define global ACLs to disable default read access.
#include 	/etc/openldap/slapd.access.conf

#
# Sample Access Control
#	Allow read access of root DSE
#	Allow self write access
#	Allow authenticated users read access
#	Allow anonymous users to authenticate
#
#access to dn="" by * read
#access to *
#	by self write
#	by users read
#	by anonymous auth
#
# if no access controls are present, the default is:
#	Allow read by all
#
# rootdn can always write!

# The example in development not use if you don't known what are you doing!!!
# Basic ACL
# access to attr=userPassword
#         by self write
#         by anonymous auth
#         by dn="uid=root,ou=People,dc=example,dc=com" write
#         by * none
#  
# access to *
#         by dn="uid=root,ou=People,dc=example,dc=com" write
#         by * read



#######################################################################
# ldbm database definitions
#######################################################################

database	ldbm
suffix          "dc=intranet"
rootdn          "cn=ldapadmin,dc=intranet"

# Cleartext passwords, especially for the rootdn, should
# be avoid.  See slappasswd(8) and slapd.conf(5) for details.
# Use of strong authentication encouraged.
rootpw	secret
#rootpw	{crypt}ijFYNcSNctBYg

# The database directory MUST exist prior to running slapd AND 
# should only be accessible by the slapd/tools. Mode 700 recommended.
directory	/var/lib/ldap/bases/intranet

# LogLevel information
# if you want enable debuggin mode
# choose one of the next
# and check /etc/syslog.conf for line
# "LOCAL4.*	/var/log/ldap/log" exist
# ---------------------------------------------------
# |	-1	|	enable all debugging
# |	0	|	no debugging
# |	1	|	trace function calls
# |	2	|	debug packet handling
# |	4	|	heavy trace debugging
# |	8	|	connection management
# |	16	|	print out packets sent and received
# |	32	|	search filter processing
# |	64	|	configuration file processing
# |	128	|	access control list processing
# | 256	|	stats log connections/operations/results
# |	512	|	stats log entries sent
# | 1024|	print communication with shell backends
# | 2048|	print entry parsing debugging
# ---------------------------------------------------
loglevel -1

# Indices to maintain
#index	objectClass	eq
index objectClass,uid,uidNumber,gidNumber     eq
index cn,mail,surname,givenname               eq,subinitial


# Sample security restrictions
#
#   Disallow clear text exchange of passwords
# disallow bind_simple_unprotected
#
#	Require integrity protection (prevent hijacking)
#	Require 112-bit (3DES or better) encryption for updates
#	Require 63-bit encryption for simple bind
# security ssf=1 update_ssf=112 simple_bind=64

# Sample access control policy:
#	Root DSE: allow anyone to read it
#	Subschema (sub)entry DSE: allow anyone to read it
#	Other DSEs:
#		Allow self write access
#		Allow authenticated users read access
#		Allow anonymous users to authenticate
#	Directives needed to implement policy:
# access to dn.base="" by * read
# access to dn.base="cn=Subschema" by * read
# access to *
#	by self write
#	by users read
#	by anonymous auth
#
# if no access controls are present, the default policy is:
#	Allow read by all
#
# rootdn can always write!


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Comm] OpenLDAP и SSL
  2003-04-19  1:53 [Comm] OpenLDAP и SSL Alexey Borovskoy
  2003-04-19 10:37 ` Maxim Tyurin
  2003-04-21 10:22 ` Igor Muratov
@ 2003-04-22 22:30 ` Dmitry Lebkov
  2003-04-23  2:06   ` Alexey Borovskoy
  2003-04-23  2:17   ` Alexey Borovskoy
  2 siblings, 2 replies; 13+ messages in thread
From: Dmitry Lebkov @ 2003-04-22 22:30 UTC (permalink / raw)
  To: community

On Sat, 19 Apr 2003 14:53:48 +1300
Alexey Borovskoy <alexey_borovskoy@pochtamt.ru> wrote:

> Добрый день.
> 
> Не получается подружить openldap с openssl.
> Без ssl ldap работает нормально. 
> 
> Дано:
> openldap-servers-2.0.27-alt5
> openldap-2.0.27-alt5
> openssl-0.9.6i-alt3
> 
> 1. Генерю сертификат с помощью
> openssl req -new -x509 -nodes -out ldap.pem -keyout ldap.pem
> 
> cn прописываю как server.intranet. В DNS все нормально.

Имя 'server.intranet' присутствует в ДНС? И в обратной зоне?
cn в сертификате должно совпадать с DNS-именем, соответствущем
ip-адресу, на котором слушает LDAP-сервер. 

> 2. Получившийся сертификат кладу в /etc/openldap/
> 
> 3. В /etc/openldap/slapd.conf раскоментирую строчки
>  TLSCipherSuite         HIGH:MEDIUM:+SSLv2
>  TLSCertificateFile      /etc/openldap/ldap.pem
>  TLSCertificateKeyFile   /etc/openldap/ldap.pem
>  TLSCACertificateFile    /etc/openldap/ldap.pem
> 
> 4. Делаю service ldap start
> 
> 5. Делаю netstat -tl
> tcp        0      0 server.intranet:ldaps   *:*     LISTEN
> 
> 6. Коннекчусь GQ, прописываю пароль rootdn и получаю ошибку
> Can't contact LDAP server

GQ использует TLS. Т.е. тебе в конфиге надо указать порт 389
и поствить галку 'Enable TLS'.

У меня так (через TLS на 389 порту) работает 3 сервера (мастер
и две реплики), GQ, nss_ldap и Courier-IMAP.

Вот ... %)

-- 
WBR, Dmitry Lebkov


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Comm] OpenLDAP и SSL
  2003-04-22 22:30 ` Dmitry Lebkov
@ 2003-04-23  2:06   ` Alexey Borovskoy
  2003-04-23  2:17   ` Alexey Borovskoy
  1 sibling, 0 replies; 13+ messages in thread
From: Alexey Borovskoy @ 2003-04-23  2:06 UTC (permalink / raw)
  To: community

* 23 Апрель 2003 11:30 Dmitry Lebkov <dima@sakhalin.ru>

> On Sat, 19 Apr 2003 14:53:48 +1300
>
> > cn прописываю как server.intranet. В DNS все нормально.
>
> Имя 'server.intranet' присутствует в ДНС? И в обратной зоне?
> cn в сертификате должно совпадать с DNS-именем, соответствущем
> ip-адресу, на котором слушает LDAP-сервер.

Да, присутствует.

>
> > 2. Получившийся сертификат кладу в /etc/openldap/
> >
> > 3. В /etc/openldap/slapd.conf раскоментирую строчки
> >  TLSCipherSuite         HIGH:MEDIUM:+SSLv2
> >  TLSCertificateFile      /etc/openldap/ldap.pem
> >  TLSCertificateKeyFile   /etc/openldap/ldap.pem
> >  TLSCACertificateFile    /etc/openldap/ldap.pem
> >
> > 4. Делаю service ldap start
> >
> > 5. Делаю netstat -tl
> > tcp        0      0 server.intranet:ldaps   *:*     LISTEN
> >
> > 6. Коннекчусь GQ, прописываю пароль rootdn и получаю ошибку
> > Can't contact LDAP server
>
> GQ использует TLS. Т.е. тебе в конфиге надо указать порт 389
> и поствить галку 'Enable TLS'.
>

Указал. коннекчусь. получаю
SSL23_GET_SERVERHELLO:ssl handshake failure

> У меня так (через TLS на 389 порту) работает 3 сервера (мастер
> и две реплики), GQ, nss_ldap и Courier-IMAP.
>
> Вот ... %)

Может дело в сертификате?

----
Алексей.



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Comm] OpenLDAP и SSL
  2003-04-22 22:30 ` Dmitry Lebkov
  2003-04-23  2:06   ` Alexey Borovskoy
@ 2003-04-23  2:17   ` Alexey Borovskoy
  2003-04-23  2:33     ` Dmitry Lebkov
  1 sibling, 1 reply; 13+ messages in thread
From: Alexey Borovskoy @ 2003-04-23  2:17 UTC (permalink / raw)
  To: community

* 23 Апрель 2003 11:30 Dmitry Lebkov <dima@sakhalin.ru>

> On Sat, 19 Apr 2003 14:53:48 +1300
>
> Alexey Borovskoy <alexey_borovskoy@pochtamt.ru> wrote:

> > 3. В /etc/openldap/slapd.conf раскоментирую строчки
> >  TLSCipherSuite         HIGH:MEDIUM:+SSLv2
> >  TLSCertificateFile      /etc/openldap/ldap.pem
> >  TLSCertificateKeyFile   /etc/openldap/ldap.pem
> >  TLSCACertificateFile    /etc/openldap/ldap.pem

сюда приписал еще TLSClientVerify 0

> >
> > 4. Делаю service ldap start
> >
> > 5. Делаю netstat -tl
> > tcp        0      0 server.intranet:ldaps   *:*     LISTEN

Здесь видно ldaps и ldap

----
Алексей.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Comm] OpenLDAP и SSL
  2003-04-23  2:17   ` Alexey Borovskoy
@ 2003-04-23  2:33     ` Dmitry Lebkov
  2003-04-23  3:28       ` Alexey Borovskoy
  0 siblings, 1 reply; 13+ messages in thread
From: Dmitry Lebkov @ 2003-04-23  2:33 UTC (permalink / raw)
  To: community

On Wed, 23 Apr 2003 15:17:49 +1300
Alexey Borovskoy <alexey_borovskoy@pochtamt.ru> wrote:

> * 23 Апрель 2003 11:30 Dmitry Lebkov <dima@sakhalin.ru>
> 
> > On Sat, 19 Apr 2003 14:53:48 +1300
> >
> > Alexey Borovskoy <alexey_borovskoy@pochtamt.ru> wrote:
> 
> > > 3. В /etc/openldap/slapd.conf раскоментирую строчки
> > >  TLSCipherSuite         HIGH:MEDIUM:+SSLv2
> > >  TLSCertificateFile      /etc/openldap/ldap.pem
> > >  TLSCertificateKeyFile   /etc/openldap/ldap.pem
> > >  TLSCACertificateFile    /etc/openldap/ldap.pem
> 
> сюда приписал еще TLSClientVerify 0

У меня работает с теми параметрами, которые в конфиге по-умолчанию
закоментарены.

> 
> > >
> > > 4. Делаю service ldap start
> > >
> > > 5. Делаю netstat -tl
> > > tcp        0      0 server.intranet:ldaps   *:*     LISTEN
> 
> Здесь видно ldaps и ldap

А соеднияться с использованием TLS ты пытаешся на какой порт?


-- 
WBR, Dmitry Lebkov


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Comm] OpenLDAP и SSL
  2003-04-23  2:33     ` Dmitry Lebkov
@ 2003-04-23  3:28       ` Alexey Borovskoy
  0 siblings, 0 replies; 13+ messages in thread
From: Alexey Borovskoy @ 2003-04-23  3:28 UTC (permalink / raw)
  To: community

* 23 Апрель 2003 15:33 Dmitry Lebkov <dima@sakhalin.ru>

> On Wed, 23 Apr 2003 15:17:49 +1300
>

Все. Проблема решена.
В slapd.conf в конце каждой строки нажал Enter.
После этого все заработало.
Шаманство.

----
Алексей.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Comm] OpenLDAP и SSL
  2003-04-22 22:18       ` Alexey Borovskoy
@ 2003-05-05 16:17         ` Igor Muratov
  0 siblings, 0 replies; 13+ messages in thread
From: Igor Muratov @ 2003-05-05 16:17 UTC (permalink / raw)
  To: community

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alexey Borovskoy пишет:
| * 22 Апрель 2003 23:43 Igor Muratov <migor@altlinux.ru>
|
|>-----BEGIN PGP SIGNED MESSAGE-----
|>Hash: SHA1
|>
|>Alexey Borovskoy пишет:
|>| * 21 Апрель 2003 23:22 Igor Muratov <migor@altlinux.ru>
|>|
|>|>Есть еще подозрение что сервер не подхватил сертификат а на
|>|>636 порт законнектился без всякого ssl.
|>|>Попрбуйте зайти туда telnet'ом
|>|
|>| Захожу. Черный экран. Затем сервер сбрасывает соединение.
|>| Он должен что-то сказать?
|
|
| В файле 1.txt результат работы openssl s_client на домашней
| машине.
|
|
|>А не пробовали брать openldap из более ранних дистрибутивов? К
|>примеру в спринге это точно работало. В ALM2.0 кажется тоже.
|
|
| Да. На Мастере 2.0 это точно работало.
|
|
|>| Сегодня вытащил свежий stunnel буду дома собирать. Костыль
|>| конечно, но что делать.
|>
|>Может не стоит тратить на это время?
|
|
| Хотелось бы чтобы заработало без костылей.
|
|
|>| Может общими усилиями локализовать и ликвидировать багу?
|>| Я понимаю, что я один наступил на эти грабли. Но эти грабли
|>| повторяются на трех инсталляциях openldap на трех разных
|>| машинах/конфигурациях.
|>
|>Тогда уж покажите конфииг полностью.
|
|
| Какие именно?
| К письму приложил slapd.conf и сертификат
|
| ----
| Алексей.
| JID:alb@jabber.ru
|
|
| ------------------------------------------------------------------------
|
| [alb@alb 2]$ openssl s_client -connect alb.home:636 -debug
| CONNECTED(00000004)
| write to 0809BEB8 [0809BF00] (130 bytes => 130 (0x82))
| 0000 - 80 80 01 03 01 00 57 00-00 00 20 00 00 16 00 00   ......W... .....
| 0010 - 13 00 00 0a 07 00 c0 00-00 66 00 00 07 00 00 05   .........f......
| 0020 - 00 00 04 05 00 80 03 00-80 01 00 80 08 00 80 00   ................
| 0030 - 00 65 00 00 64 00 00 63-00 00 62 00 00 61 00 00   .e..d..c..b..a..
| 0040 - 60 00 00 15 00 00 12 00-00 09 06 00 40 00 00 14   `...........@...
| 0050 - 00 00 11 00 00 08 00 00-06 00 00 03 04 00 80 02   ................
| 0060 - 00 80 aa dd 8f a3 ad c5-70 56 63 2c 43 16 f6 1c   ........pVc,C...
| 0070 - dd 82 3a 80 cf 8d b0 f4-67 94 e4 cb c0 4f cc 61   ..:.....g....O.a
| 0080 - 27 ad                                             '.
| read from 0809BEB8 [080A1460] (7 bytes => 7 (0x7))
| 0000 - 15 03 01 00 02 02 28                              ......(
| 2140:error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert
handshake failure:s23_clnt.c:465:
|
|
| ------------------------------------------------------------------------
|
| # $OpenLDAP: pkg/ldap/servers/slapd/slapd.conf,v 1.8.8.7 2001/09/27
20:00:31 kurt Exp $
| #
| # See slapd.conf(5) for details on configuration options.
| # This file should NOT be world readable.
| #
| # Modified by Christian Zoffoli <czoffoli@linux-mandrake.com>
| # Version 0.2
| #
| # Modified by Volkov Serge <vserge@altlinux.ru>
| # Version 0.3
| # Last modification at 26 Jun 2002
| #
|
| # Default schemas
| include	/etc/openldap/schema/core.schema
| include	/etc/openldap/schema/cosine.schema
| include	/etc/openldap/schema/inetorgperson.schema
| include	/etc/openldap/schema/misc.schema
| include	/etc/openldap/schema/nis.schema
| include	/etc/openldap/schema/openldap.schema
| #include	/etc/openldap/schema/krb5-kdc.schema
| #include	/etc/openldap/schema/kerberosobject.schema
| #include	/etc/openldap/schema/corba.schema
| #include	/etc/openldap/schema/java.schema
|
| # Addon schemas
| #include	/etc/openldap/schema/rfc822-MailMember.schema
| #include	/etc/openldap/schema/pilot.schema
| #include	/etc/openldap/schema/autofs.schema
| #include	/etc/openldap/schema/samba.schema
| #include	/etc/openldap/schema/qmail.schema
| #include	/etc/openldap/schema/qmailControl.schema
| #include	/etc/openldap/schema/cron.schema
| #include	/etc/openldap/schema/dns.schema
| #include	/etc/openldap/schema/trust.schema
| #include	/etc/openldap/schema/turbo.schema
|
| # Netscape Roaming
| #include	/etc/openldap/schema/mull.schema
| #include	/etc/openldap/schema/netscape-profile.schema
|
| # Local schema, that you will be constract
| #include	/etc/openldap/schema/local.schema
|
| # Load dynamic backend modules:
| #modulepath	/usr/lib/openldap
| #moduleload	back_bdb.la
| # moduleload	back_ldap.la
| #moduleload	back_ldbm.la
| # moduleload	back_passwd.la
| # moduleload	back_shell.la
|
| # Do not enable referrals until AFTER you have a working directory
| # service AND an understanding of referrals.
| #referral	ldap://root.openldap.org
|
| pidfile		/var/run/slapd.pid
| argsfile	/var/run/slapd.args
|
| # To allow TLS-enabled connections, create /usr/share/ssl/certs/slapd.pem
| # and uncomment the following lines.
|  TLSCipherSuite          HIGH:MEDIUM:LOW:+SSLv2
|  TLSCertificateFile      /etc/openldap/ldap.pem
|  TLSCertificateKeyFile   /etc/openldap/ldap.pem
Проблема похоже вот здесь. Предшествующих пробелов быть не дожно
Вот выдержка из /etc/init.d/ldap
if grep -qs ^TLS "$CONFIG"; then
~   daemon ${SLAPD} -u ldap -h '"ldap:/// ldaps:///"' $OPTIONS
$SLAPD_OPTIONS
~        RETVAL=$?
~    else
~        daemon ${SLAPD} -u ldap -h 'ldap://127.0.0.1/' $OPTIONS
$SLAPD_OPTIONS
~        RETVAL=$?
~    fi



| # TLSCACertificateFile    /etc/openldap/ldap.pem
|
|
| # Define global ACLs to disable default read access.
| #include 	/etc/openldap/slapd.access.conf
|
| #
| # Sample Access Control
| #	Allow read access of root DSE
| #	Allow self write access
| #	Allow authenticated users read access
| #	Allow anonymous users to authenticate
| #
| #access to dn="" by * read
| #access to *
| #	by self write
| #	by users read
| #	by anonymous auth
| #
| # if no access controls are present, the default is:
| #	Allow read by all
| #
| # rootdn can always write!
|
| # The example in development not use if you don't known what are you
doing!!!
| # Basic ACL
| # access to attr=userPassword
| #         by self write
| #         by anonymous auth
| #         by dn="uid=root,ou=People,dc=example,dc=com" write
| #         by * none
| #
| # access to *
| #         by dn="uid=root,ou=People,dc=example,dc=com" write
| #         by * read
|
|
|
| #######################################################################
| # ldbm database definitions
| #######################################################################
|
| database	ldbm
| suffix          "dc=intranet"
| rootdn          "cn=ldapadmin,dc=intranet"
|
| # Cleartext passwords, especially for the rootdn, should
| # be avoid.  See slappasswd(8) and slapd.conf(5) for details.
| # Use of strong authentication encouraged.
| rootpw	secret
| #rootpw	{crypt}ijFYNcSNctBYg
|
| # The database directory MUST exist prior to running slapd AND
| # should only be accessible by the slapd/tools. Mode 700 recommended.
| directory	/var/lib/ldap/bases/intranet
|
| # LogLevel information
| # if you want enable debuggin mode
| # choose one of the next
| # and check /etc/syslog.conf for line
| # "LOCAL4.*	/var/log/ldap/log" exist
| # ---------------------------------------------------
| # |	-1	|	enable all debugging
| # |	0	|	no debugging
| # |	1	|	trace function calls
| # |	2	|	debug packet handling
| # |	4	|	heavy trace debugging
| # |	8	|	connection management
| # |	16	|	print out packets sent and received
| # |	32	|	search filter processing
| # |	64	|	configuration file processing
| # |	128	|	access control list processing
| # | 256	|	stats log connections/operations/results
| # |	512	|	stats log entries sent
| # | 1024|	print communication with shell backends
| # | 2048|	print entry parsing debugging
| # ---------------------------------------------------
| loglevel -1
|
| # Indices to maintain
| #index	objectClass	eq
| index objectClass,uid,uidNumber,gidNumber     eq
| index cn,mail,surname,givenname               eq,subinitial
|
|
| # Sample security restrictions
| #
| #   Disallow clear text exchange of passwords
| # disallow bind_simple_unprotected
| #
| #	Require integrity protection (prevent hijacking)
| #	Require 112-bit (3DES or better) encryption for updates
| #	Require 63-bit encryption for simple bind
| # security ssf=1 update_ssf=112 simple_bind=64
|
| # Sample access control policy:
| #	Root DSE: allow anyone to read it
| #	Subschema (sub)entry DSE: allow anyone to read it
| #	Other DSEs:
| #		Allow self write access
| #		Allow authenticated users read access
| #		Allow anonymous users to authenticate
| #	Directives needed to implement policy:
| # access to dn.base="" by * read
| # access to dn.base="cn=Subschema" by * read
| # access to *
| #	by self write
| #	by users read
| #	by anonymous auth
| #
| # if no access controls are present, the default policy is:
| #	Allow read by all
| #
| # rootdn can always write!
|


- --
With best regards                    System administrator
Igor Muratov                         mailto:migor at altlinux.ru
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE+to6HqjgjB/MK76QRAoqkAJ90cpsx3b4kSWGA19YEFbH1vFGQMgCdGmbV
HeJevYGof1M1EjXZBM5ETus=
=bIKe
-----END PGP SIGNATURE-----



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2003-05-05 16:17 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-19  1:53 [Comm] OpenLDAP и SSL Alexey Borovskoy
2003-04-19 10:37 ` Maxim Tyurin
2003-04-21  3:11   ` Alexey Borovskoy
2003-04-21 10:22 ` Igor Muratov
2003-04-22  6:14   ` Alexey Borovskoy
2003-04-22 10:43     ` Igor Muratov
2003-04-22 22:18       ` Alexey Borovskoy
2003-05-05 16:17         ` Igor Muratov
2003-04-22 22:30 ` Dmitry Lebkov
2003-04-23  2:06   ` Alexey Borovskoy
2003-04-23  2:17   ` Alexey Borovskoy
2003-04-23  2:33     ` Dmitry Lebkov
2003-04-23  3:28       ` Alexey Borovskoy

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git