0

I'm using Python-Swift client to connect to Openstack's Swift for file storage. My service allow user to upload file and store it within Swift. My requirement is that the file should be able to be read without permission.

I found the solution to the read permission; I have to set Read ACL {'read_acl': '.r:*'} When creating container. However, this required separate request for container creation. I have written code to create container to ensure to set the ACL.

Now every request I ended up doing 2 things: 1. Create container with correct read ACL. 2. Upload file to the container.

This results in wasting a fair bit of time since Upload does container creation automatically to ensure that it exists. Which added extra unneeded step to the time-sensitive process.

Is it possible for me to set container's Read ACL via upload and have the auto creation take care of it? What's alternative to optimize this process?

RobGThai
  • 5,937
  • 8
  • 41
  • 59

1 Answers1

0

It sounds like you want read privileges across multiple containers. Depending on your requirements you can set the ACL at the account, or tenant level, and then each user of that tenant inherits those rights on all files that the account knows about. That way you do not need to muck with each container's permissions on upload.

This may not work depending on your workflow and requirements.

https://www.swiftstack.com/docs/cookbooks/swift_usage/account_acl.html

ferahgo
  • 408
  • 1
  • 4
  • 11