Ask Your Question
0

Faild to use tempURL in swift

asked 2019-06-02 22:51:38 -0600

Hello everyone!

I am creating tempURL in swift from 2 sources:

https://www.swiftstack.com/docs/admin/middleware/tempurl.html#configuring-tempurl (https://www.swiftstack.com/docs/admin...)

https://docs.openstack.org/swift/latest/api/temporary_url_middleware.html (https://docs.openstack.org/swift/late...)

I have added tempurl in pipeline and use swift client and curl to generate tempurl, but it always returl 401 response. Please help me!

edit retag flag offensive close merge delete

Comments

So you

  1. set up two keys (one key would work as well)
  2. created the tempurl using swift client, or perhaps using a python program
  3. tried to access the tempurl

And you get a 401 at step 3. Correct?

Can you post your detailed steps? Is there anything in the proxy server log?

Bernd Bausch gravatar imageBernd Bausch ( 2019-06-03 00:09:22 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2019-06-03 02:38:31 -0600

I have tried to set up 2 keys in account, 1 key in container. Generate tempurl from python code and swiftclient. It still return 401.

My steps: First, I add tempurl before authtoken Second, I post key to account metadata

         Meta Temp-Url-Key-2: VuVan

Meta X-Account-Meta-Temp-Url-Key: Vuvan

           Meta Temp-Url-Key: secretkey

Third, I use this python code in https://docs.openstack.org/liberty/config-reference/content/object-storage-tempurl.html (https://docs.openstack.org/liberty/co...) and replace my path and key. Then run that code I get tempurl

And this is log:

Jun 3 14:32:34 195 proxy: 10.13.98.165 10.13.98.165 03/Jun/2019/07/32/34 GET /v1/AUTH_44e37cb39c5d4768b320de2229502860/vuvan/admin.rc%3Ftemp_url_sig%3Df0658b6a20841ba0796236fa451faa6cef6a6898%26temp_url_expires%3D1559633543 HTTP/1.0 401 - curl/7.58.0 - - 35 - txf6a26a1d7baa4aed8fee1-005cf4cd12 - 0.0109 - - 1559547154.668499947 1559547154.679441929 -

About swiftclient I use this command:

swift tempurl GET 3600 /v1/AUTH_44e37cb39c5d4768b320de2229502860/vuvan/admin.rc secretkey

(with two keys)

The result still be 401 response.

edit flag offensive delete link more

Comments

I currently have the same problem with Stein. It used to work with Rocky. I will try to find out how the two clouds differ (apart from the version).

Bernd Bausch gravatar imageBernd Bausch ( 2019-06-04 20:51:28 -0600 )edit

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: 2019-06-02 22:51:11 -0600

Seen: 37 times

Last updated: Jun 02