how to configure tls and ldap