Ask Your Question

about Formpost & ACLS

asked 2015-03-26 02:52:10 -0500

dsljjmark gravatar image

As I know, Formpost requires a key (X-Account-Meta-Temp-URL-Key) to run and it works together with ACLS.

When I started working on ACLS and tried to assign a user to each Container, I could not get any key. It always denied me and popped up Access Denied message(error 403).

Would you pls guide me how to get the key on ACLS, in order to use it on Formpost? Or how both can work together?

edit retag flag offensive close merge delete


1 answer

Sort by ยป oldest newest most voted

answered 2015-10-15 09:38:30 -0500

PeterTr7 gravatar image

I was able to get formpost to work at the container level with ACLs using container keys.

I set the container level key with the "X-Container-Meta-Temp-URL-Key" marker.

Set the container level key

swift post -m "Temp-URL-Key:<random key>" <container name>

For more info see the formpost middleware docs regarding keys. These keys are scoped to their respective container/account. (

note: This is only supported in the 2.3.0 (or higher) Kilo release (April 15th, 2015). 2.2.2 is part of Kilo but does not support it.

The following describes additional required steps for formpost to work at the account and container level which you may be aware of but I'm putting it here for reference for potential readers.

Make sure write ACL is set

swift post -w <tenantname>:<username> <container name>

To provide read access, do the following however it's not required to complete a form post AFAIK

swift post -r <tenantname>:<username> <container name>

CORS enabled

swift post -H "X-Container-Meta-Access-Control-Expose-Headers:Access-Control-Allow-Origin" -H "X-Container-Meta-Access-Control-Allow-Origin:<url you're posting from>" <container name>

Creating the form with a signature

Create the form according to the docs. A signature is created using the key set above. (

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2015-03-26 02:52:10 -0500

Seen: 119 times

Last updated: Oct 15 '15