Ask Your Question
1

about Formpost & ACLS

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

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

Comments

1 answer

Sort by ยป oldest newest most voted
0

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

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. http://docs.openstack.org/developer/swift/api/temporary_url_middleware.html#secret-keys (http://docs.openstack.org/developer/s...)

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. http://docs.openstack.org/developer/swift/api/form_post_middleware.html#hmac-sha1-signature-for-form-post (http://docs.openstack.org/developer/s...)

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: 2015-03-26 02:52:10 -0600

Seen: 102 times

Last updated: Oct 15 '15