Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-3388

FIWARE.Request.Tech.Data.BigData-Analysis.WebHDFSAndC#

    Details

    • Type: extRequest
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Fix Version/s: 2021
    • Component/s: FIWARE-TECH-HELP
    • Labels:
      None

      Description

      Hello,
      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!

      _______________________________________________
      Fiware-lab-help mailing list
      Fiware-lab-help@lists.fi-ware.org
      https://lists.fi-ware.org/listinfo/fiware-lab-help

      [Created via e-mail received from: Saad Ansari <saada@connecterra.io>]

        Activity

        Hide
        danielepavia Daniele Pavia (Inactive) added a comment -

        asked the user for node, tenant id and related generic enabler

        Show
        danielepavia Daniele Pavia (Inactive) added a comment - asked the user for node, tenant id and related generic enabler
        Hide
        fw.ext.user FW External User added a comment -

        Dear Saad,

        This question was already answered at
        http://stackoverflow.com/questions/30948711/how-to-programmatically-authent
        icate-to-hdfs-in-fiware-cosmos

        Best regards,
        Francisco

        El 22/6/15 17:29, "Manuel Escriche (JIRA)" <jira-help-desk@fi-ware.org>

        ________________________________

        Este mensaje y sus adjuntos se dirigen exclusivamente a su destinatario, puede contener información privilegiada o confidencial y es para uso exclusivo de la persona o entidad de destino. Si no es usted. el destinatario indicado, queda notificado de que la lectura, utilización, divulgación y/o copia sin autorización puede estar prohibida en virtud de la legislación vigente. Si ha recibido este mensaje por error, le rogamos que nos lo comunique inmediatamente por esta misma vía y proceda a su destrucción.

        The information contained in this transmission is privileged and confidential information intended only for the use of the individual or entity named above. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this transmission in error, do not read it. Please immediately reply to the sender that you have received this communication in error and then delete it.

        Esta mensagem e seus anexos se dirigem exclusivamente ao seu destinatário, pode conter informação privilegiada ou confidencial e é para uso exclusivo da pessoa ou entidade de destino. Se não é vossa senhoria o destinatário indicado, fica notificado de que a leitura, utilização, divulgação e/ou cópia sem autorização pode estar proibida em virtude da legislação vigente. Se recebeu esta mensagem por erro, rogamos-lhe que nos o comunique imediatamente por esta mesma via e proceda a sua destruição
        _______________________________________________
        Fiware-tech-help mailing list
        Fiware-tech-help@lists.fi-ware.org
        https://lists.fi-ware.org/listinfo/fiware-tech-help

        Show
        fw.ext.user FW External User added a comment - Dear Saad, This question was already answered at http://stackoverflow.com/questions/30948711/how-to-programmatically-authent icate-to-hdfs-in-fiware-cosmos Best regards, Francisco El 22/6/15 17:29, "Manuel Escriche (JIRA)" <jira-help-desk@fi-ware.org> ________________________________ Este mensaje y sus adjuntos se dirigen exclusivamente a su destinatario, puede contener información privilegiada o confidencial y es para uso exclusivo de la persona o entidad de destino. Si no es usted. el destinatario indicado, queda notificado de que la lectura, utilización, divulgación y/o copia sin autorización puede estar prohibida en virtud de la legislación vigente. Si ha recibido este mensaje por error, le rogamos que nos lo comunique inmediatamente por esta misma vía y proceda a su destrucción. The information contained in this transmission is privileged and confidential information intended only for the use of the individual or entity named above. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this transmission in error, do not read it. Please immediately reply to the sender that you have received this communication in error and then delete it. Esta mensagem e seus anexos se dirigem exclusivamente ao seu destinatário, pode conter informação privilegiada ou confidencial e é para uso exclusivo da pessoa ou entidade de destino. Se não é vossa senhoria o destinatário indicado, fica notificado de que a leitura, utilização, divulgação e/ou cópia sem autorização pode estar proibida em virtude da legislação vigente. Se recebeu esta mensagem por erro, rogamos-lhe que nos o comunique imediatamente por esta mesma via e proceda a sua destruição _______________________________________________ Fiware-tech-help mailing list Fiware-tech-help@lists.fi-ware.org https://lists.fi-ware.org/listinfo/fiware-tech-help
        Hide
        fw.ext.user FW External User added a comment -

        thank you!

        Saad

        Show
        fw.ext.user FW External User added a comment - thank you! Saad

          People

          • Assignee:
            frb Francisco Romero
            Reporter:
            fw.ext.user FW External User
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: