Ask Your Question

How to enumerate and access public containers

asked 2010-10-21 23:42:36 -0500

twkiel gravatar image

I get how to set the ACL, but I dont get how one user would access a public container of another user, with or without auth. Could somebody give an example as to how to enumerate or just access an object in a public container directly?

edit retag flag offensive close merge delete

4 answers

Sort by ยป oldest newest most voted

answered 2010-10-22 14:23:53 -0500

gholt gravatar image

Ah, I just noticed now that you specified "enumerate ... public containers" as well. Currently there is no way to do that. A user that is sharing their container(s) must give you the URLs for those containers themselves.

edit flag offensive delete link more

answered 2010-10-22 17:23:00 -0500

twkiel gravatar image

Thanks gholt, that solved my question.

edit flag offensive delete link more

answered 2010-10-22 02:49:14 -0500

gholt gravatar image

Normally a user of a Swift cluster would authenticate with an external auth server, obtain a token, and use that token with their Swift requests. But, with a fully public container, no auth token is required; the user just needs to know the URL to the container/object.

Here's an example using curl:

User 1 creates a public container and object:

Create public container: curl -X PUT -H 'X-Auth-Token: AUTH_tk3439b9c56c5447c3990e4fe3cf2ad416' -H 'X-Container-Read: .r:*' (

Upload object to the container: curl -X PUT -H 'X-Auth-Token: AUTH_tk3439b9c56c5447c3990e4fe3cf2ad416' ( --data-binary 'test'

User 1 gives User 2 the URL to the object: ( and so User 2 can just download that:

Download object with no auth token: curl (

Here's another user grabbing the same URL, but using their auth token though they don't have to:

curl -H 'X-Auth-Token: AUTH_tkc93093898d4742778f48bcfb3ee9ad99' (

edit flag offensive delete link more

answered 2012-11-06 05:17:51 -0500

sujay-m17 gravatar image

Hi ghlot, thanks for the info.

I have a Host - Ubuntu Desktop Guest - Ubuntu 12.04 server inside the Host as a VM with IP

I tried to access the above URL from the Host

curl (

but it is giving curl: (7) couldn't connect to host error.

Should i make any configuration changes? Please correct me and why is it not connecting

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2010-10-21 23:42:36 -0500

Seen: 329 times

Last updated: Nov 06 '12