Can't access Quantum services via REST requests

asked 2012-11-06 22:46:50 -0600

I can't seem to access the quantum services via the REST requests. The quantum CLI client works just fine. Also the non-quantum REST services work fine with the authentication credentials..

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

Returns <html> <head> <title>401 Unauthorized</title> </head> <body>

401 Unauthorized

This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.

Authentication required

edit retag flag offensive close merge delete

4 answers

Sort by ยป oldest newest most voted

answered 2012-11-07 15:02:52 -0600

vikasd gravatar image


When you fetch the token in your example, where did you use them in your rest calls?

edit flag offensive delete link more

answered 2012-11-07 07:29:18 -0600

amotoki gravatar image

If your quantum server is configured to use keystone auth (it is default in Folsom), you need to fetch a valid token from keystone before accesing quantum server.

Command lines are here when I tested:

I hope it will help you.

edit flag offensive delete link more

answered 2012-11-07 18:16:42 -0600

amotoki gravatar image

"id" returned by token-get should be passed as X-Auth-Token in REST call.

In my last command line, "X-Auth-Token: dcf3d36161154f9faedcec7d16cc01ff" should be "X-Auth-Token: f21fb6ffde104696ad5a3c854391ce75".

I did a mistake when I prepared the command lines to paste them. I reused the previous command line without updating the token. The previous token "dcf3d36161154f9faedcec7d16cc01ff" is also valid in this case.

edit flag offensive delete link more

answered 2012-11-07 20:10:57 -0600

Thanks Akihiro Motoki, that solved my question.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2012-11-06 22:46:50 -0600

Seen: 20 times

Last updated: Nov 07 '12