2018 LDAP(3)Ldap and SSL
SSL Fail in LDAP
> ldapwhoami -H ldaps://ldapexport.lifesizecloudbeta.com -x -ZZ
ldap_start_tls: Can't contact LDAP server (-1)
additional info: SSLHandshake() failed: connection closed via error (-9806)
Solution:
Finally, I found it is not because of error on the server side. It is a port mapping issue. We map the SSL port number from outside of the Docker to our NON SSL port inside the docker. That is why the client start the connection, but the server side terminate the connection right after that.
I used this tool to test the LDAP
http://directory.apache.org/studio/
After install the software, we an create a connection
Connection name: LdapSSLLocal
Hostname: localhost
Port: 636
Encryption method: Use SSL encryption
Provider: Apache Directory LDAP Client API
We can click on the button “Check Network Parameter”
I use SimpleAuthentication
Bind DN or user: uid=xxxx
Bind password: xxxxxx
We can click on the button ‘Check Authentication’
Base DN: o=cloud, dc=sillycat, dc=com
Then we can easily connect to our LDAP server
We can create a search after that.
Search Base: o=cloud, dc=sillycat, dc=com
Fitler: (cn=Carlos)
Returning Attributes: displayName, commOwner
After search, we can see all the results in the response.
References:
https://github.com/osixia/docker-openldap/issues/199
https://github.com/osixia/docker-openldap/issues/105
http://www.openldap.org/doc/admin24/tls.html
https://github.com/osixia/docker-openldap/search?utf8=%E2%9C%93&q=LDAP_TLS_VERIFY_CLIENT&type=
SSL Fail in LDAP
> ldapwhoami -H ldaps://ldapexport.lifesizecloudbeta.com -x -ZZ
ldap_start_tls: Can't contact LDAP server (-1)
additional info: SSLHandshake() failed: connection closed via error (-9806)
Solution:
Finally, I found it is not because of error on the server side. It is a port mapping issue. We map the SSL port number from outside of the Docker to our NON SSL port inside the docker. That is why the client start the connection, but the server side terminate the connection right after that.
I used this tool to test the LDAP
http://directory.apache.org/studio/
After install the software, we an create a connection
Connection name: LdapSSLLocal
Hostname: localhost
Port: 636
Encryption method: Use SSL encryption
Provider: Apache Directory LDAP Client API
We can click on the button “Check Network Parameter”
I use SimpleAuthentication
Bind DN or user: uid=xxxx
Bind password: xxxxxx
We can click on the button ‘Check Authentication’
Base DN: o=cloud, dc=sillycat, dc=com
Then we can easily connect to our LDAP server
We can create a search after that.
Search Base: o=cloud, dc=sillycat, dc=com
Fitler: (cn=Carlos)
Returning Attributes: displayName, commOwner
After search, we can see all the results in the response.
References:
https://github.com/osixia/docker-openldap/issues/199
https://github.com/osixia/docker-openldap/issues/105
http://www.openldap.org/doc/admin24/tls.html
https://github.com/osixia/docker-openldap/search?utf8=%E2%9C%93&q=LDAP_TLS_VERIFY_CLIENT&type=