Configuring Proxy with Apache Knox
Also available as:
PDF
loading table of contents...

Test HTTP Header Tokens

Using cURL, you can test your HTTP Header Tokens configuration.

Use following cURL command to request a directory listing from HDFS while passing in the expected header SM_USER, note that the example is specific to sandbox:
curl -k -i --header "SM_USER: guest" -v 'https://localhost:8443/gateway/sandbox/webhdfs/v1/tmp?op=LISTSTATUS

Omitting the SM_USER: guest–header: guest” above results in a HTTP status 401 unauthorized