Ask Your Question
0

PUT call to containers & ACL

asked 2011-01-24 21:18:15 -0500

Hi,

 I've got a single server setup of the Austin release of Swift.  I created an admin user and was attempting to create a container through the API by sending a PUT request using curl.  However, I keep getting a 403 Forbidden error back.

Here's the basics of my API request:

URL = 'http://127.0.0.1:8080/v1/AUTH_41e75baa46da427ba4313c1c25c8277e' PUT /v1/AUTH_tkeea4d2ceb80d464394267731813003b2/newcontainer HTTP/1.1 X-Auth-Token: token = AUTH_tkeea4d2ceb80d464394267731813003b2

I'm using devauth for authentication. Upon reading the auth documentation ( http://swift.openstack.org/development_auth.html (http://swift.openstack.org/developmen...) ), I put in some print statements in the swift/common/middleware/auth.py file (after modifying wsgi.py to print statements to syslog), and it looks like there is nothing in the access control list. Is there a way to check if a user gets successfully added to that list, or am I missing something else?

Please note, that if I create a new container through the following command, everything works as normal (no errors at all): st -A http://127.0.0.1:11000/v1.0 -U test:tester -K testing post newcontainer

-Bryan

edit retag flag offensive close merge delete

5 answers

Sort by ยป oldest newest most voted
0

answered 2011-01-24 21:52:53 -0500

Actually, it looks like that did the trick. It looks like my curl requests were malformed. Thanks so much for your help! Sorry for taking up your time on such a trivial matter.

-Bryan

edit flag offensive delete link more
0

answered 2011-01-24 21:41:14 -0500

letterj gravatar image

Did you try the curl line gholt posted?

edit flag offensive delete link more
0

answered 2011-01-24 21:53:08 -0500

Thanks gholt, that solved my question.

edit flag offensive delete link more
0

answered 2011-01-24 21:26:29 -0500

gholt gravatar image

Are you actually using token = .... as the value to x-auth-token? If so, remove the token = part so it's just like:

X-Auth-Token: AUTH_tkeea4d2ceb80d464394267731813003b2

ex:

curl -i -X PUT -H 'x-auth-token: AUTH_tkeea4d2ceb80d464394267731813003b2' 'http://127.0.0.1:8080/v1/AUTH_41e75baa46da427ba4313c1c25c8277e/newcontainer'

edit flag offensive delete link more
0

answered 2011-01-24 21:35:43 -0500

Nope, that was a mistake on my part when writing the question. I don't use the 'token =' in my request. It should have read:

URL = 'http://127.0.0.1:8080/v1/AUTH_41e75baa46da427ba4313c1c25c8277e' PUT /v1/AUTH_tkeea4d2ceb80d464394267731813003b2/newcontainer HTTP/1.1 X-Auth-Token: AUTH_tkeea4d2ceb80d464394267731813003b2

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2011-01-24 21:18:15 -0500

Seen: 43 times

Last updated: Jan 24 '11