We have an openldap server and don't want to allow unencrypted communication, so acceptable is either tls over port 389 (starttls
) or ssl over 636 (ldaps
).
As we use slapd.conf for configuration, olcSecurity
isn't an option.
TLSCipherSuite
seems to be the way to do it with slapd.conf. But when using that slapd either doesn't start or ignores the settings (i.e. accepts unencrypted requests).
slapd doesn't start (error: TLS init def ctx failed: -1) when using:
- TLSCipherSuite ALL
- TLSCipherSuite Default
- TLSCipherSuite ALL:!NULL
- TLSCipherSuite ALL:!aNULL
- TLSCipherSuite AES256-SHA #one of the ciphers offered by openssl
slapd starts but accepts unencrypted requests when using:
- TLSCipherSuite NORMAL
- TLSCipherSuite NORMAL:!NULL #would be acceptable
- TLSCipherSuite !NULL #would be acceptable
We test with
ldapsearch -L -x -W -h [SERVER] -D [USER] - b [SEARCHBASE] uid=[USER]
(unencrypted)
and
ldapsearch -L -x -W -ZZ -h [SERVER] -D [USER] - b [SEARCHBASE] uid=[USER]
(encrypted)
The os openldap is running on is debian 8.7. The openldap version seems to be using gnutls, not openssl, so that may be the reason for the problems.
But the last three TLSCipherSuite
variations seem to be valid syntax, at least slapd starts without errors. Why doesn't !NULL
prevent slapd from accepting unencrypted requests? The last two (use any cipher available but don't allow no cipher) would be acceptable.
Are additional settings / parameters required?
Note that we tried the suggestions given here (as described above) but that didn't work.
Stop using
slapd.conf
, but that's just general advice. Most if not allolc*
directives fromslapd-config
are available as non-olc directives for aslapd.conf
style configuration.For
security
something on the order ofsecurity tls=1
should be sufficient unless you also do non-TLS SASL.Your manipulations of
TLSCipherSuite
will not work because those only control the acceptable ciphers once TLS is in use, it doesn't matter in choosing whether or not to use/require TLS. For that, you'll want to usesecurity
. However, you should use better TLS options, e.g. at leastTLSCipherSuite HIGH:!aNull:!MD5:@STRENGTH
andolcTLSProtocolMin 3.1
.From
slapd.conf(5)
:If you must continue using slapd.conf, then this thread holds the answer you need:
In terms of cipher selection, Zytrax's LDAP for Rocket Scientists provides some hints:
You need to change
TLS_CIPHER_SUITE
toTLSCipherSuite
, and I suspect you might want to check what cipher names will work (from the admin guide):