HCP System Management Help
Local Authentication is an authentication method for users using RESTful APIs. When using Local Authentication, HCP forgoes the use of any third party identity service such as Keystone and instead verifies the user directly. To verify a user, Local Authentication requests tokens that are encoded with HCP user account credentials.
In order to use Local Authentication with HSwift, instead of passing a Keystone authentication token with the X-Auth-Token header, you replace the Keystone authentication token with the prefix HCP, followed by your Local Authentication token.
The Local Authentication token can be generated by using the Temporary Authentication service, see Creating a Temporary Authentication token, or by manually encoding your HCP user account username in base64 and your HCP user account passwork in an md5 hash. The username and password are separated by a colon (:) with no spaces in between.
Local Authentication does not authenticate HCP user accounts that are associated with different tenants than the one you're targeting. To access a tenant with Local Authentication, the management API must be enabled for that tenant.
Containers created using Local Authentication are not assigned to an HCP user account. Containers and objects stored through HSwift are not owned by an HCP user account. If you want to assign containers and objects to HCP user accounts, it must be done through a different interface, see Other container access methods.
Here is an example of how the X-Auth-Token header is formatted when using Local Authentication:
"X-Auth-Token: HCP base64-encoded-username:md5-encoded-password"
Here is an example of a curl request that uses a Local Authentication. The username for this HCP user account is lgreen and the password is start123:
Curl command request
curl -v -X HEAD http://api.example.hcp.com/swift/v1/AUTH_6b6884ebb6f441cfbb7e740f6a927c9e -H "X-Auth-Token: HCP bGdyZWVu:a3b9c163f6c520407ff34cfdb83ca5c6"
Response if token is valid
HTTP/1.1 200 OK
Response if token is invalid
HTTP/1.1 401 Unauthorized
Trademarks and Legal Disclaimer
© 2017 Hitachi Vantara Corporation. All rights reserved.