Creating a token using Keystone authentication

The first step in order to access containers or objects is to authenticate the user by sending a request to the authentication service, and thus get a valid token that can then be used in subsequent commands to perform various operations.

We are using Keystone authentication in our configuration and the examples shown in this chapter. There is another method of authentication called Swauth that can be used. It works in a slightly different way, but we won't deal with the details of Swauth here. While using cURL, the following command is used to get the valid Keystone authentication token:

# curl -X POST -i https://auth.vedams.com/v2.0/tokens -H 'Content- type: application/json' -d '{"auth":{"passwordCredentials":{"username":"user","password":"password"},"tenantName":"tenant1"}}' ...

Get OpenStack Object Storage (Swift) Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.