Getting Authenticated for API Command Line use

Modified on Mon, 17 Jan, 2022 at 2:07 PM

API Authentication

All Nectar Cloud APIs such as Nova, Cinder, etc., require authentication before you can use them. Nectar Cloud API supports 2 styles of authentication, OpenStack authentication and EC2 authentication.

OpenStack API Authentication

OpenStack API Authentication requires 4 environment variables to be set for authentication:

  • auth URL
  • username
  • project id or name (most clients can handle either)
  • password

You can download the authentication script from the Nectar Cloud Dashboard. These variables are set by the script file and you can see these variables if you open the file. Example:

OS_AUTH_URL=https://keystone.rc.nectar.org.au:5000/v3/
OS_PROJECT_DOMAIN_NAME=default
OS_USER_DOMAIN_NAME=default
OS_USERNAME=clouduser@example.edu.au
OS_AUTH_TYPE=password
OS_PROJECT_NAME=my_science_project
OS_PASSWORD=XXXXXX

Instructions for downloading the OpenStack authentication script file:

  • Login to the Nectar Cloud Dashboard

  • Select a project name from the project drop down list

  • Click 'API Access' from Project in the sidebar

  • Click the button: "Download OpenStack RC File"

  • Select "Openstack RC File"

  • Save the file into a directory

To reset the password

  • Click the drop down list with your email on the right top of page, then click Settings. You should see the following screen:

api2

  • Click the 'Reset Password' button and save the password that appears on the screen. This is the API password.


You use the Openstack RC file to get authenticated with the API. One way is to run source script_file ; or you can grab the required variables from the authentication script file and pass them to the API calls.

EC2 authentication

EC2 authentication requires 2 variables to be set:

EC2_ACCESS_KEY

EC2_SECRET_KEY

The EC2_ACCESS_KEY is the account number and EC2_SECRET_KEY is the password. You can get these 2 variables from the NeCTAR Dashboard using the following instructions:

  • Login to the Nectar Cloud Dashboard

  • Select a project name from the project drop down list

  • Click 'API Access' from Project in the sidebar

  • Click the button: "Download OpenStack RC File"

  • Click the button: "Download EC2 Credentials"

  • Save the file into a directory

You can find the 2 variables from the file you just downloaded. You can then run  source script_file to pass these variables to API calls.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article