07-26-2017 02:56 PM
We have a kerberos enabled cluster which has Navigator installed.
I am trying to view some metadata through Navigator API using Curl command suggested.
curl 'http://localhost:7187/api/v3/entities?query=type:file&limit=2&offset=0' \ -X GET \ -u :
With username and password, things are working fine.
How to get it to work with Kerberos ticket? I do have a valid ticket (kinit/klist).
None of the below tries worked.
curl -krb --negotiate 'http://localhost:7187/api/v3/entities?query=type:file&limit=2&offset=0'
curl --krb private 'http://localhost:7187/api/v3/entities?query=type:file&limit=2&offset=0'
I tried a few other ways read from various sources but none of them are working. I get the below error.
Can someone help me with getting the curl command to work? Thanks.
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> <title>Error 401 Full authentication is required to access this resource</title> </head> <body><h2>HTTP ERROR 401</h2> <p>Problem accessing /api/v10/interactive/entities. Reason: <pre> Full authentication is required to access this resource</pre></p><hr /><i><small>Powered by Jetty://</small></i><br/> <br/> </body> </html>
07-26-2017 05:54 PM - last edited on 07-27-2017 06:27 AM by cjervis
It should work with both --negotiate and -u.
curl -v --negotiate -u "username" http://www.blah.com
07-26-2017 06:52 PM - edited 07-26-2017 07:19 PM
I wish it did.
It asked for password and same error as before. Even if I type the correct password, it gives the error msg.
I do have a valid Kerberos ticket. It lists when I give a klist command.
07-27-2017 09:28 AM
07-27-2017 11:24 AM
Thanks for the reply.
It (Navigator) is set up to use LDAP. In this case, curl command cannot be used with a Kerberos tkt and LDAP credentials always needs to be passed as -u LDAPUser:LDAPPass?
Or, is there anyway that I can make the curl command work wihtout exposing the passwd?
07-29-2017 03:30 PM
For adhoc requests - the above method works. But, if I have to automate thru some script and I do not want to manage passwords (updating it everytime), what are my other options to make this work?
Thanks again for all your replies. With each reply, I learn something new.
07-31-2017 10:57 AM