[Openstack] [Swift] Use tempurl and control the input file

Shrinand Javadekar shrinand at maginatics.com
Thu Nov 21 01:31:57 UTC 2013


Checkout [1] for more details.

The final url used to do the put will have the container name and the
object name.

For e.g https://swift-cluster.example.com/v1/AUTH_a422b2-91f3-2f46-74b7-d7c9e8958f5d30/container/object?temp_url_sig=da39a3ee5e6b4b0d3255bfef95601890afd80709&temp_url_expires=1323479485

In the case above, "container" is the container name and "object" is
the object name. The Swift cluster will compute the signature based on
these. It will match the signature it computes with the one sent via
the temp_url_sig parameter. If they don't match, the request will be
rejected.

[1] http://docs.openstack.org/trunk/config-reference/content//object-storage-tempurl.html

-Shri

On Wed, Nov 20, 2013 at 5:12 PM, Jonathan Lu <jojokururu at gmail.com> wrote:
> HI, Shri
>     How can swift know this is the specific object? only by the object name?
>
> Best Regards
>
> Jonathan Lu
>
>
> On 2013/11/21 3:05, Shrinand Javadekar wrote:
>>
>> TempURLs are generate for a specific object (file). So if you're
>> filename is "foo", generate the tempurl as:
>>
>> $ swift-temp-url PUT 300 /v1/AUTH_blah/container/foo <account-tempurl-key>
>>
>> With the genearated url, only file "foo" will be allowed to be PUT.
>>
>> -Shri
>>
>> On Wed, Nov 20, 2013 at 1:31 AM, Jonathan Lu <jojokururu at gmail.com> wrote:
>>>
>>> Hi, all stackers,
>>>
>>>      It is said that using TempURL can control the access to Object
>>> Storage,
>>> and it does work by following the instruction:
>>>
>>>
>>> http://docs.openstack.org/folsom/openstack-object-storage/admin/content/swift-tempurl.html
>>>
>>>      My question is, when a PUT request is tempurled, can I limit which
>>> file
>>> to be put? For example if the md5 of the object is
>>> 787C3DF307835B40E7D23EBECDDA78CA, then all the other objects whose md5 is
>>> not this will be denied.
>>>
>>> Thanks.
>>>
>>> Jonathan Lu
>>>
>>> _______________________________________________
>>> Mailing list:
>>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
>>> Post to     : openstack at lists.openstack.org
>>> Unsubscribe :
>>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
>>>
>




More information about the Openstack mailing list