tempurl with swift kilo using keystone

asked 2015-09-06 10:23:21 -0600

gsvi gravatar image

updated 2015-09-10 05:39:39 -0600


I am having trouble with tempurl on a working proxy. I am able to upload and download files via the python api. However I need to use tempurl for my solution.

For testing purposes, I have created the tempurl via

swift post -m "Temp-URL-Key:tempkey"

swift-temp-url GET 3600 '/v1/AUTH_demo/demo-container1/test_file.txt' tempkey

which returns the proper information.


However if copy and paste the url into a browser it returns

401 Unauthorized: Temp URL invalid

I have setup PyCharm and started remote debugging the code. It appears that the temp-url-key is not being retrieved from my environment. In fact, the get_account_info call in __get_keys does not return any metadata in the info dict. However swift stat shows the following:

 Meta Temp-Url-Key: tempkey

Attached is a link to a screen shot of my PyCharm debug session.

https://drive.google.com/file/d/0B0-LajfPyP7IRWRzOW5sdUdOR2s/view?usp=sharing https://drive.google.com/file/d/0B0-LajfPyP7IbXUzYTJNWnlXQjQ/view?usp=sharing

Any suggestions?

Thanks Greg

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2015-09-09 20:16:33 -0600

mattoliverau gravatar image

Your debug sessions seem to suggest that the HEAD to the account server is failing with a 404 (get_account_info). So it doesn't get any account info.

Can you copy the relevant account server log lines (if you have any), you should see some HEADs 404ing. Its strange because the it's obviously working in swift.

Also as another thought, where is tempurl located in your proxy pipeline (/etc/swift/proxy-server.conf). Is it before (to the left of) the authentication middleware, in your case keystone and authtoken?

edit flag offensive delete link more

answered 2015-09-23 07:34:56 -0600

gsvi gravatar image

Sorry for the slow reply. Thanks so much for the help. The issue was related to a couple of things. The first is the documentation for Kilo is a little off compared to previous releases.

http://docs.openstack.org/kilo/install-guide/install/apt/content/swift-install-controller-node.html (http://docs.openstack.org/kilo/instal...)

The proxy server was not creating the accounts on the account server because kilo documentation did not specify to turn on account_management and autocreate_accounts. It just says to turn on account_autocreate = true. I had to turn on the account server logging to debug. I also had to recreate the rings in order for the SQLite databases to be created.

Also the documentation is off for the authtoken filter for ubuntu. It does not specify the admin uris and it has the following instead. Notice the 2 auth_uri entries.

auth_uri = http://controller:5000 auth_url = http://controller:35357 auth_plugin = password project_domain_id = default user_domain_id = default project_name = service username = swift password = SWIFT_PASS delay_auth_decision = true

Thanks G

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2015-09-06 10:11:14 -0600

Seen: 378 times

Last updated: Sep 23 '15