Authenticate Fujitsu’s K5 Cloud Service Using APIs14
Visit the Fujitsu Github Repo for examples of code: https://github.com/fujitsuk5
The Fujitsu K5 Cloud Service IaaS platform is based on Openstack, the world’s leading Opensource cloud platform. Although you could technically pick up the Openstack manual and execute the API commands against a K5 endpoint, there are a few minor points to note.
Firstly, Fujitsu deploys Keystone V3 within Openstack and so uses the concepts of domains and projects. It is important to remember that any application you create that either utilises APIs or Python clients must take into account that Keystone V3 is being used, and that you must identify your ProjectID when authenticating with K5.
For all API examples I will use the Curl utility running on an Ubuntu server, and will access the Japanese platform in JP-WEST-1.
In Fujitsu K5 you authenticate to obtain an Authorisation Token (Auth-Token). This token handed over in subsequent API commands to allow Keystone to identify you and your permissions.
Before we begin you will need the following information:
- Domain Name
- Project ID (Your project ID is Alphanumeric, and is located at the end of the API endpoints listed in the K5 portal under Compute>Access&Security>API Access
- Auth URL (https://identity.jp-west-1.cloud.global.fujitsu.com/v3/auth/tokens)
Once you have this information, replace the relevant details in the curl command below, and execute the command.
Once executed you will be presented with a long list of endpoints you are entitled to use, and you will find the Auth-Token we will need for future calls in the header..
HTTP/1.1 201 Created
Date: Mon, 06 Jun 2016 18:57:20 GMT
Note the token in red, you will need this for future API calls.
NOTE – This token will expire in three hours after which time you will need to request a new one.