[Iplant-api-dev] Trouble getting authentication through agave.iplantc.org/token

Rion Dooley dooley at tacc.utexas.edu
Mon Dec 16 16:32:24 MST 2013


The response from the curl statement indicates your keys are either invalid or backwards. (I’ve been guilty more times than I care to admit of switching them.)

The query your’e doing in python is correct. We have not migrated all the public apps from Foundation to Agave yet, so what you are getting back is a list of the apps you’ve registered, which is empty at the moment.

One of the big differences between Foundation and Agave is the application registration process. In Foundation, we locked down the ability to register and publish (make public) apps pretty tightly. We needed to do that because all the computing that Foundation did ran under a single shared account. There were very real consequences of letting random codes run without first vetting them to make sure they would play nice and be good stewards of our allocations. We knew this was a pain for many people, but it was also a necessary decision given the way that Foundation worked.

When we started looking at ways we could improve Foundation for our users, we wanted to keep the flexibility that shared accounts provided, but also make it easier for people to get started trying things out. We wanted Agave to be something that people could use to get their apps working remotely as well as something they could use once they were already in place. Fast forward to today and Agave still supports the concept of a shared account that everyone can use, but it also allows you to register systems with your own accounts using your own allocations, so you can publish and run your apps anywhere you have cycles to burn. Agave still works well with HPC systems, but it also works well with Condor and generic Linux servers. We hope and believe this will greatly improve the speed with which our users register and run apps. To put it in perspective, with Foundation, the development process was:

  1.  Request an account on one of the supercomputers
  2.  Request for Matt or someone else to link your account to the iPlant allocation
  3.  Login and debug your code from the command line
  4.  Request to be granted application registration rights so you could register your app with Foundation
  5.  Run your app privately through Foundation to verify it was working
  6.  Share it with a couple other people to verify that it works
  7.  Ask for it to be published (made public)
  8.  Optionally: build a UI for your app in the iPlant DE and use the DE to run your app via Foundation.

With Agave, you can cut out the account requests, emails asking for permissions, and vetting process. You have the ability to build, test, and run your app anytime you want, using any mechanism you want, anywhere you have an account. Now the process is:

  1.  Optionally: Fire up a VM on Atmosphere, Rodeo, or Amazon, or login to a server you already have an account.
  2.  Install your code test it out
  3.  Register the VM with Agave
  4.  Register your app with Agave
  5.  Share your system and app with anyone you want
  6.  Optionally: run using GatewaDNA, from the CLI, using any of the client libraries, or build and app and run from the DE

Coming back to your question, there will still be a catalog of public apps for you that will work out of the box and run using the iplant account like before, but that shouldn’t stop you from adding, updating, and sharing your own apps any time and any way you want. Agave is a little different conceptually from Foundation, but hopefully the quick start guides and tutorials on the developer’s site at http://agaveapi.co is helping to clear some of that up. After the new year we will be starting a series of workshops and webinars to cover some of the concepts and walk through some common tasks, mostly using the Agave Samples (http://agaveapi.co/agave-quickstart-samples/) and GatewayDNA(http://agaveapi.co/gateway-dna/). I hope that helps clear up your question a bit. This mailing list and the ask.iplantc.org<http://ask.iplantc.org> site are both great places to get your questions answered. Please keep them coming.

cheers,
--
Rion




On Dec 16, 2013, at 4:19 PM, Landers, Dustin Alan <dal9834 at uncw.edu<mailto:dal9834 at uncw.edu>> wrote:

Hello!

I'm trying to get a foothold with Agave, as I intend to install some tools (maybe TASSEL) in to Agave this week. I have tried the following command in curl after setting up an application and so on. This was on the following tutorial: http://agaveapi.co/getting-started-with-the-agave-api/

curl -sku "$CLIENT_SECRET:$CLIENT_KEY" -X POST -d "grant_type=client_credentials&username=$API_USERNAME&password=$API_PASSWORD&scope=PRODUCTION" -H "Content-Type:application/x-www-form-urlencoded" https://$API_HOST_URL/token

Where $CLIENT_SECRET and $CLIENT_KEY are from the iPlant API store and $API_USERNAME and $API_PASSWORD are just my iPlant credentials. $API_HOST_URL is agave.iplantc.org<http://agave.iplantc.org>. It returns this result:

{
"error":"invalid_client",
"error_description":"Client Authentication was failed."
}

Also, can anyone help me understand why other requests I send return empty results. I tried a different method using python:

import requests
header_payload = {'Authorization':'Bearer ' + token}
r = requests.get('https://agave.iplantc.org/apps/2.0', headers=header_payload)
print r.json()

It was my understanding that this should return a list of apps installed on agave. Instead, I get this:

{
"status": "success",
"message": None,
"version": '2.0.0-SNAPSHOT-rf64a967",
"result": []
}

An empty list?

Can anybody point me in the right direction? Or maybe the best documentation for finding the answers to these questions. I am very familiar with Foundation.

Thanks!

Best,
Dustin Landers



_______________________________________________
Iplant-api-dev Mailing List: Iplant-api-dev at iplantcollaborative.org<mailto:Iplant-api-dev at iplantcollaborative.org>
List Info and Archives: http://mail.iplantcollaborative.org/mailman/listinfo/iplant-api-dev
One-click Unsubscribe: http://mail.iplantcollaborative.org/mailman/options/iplant-api-dev/dooley%40tacc.utexas.edu?unsub=1&unsubconfirm=1

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.iplantcollaborative.org/pipermail/iplant-api-dev/attachments/20131216/55df76f1/attachment.html 


More information about the Iplant-api-dev mailing list