[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: about TLS and Openldap ...
Hi,
Waldemar Brodkorb wrote:
Your slapd binds to port 636/ldapssl and 389/ldap.
If you don't remove 'ldap:///' your server will also respond on non
encrypted traffic.
I removed "ldap:///" and tested it with PHP - the same log as before.
But testing with GQ and pam/nss does'nt work properly. I think it's
because these clients don't use ldaps over port 636 but start_tls over
port 389. Is this a security problem? Also I tried they don't use Port
636, but I thought start_tls is as save as ldaps?????
And so you have to be sure that all your LDAP clients use TLS on
Port 636 or STARTTLS on port 389 to communicate with the server.
All clients open and close TLS connections and send at least some of the data with encryption.
Only some packages can be read as cleartext in log output. I attached some typical lines from this output.
Is 'ssl yes' & 'port 636' set in your pam_ldap & pam_nss configuration files?
My ldap.conf witch is used by pam_ldap and nis_ldap is also attached to
this mail. I alredy tried to set "port 636", but in this case the client
can't connect the Ldap-server anyway. But it uses start_tsl.
Bye and thanks for helping me.
Susanne
# @(#)$Id: ldap.conf,v 1.24 2001/09/20 14:12:26 lukeh Exp $
#
# This is the configuration file for the LDAP nameservice
# switch library and the LDAP PAM module.
#
# PADL Software
# http://www.padl.com
#
# Your LDAP server. Must be resolvable without using LDAP.
host serv02
# The distinguished name of the search base.
base o=mycompany,c=de
# Another way to specify your LDAP server is to provide an
# uri with the server name. This allows to use
# Unix Domain Sockets to connect to a local LDAP Server.
uri ldap://serv02.mycompany.de/
uri ldaps://serv02.mycompany.de/
#uri ldapi://%2fvar%2frun%2fldapi_sock/
# Note: %2f encodes the '/' used as directory separator
# The LDAP version to use (defaults to 3
# if supported by client library)
ldap_version 3
# The distinguished name to bind to the server with.
# Optional: default is to bind anonymously.
#binddn cn=proxyuser,dc=padl,dc=com
# The credentials to bind with.
# Optional: default is no credential.
#bindpw secret
# The distinguished name to bind to the server with
# if the effective user ID is root. Password is
# stored in /etc/ldap.secret (mode 600)
#rootbinddn cn=manager,dc=padl,dc=com
# The port.
# Optional: default is 389.
# port 636
# The search scope.
#scope sub
#scope one
#scope base
# Search timelimit
#timelimit 30
# Bind timelimit
#bind_timelimit 30
# Idle timelimit; client will close connections
# (nss_ldap only) if the server has not been contacted
# for the number of seconds specified below.
#idle_timelimit 3600
# Filter to AND with uid=%s
pam_filter objectclass=posixaccount
# The user ID attribute (defaults to uid)
pam_login_attribute uid
# Search the root DSE for the password policy (works
# with Netscape Directory Server)
#pam_lookup_policy yes
# Check the 'host' attribute for access control
# Default is no; if set to yes, and user has no
# value for the host attribute, and pam_ldap is
# configured for account management (authorization)
# then the user will not be allowed to login.
#pam_check_host_attr yes
# Group to enforce membership of
#pam_groupdn cn=PAM,ou=Groups,dc=padl,dc=com
# Group member attribute
#pam_member_attribute uniquemember
# Specify a minium or maximum UID number allowed
#pam_min_uid 0
#pam_max_uid 0
# Template login attribute, default template user
# (can be overriden by value of former attribute
# in user's entry)
#pam_login_attribute userPrincipalName
#pam_template_login_attribute uid
#pam_template_login nobody
# HEADS UP: the pam_crypt, pam_nds_passwd,
# and pam_ad_passwd options are no
# longer supported.
# Do not hash the password at all; presume
# the directory server will do it, if
# necessary. This is the default.
# pam_password clear
# Hash password locally; required for University of
# Michigan LDAP server, and works with Netscape
# Directory Server if you're using the UNIX-Crypt
# hash mechanism and not using the NT Synchronization
# service.
pam_password crypt
# Remove old password first, then update in
# cleartext. Necessary for use with Novell
# Directory Services (NDS)
# pam_password nds
# Update Active Directory password, by
# creating Unicode password and updating
# unicodePwd attribute.
# pam_password ad
# Use the OpenLDAP password change
# extended operation to update the password.
# pam_password exop
# RFC2307bis naming contexts
# Syntax:
# nss_base_XXX base?scope?filter
# where scope is {base,one,sub}
# and filter is a filter to be &'d with the
# default filter.
# You can omit the suffix eg:
# nss_base_passwd ou=People,
# to append the default base DN but this
# may incur a small performance impact.
#nss_base_passwd ou=People,dc=padl,dc=com?one
#nss_base_shadow ou=People,dc=padl,dc=com?one
#nss_base_group ou=Group,dc=padl,dc=com?one
#nss_base_hosts ou=Hosts,dc=padl,dc=com?one
#nss_base_services ou=Services,dc=padl,dc=com?one
#nss_base_networks ou=Networks,dc=padl,dc=com?one
#nss_base_protocols ou=Protocols,dc=padl,dc=com?one
#nss_base_rpc ou=Rpc,dc=padl,dc=com?one
#nss_base_ethers ou=Ethers,dc=padl,dc=com?one
#nss_base_netmasks ou=Networks,dc=padl,dc=com?ne
#nss_base_bootparams ou=Ethers,dc=padl,dc=com?one
#nss_base_aliases ou=Aliases,dc=padl,dc=com?one
#nss_base_netgroup ou=Netgroup,dc=padl,dc=com?one
# attribute/objectclass mapping
# Syntax:
#nss_map_attribute rfc2307attribute mapped_attribute
#nss_map_objectclass rfc2307objectclass mapped_objectclass
# configure --enable-nds is no longer supported.
# For NDS now do:
#nss_map_attribute uniqueMember member
# configure --enable-mssfu-schema is no longer supported.
# For MSSFU now do:
#nss_map_objectclass posixAccount User
#nss_map_attribute uid msSFUName
#nss_map_attribute uniqueMember posixMember
#nss_map_attribute userPassword msSFUPassword
#nss_map_attribute homeDirectory msSFUHomeDirectory
#nss_map_objectclass posixGroup Group
#pam_login_attribute msSFUName
#pam_filter objectclass=User
#pam_password ad
# configure --enable-authpassword is no longer supported
# For authPassword support, now do:
#nss_map_attribute userPassword authPassword
#pam_password nds
# For IBM SecureWay support, do:
#nss_map_objectclass posixAccount aixAccount
#nss_map_attribute uid userName
#nss_map_attribute gidNumber gid
#nss_map_attribute uidNumber uid
#nss_map_attribute userPassword passwordChar
#nss_map_objectclass posixGroup aixAccessGroup
#nss_map_attribute cn groupName
#nss_map_attribute uniqueMember member
#pam_login_attribute userName
#pam_filter objectclass=aixAccount
#pam_password clear
# Netscape SDK LDAPS
ssl on
# Netscape SDK SSL options
#sslpath /etc/ssl/certs/cert7.db
# OpenLDAP SSL mechanism
# start_tls mechanism uses the normal LDAP port, LDAPS typically 636
ssl start_tls
ssl yes
# OpenLDAP SSL options
# Require and verify server certificate (yes/no)
# Default is "no"
#tls_checkpeer yes
# CA certificates for server certificate verification
# At least one of these are required if tls_checkpeer is "yes"
#tls_cacertfile /etc/ssl/ca.cert
#tls_cacertdir /etc/ssl/certs
# SSL cipher suite
# See man ciphers for syntax
tls_ciphers HIGH:MEDIUM:SSLv3:RSA
# Client certificate and key
# Use these, if your server requires client authentication.
#tls_cert
#tls_key
pam_crypt local
.....
=> send_search_entry: "uid=tests,ou=Personen,o=mycompany"
ber_flush: 340 bytes to sd 13
0000: 30 82 01 50 02 01 09 64 82 01 49 04 29 75 69 64 0?.P...d?.I.)uid
0010: 3d 74 65 73 74 73 2c 6f 75 3d 50 65 72 73 6f 6e =tests,ou=Person
0020: 65 6e 2c 6f 75 3d 45 4d 54 2c 6f 75 3d 49 49 53 en,o=mycompany,
0030: 2c 6f 3d 46 68 67 30 82 01 1a 30 41 04 0b 6f 62 0?..0A..ob
0040: 6a 65 63 74 43 6c 61 73 73 31 32 04 03 74 6f 70 jectClass12..top
0050: 04 06 70 65 72 73 6f 6e 04 14 6f 72 67 61 6e 69 ..person..organi
0060: 7a 61 74 69 6f 6e 61 6c 70 65 72 73 6f 6e 04 0d zationalperson..
0070: 69 6e 65 74 6f 72 67 70 65 72 73 6f 6e 30 18 04 inetorgperson0..
0080: 02 63 6e 31 12 04 10 53 69 65 67 6c 69 6e 64 65 .cn1...Sieglinde
0090: 20 54 65 73 74 65 72 30 0e 04 02 73 6e 31 08 04 Tester0...sn1..
00a0: 06 54 65 73 74 65 72 30 0e 04 03 75 69 64 31 07 .Tester0...uid1.
00b0: 04 05 74 65 73 74 73 30 19 04 0f 74 65 6c 65 70 ..tests0...telep
....
tls_write: want=373, written=373
0000: 17 03 01 01 70 ee 4a 3d c5 7c f6 79 c7 64 40 c2 ....pîJ=Å|öyÇd@Â
0010: 5f fe 62 d5 8e d0 30 91 f7 ce 7c e9 2a 4f f9 eb _.bÕ?Ð0?÷Î|é*Oùë
0020: 7c c5 c1 f8 98 a1 20 96 bc 96 c0 bc 1b d7 ee aa |ÅÁø?¡ ?¼?À¼.×îª
.....
ldap_write: want=366, written=366
0000: 30 82 01 6a 02 01 08 64 82 01 63 04 27 75 69 64 0?.j...d?.c.'uid
0010: 3d 50 7a 6c 2c 6f 75 3d 50 65 72 73 6f 6e 65 6e =tests,ou=Personen