[Openstack] [Swift] Is it possible to use tempauth and tempurl together?

Clay Gerrard clay.gerrard at gmail.com
Wed Jul 17 08:01:15 UTC 2013


Yes tempurl and and tempauth are tessted together, your pipeline looks good.

"allow_overrides = false" in the tempauth section could cause this, but
it's default is true.

Are you creating the tempurl's with "bin/swift-temp-url" ???

clayg at swift:~$ swift post -m temp-url-key:asdf

clayg at swift:~$ swift stat -v
StorageURL: http://localhost:8080/v1/AUTH_test
Auth Token: AUTH_tk63d7b585c939428380a97abd1f36292a
   Account: AUTH_test
Containers: 2
   Objects: 2
     Bytes: 348
Meta Temp-Url-Key: asdf
X-Timestamp: 1374006741.08564
Content-Type: text/plain; charset=utf-8
Accept-Ranges: bytes

clayg at swift:~$ swift-temp-url GET 1200 /v1/AUTH_test/mycontainer/swift.tar
asdf
/v1/AUTH_test/mycontainer/swift.tar?temp_url_sig=b9e76c3caa12d1f47b9255a359c31a95b44e99fe&temp_url_expires=1374049125

clayg at swift:~$ curl "
http://localhost:8080/v1/AUTH_test/mycontainer/swift.tar?temp_url_sig=b9e76c3caa12d1f47b9255a359c31a95b44e99fe&temp_url_expires=1374049125"
-I
HTTP/1.1 200 OK
Content-Length: 21073920
Accept-Ranges: bytes
Last-Modified: Wed, 17 Jul 2013 07:58:57 GMT
Etag: a3bef56fdf0721d07920e32fe4e65737
X-Timestamp: 1374047937.12682
Content-Type: application/x-tar
Date: Wed, 17 Jul 2013 07:59:20 GMT





On Wed, Jul 17, 2013 at 12:39 AM, Jonathan Lu <jojokururu at gmail.com> wrote:

>  Hi, all stackers,
>      Can I use the tempauth and tempurl at the same time? I will set a
> long tempauth timeout time for internal service and a short tempurl timeout
> for the ohters?
>
>     My proxy-server.conf is quite easy:
>     [pipeline:main]
>     pipeline = healthcheck cache tempurl tempauth proxy-server
>
>     [app:proxy-server]
>     use = egg:swift#proxy
>     allow_account_management = true
>     account_autocreate = true
>
>     [filter:tempauth]
>     use = egg:swift#tempauth
>     ...
>
>     [filter:tempurl]
>     use = egg:swifttempurl#tempurl
>
>     It works well in tempauth. But after I set the
> X-Account-Meta-Temp-URL-Key header on the Swift account and try to use
> tempurl, I got the "401 Unauthorized: Temp URL invalid" response.
>
> Thanks,
> Jonathan Lu
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to     : openstack at lists.launchpad.net
> Unsubscribe : https://launchpad.net/~openstack
> More help   : https://help.launchpad.net/ListHelp
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20130717/d9a601eb/attachment.html>


More information about the Openstack mailing list