We are using Openstack Object Storage (SWIFT) to store large files
When we using browser navigate to a container, it listed all objects belong in.
The document locate at: https://developer.openstack.org/api-ref/object-storage/?expanded=#show-container-details-and-list-objects
We don't want customer can browser this list file by security
How can we disable it ?
Asked
Active
Viewed 1,187 times
1

phuongnd
- 1,229
- 15
- 33
1 Answers
9
Probably your container has the header "X-Container-Read" with this values:
.r:*,.rlistings
Where:
.r:* => public reading
.rlistings => public listing
You should remove the public listing conf, upadating the header "X-Container-Read".
Using curl, it would be something like this:
curl -X POST -H 'X-Auth-Token: <token-id>' -H 'X-Container-Read: .r:*' <AdminURL>/<container>
Using python-swiftclient, this syntax should work:
swift post --read-acl .r:* container
Btw, just remember to set you environment variables or inform your credential on the command line to the correct use of python-swiftclient.
PS: it won't remove the reading permission, just the listing permission.

Nelson Marcos
- 477
- 2
- 16
-
I tried this, using auth v3 but api keeps saying 204 no content-. – Ezequiel Adrian Mar 24 '22 at 01:43
-
204 is the expectes answer for this request. – Nelson Marcos Mar 25 '22 at 02:06