openstack team mailing list archive
-
openstack team
-
Mailing list archive
-
Message #25208
Re: [Swift] Is it possible to use tempauth and tempurl together?
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@swift:~$ swift post -m temp-url-key:asdf
clayg@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@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@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@xxxxxxxxx> 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@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openstack
> More help : https://help.launchpad.net/ListHelp
>
>
References