Temporary Authentication converts an HCP user account username and password into an token that can be used by RESTful APIs to authenticate with HCP. The token can be used with the HSwift X-Auth-Token header to validate a user without the use of Keystone.
The Temporary Authentication token is authenticated directly by HCP and is composed of an HCP user account username encoded in base64 and HCP user account password encoded in an md5 hash. The token does not expire unless the HCP user account username or password changes.
To create a Temporary Authentication token you enter the HSwift X-Auth-User header with your HCP user account username, in base64, and the X-Auth-Key header with your HCP user account password, in MD5, in your next command.
HCP responds with a 204 HTTP status code and two headers, X-Auth-Token and X-Storage-Url. The X-Auth-Token is your Temporary Authentication token and X-Storage-Url is the URL of your HCP.
Here is an example of a curl command using Temporary Authentication and a valid response. In this example the HCP user account username is lgreen and the password is start123:
Curl command request
curl -v -X HEAD http://example.com/swift/v1/tenant/AUTH_6b6884ebb6f441cfbb7e740f6a927c9e -H "X-Auth-User: bGdyZWVu" -H "X-Auth-Key: a3b9c163f6c520407ff34cfdb83ca5c6"
Response if user is valid
HTTP/1.1 204 No Content
X-Auth-Token: HCP bGdyZWVu:a3b9c163f6c520407ff34cfdb83ca5c6
X-Storage-URL: https://example.com/swift/v1/tenant
© 2016 Hitachi Data Systems Corporation. All rights reserved.