[Backlogmanager] [FIWARE-JIRA] (HELP-9336) [fiware-stackoverflow] How to programmatically authenticate to HDFS in fiware cosmos

Fernando Lopez (JIRA) jira-help-desk at jira.fiware.org
Tue May 30 09:51:00 CEST 2017


     [ https://jira.fiware.org/browse/HELP-9336?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fernando Lopez reassigned HELP-9336:
------------------------------------

    Assignee: Francisco Romero

> [fiware-stackoverflow] How to programmatically authenticate to HDFS in fiware cosmos
> ------------------------------------------------------------------------------------
>
>                 Key: HELP-9336
>                 URL: https://jira.fiware.org/browse/HELP-9336
>             Project: Help-Desk
>          Issue Type: Monitor
>          Components: FIWARE-TECH-HELP
>            Reporter: Backlog Manager
>            Assignee: Francisco Romero
>              Labels: cosmos, filab, fiware
>
> Created question in FIWARE Q/A platform on 20-06-2015 at 01:06
> {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/30948711/how-to-programmatically-authenticate-to-hdfs-in-fiware-cosmos
> +Question:+
> How to programmatically authenticate to HDFS in fiware cosmos
> +Description:+
> I'm writing a .net application with C# to programmatically run REST apis against hdfs on fiware but on http POST operations it fails with 401 (access denied). it works for simple GET operations but I'm not sure how to do authentication. From the spec it seems SPEGNA and delegated auth tokens are two options but how do i do this programmatically? I only have my user name and password to go off of. I'm using the RestSharp library to make rest interactions easier.
> This code works
> var client = new RestClient("http://cosmos.lab.fi-ware.org:14000");
> request = new RestRequest("webhdfs/v1/user/<userID>");
> request.AddParameter("op", "LISTSTATUS");
> request.AddParameter("user.name", "<userID>");
> IRestResponse response = client.Execute(request);
> var content = response.Content; // raw content as string
> this code fails with http 401
> var client = new RestClient("http://cosmos.lab.fi-ware.org:14000");
> var request = new RestRequest("webhdfs/v1/user/<userID>/structured_data123.txt",Method.PUT);
> request.AddParameter("op", "CREATE");
> request.AddParameter("user.name", "<userID>");
> IRestResponse response = client.Execute(request);
> HTTP Status 401 - org.apache.hadoop.security.authentication.client.AuthenticationException: Anonymous requests are disallowed
> Thoughts? ideas? thank you in advance!



--
This message was sent by Atlassian JIRA
(v6.4.1#64016)


More information about the Backlogmanager mailing list

You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy   Cookies policy