Ask Your Question

Revision history [back]

Curl + Swift + Keystone

Heyho guys,

so i'm verry confused about how to use swift + keystone.

My swift config: [pipeline:main] pipeline = healthcheck cache keystone proxy-server

[filter:keystone] use = egg:keystone#swiftauth admin_token = 1111222233334444 keystone_url=

Keystone and Swift are running correctly. Now i try to get all informations with curl (Username/PW) to Keystone URL

curl -d '{"auth": {"passwordCredentials": {"username": "testuser", "password": "testing"}}}' -H "Content-type: application/json"

and i get the output: {"access": {"token": {"expires": "2011-11-23T15:36:14", "id": "30abaeac-b8dc-46f9-9aa1-db146c513099", "tenant": {"id": "7", "name": "testing"}}, "serviceCatalog": [{"endpoints": [{"adminURL": "", "region": "RegionOne", "internalURL": "", "publicURL": ""}], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL": "", "region": "RegionOne", "internalURL": "", "publicURL": ""}], "type": "image", "name": "glance"}, {"endpoints": [{"adminURL": "", "region": "RegionOne", "internalURL": "", "publicURL": ""}], "type": "object-store", "name": "swift"}, {"endpoints": [{"adminURL": "", "region": "RegionOne", "internalURL": "", "publicURL": ""}], "type": "identity", "name": "keystone"}, {"endpoints": [{"adminURL": "", "region": "RegionOne", "internalURL": "", "publicURL": ""}], "type": "compute", "name": "Nova_compat"}], "user": {"id": "8", "roles": [{"tenantId": "7", "id": "5", "name": "Admin"}], "name": "testuser"}}}

So it looks good.

If i try now

curl -v -H 'X-Auth-Token: 30abaeac-b8dc-46f9-9aa1-db146c513099'


curl -v -H 'X-Auth-Token: 30abaeac-b8dc-46f9-9aa1-db146c513099'

i get every time 401!!

Now i looked in the Keystone log and found this:

but the token are correct:

******** 2. row ******** id: 30abaeac-b8dc-46f9-9aa1-db146c513099 user_id: 8 tenant_id: 7 expires: 2011-11-23 15:36:14 2 rows in set (0.00 sec)

Do any knows whats wrong? My endpoint_templates should be correct. I've checked this many times.

greetings Heiko