Using cURL, you can test your LDAP configuration as follows:
Open the command line on an external client, note that curl is not a built in command line utility in Windows.
Enter the following command get a valid users home directory:
curl -i -k -u ldap_user:password -X GET \ 'https://gateway_host:8443/gateway_path/cluster_name/webhdfs/v1/user/?op=GETHOMEDIRECTORY'
If the user exists, the home directory is returned.
The following shows a test using HDP Sandbox running the Apache Directory and guest account:
curl -i -k -u guest:guest-password -X GET 'https://localhost:8443/gateway/sandbox/webhdfs/v1/user/?op=GETHOMEDIRECTORY' HTTP/1.1 200 OK Set-Cookie: JSESSIONID=1o3qpbwsshh881derjv69ygkjr;Path=/gateway/sandbox;Secure;HttpOnly Expires: Thu, 01 Jan 1970 00:00:00 GMT Cache-Control: no-cache Expires: Thu, 26 Jun 2014 17:22:14 GMT Date: Thu, 26 Jun 2014 17:22:14 GMT Pragma: no-cache Expires: Thu, 26 Jun 2014 17:22:14 GMT Date: Thu, 26 Jun 2014 17:22:14 GMT Pragma: no-cache Server: Jetty(6.1.26) Content-Type: application/json Content-Length: 22
If the user cannot be authenticated, the request is rejected with an HTTP status of 401 unauthorized.
curl -i -k -u guest:bad-password -X GET 'https://localhost:8443/gateway/sandbox/webhdfs/v1/user/?op=GETHOMEDIRECTORY' HTTP/1.1 401 Unauthorized WWW-Authenticate: BASIC realm="application" Content-Length: 0 Server: Jetty(8.1.14.v20131031)
For more detailed troubleshooting instructions, including enabling debugging and server log details see the Troubleshooting: LDAP Connectivity Issues.