Ask Your Question
0

tempurl with swift kilo using keystone

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

gsvi gravatar image

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

Hello

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.

/v1/AUTH_demo/demo-container1/test_file.txt?temp_url_sig=66eec029e2e266725a06b76956644311261558c8&temp_url_expires=1441553829

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
1

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

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
0

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

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

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: 2015-09-06 10:11:14 -0500

Seen: 261 times

Last updated: Sep 23 '15