I have a working application for managing HDFS using WebHDFS. I need to do this on a Kerberos protected cluster.
The problem is that there is no library or extension to negotiate a ticket for my application, I only have a basic HTTP client.
Is it possible to create a Java service that will handle ticket exchange, and as soon as it receives a service ticket, just to transfer it to the application for use in the HTTP request? In other words, my application will ask the Java service to agree on tickets, and it will return the service ticket back to my application in a string or raw string, and the application just binds it to an HTTP request?
EDIT: Is there a similar similar solution like @SamsonScharfrichter described for HTTPfs? (As far as I know, it does not support delegation tokens)
EDIT2: Hi guys, I'm still completely lost. I am trying to find a Hadoop-auth client with no luck. Could you help me again? I read about it for hours without luck. Examples are said to do this:
* // establishing an initial connection * * URL url = new URL("http://foo:8080/bar"); * AuthenticatedURL.Token token = new AuthenticatedURL.Token(); * AuthenticatedURL aUrl = new AuthenticatedURL(); * HttpURLConnection conn = new AuthenticatedURL(url, token).openConnection(); * .... * // use the 'conn' instance * ....
I lost already here. What initial connection do I need? how
new AuthenticatedURL(url, token).openConnection();
take two parameters? for such a case there is no constructor. (this causes an error). Should someone point someone? It will probably not be so simple.
URL url = new URL("http://<host>:14000/webhdfs/v1/?op=liststatus"); AuthenticatedURL.Token token = new AuthenticatedURL.Token(); HttpURLConnection conn = new AuthenticatedURL(url, token).openConnection(url, token);
java hadoop kerberos webhdfs
Mabu
source share