I'm following a tutorial to install swift openstacl object storage, in the lattests steps it ask me to do this : ------- "curl -v -H 'X-Storage-User: test:tester' -H 'X-Storage-Pass: testing' url:8080/auth/v1.0" ------to Get an X-Storage-Url and X-Auth-Token and after that cheking that i can get an account by typing : curl -v -H 'X-Auth-Token:token-from-x-auth-token-above' url-from-x-storage-url-above
Have any one an idea what such command can mean ? i don't really understand its rules ! i know it's king of identification, but what exactly mean ?
Thank you
In short, you send your password and account to Swift, and then Swift sends back token and url to you. Token stands for a authenticated account/password pair. URL stands for who is responsible for this account. In reality settings, there can be two groups of proxy servers: A and B. A is only for authentication. B is for storage access. After authentication, A sends back X-Storage-Url
to user, and the X-Storage-Url
is B's doman name.
You can use the token and the url to access storage. For example,
curl -v -H 'X-Auth-Token: <token>' <url>
means you can access the account
curl -v -H 'X-Auth-Token: <token>' <url>/container_name -XPUT
means you want to create container container_name
under the account.
curl -v -H 'X-Auth-Token: <token>' <url>/container_name/object_name -T localfile
means you want to upload localfile
to the container and name it object_name
.
The token is generated by the middleware. In Swift, there are 3 auth middlewares you can choose: tempauth, swauth, and keystone.
You can also set different X-Storage-Urls for different accounts, if you have load-balancing concerns.