Ask Your Question
0

swift tempurl: Unauthorized

asked 2012-07-09 06:46:40 -0600

hettbox gravatar image

Hello! I`m trying to create tempurl, and this not work :(

1.

root@proxy:/etc/swift# curl -v -H "X-Auth-User: system:root" -H "X-Auth-Key: testpass" http://192.168.241.143:8080/auth/v1.0 * About to connect() to 192.168.241.143 port 8080 (#0) * Trying 192.168.241.143... connected

GET /auth/v1.0 HTTP/1.1 User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3 Host: 192.168.241.143:8080 Accept: / X-Auth-User: system:root X-Auth-Key: testpass

< HTTP/1.1 200 OK < X-Storage-Url: http://192.168.241.143:8080/v1/AUTH_system (http://192.168.241.143:8080/v1/AUTH_s...) < X-Storage-Token: AUTH_tka8ec5a100ccc44158e56c5594174bdbe < X-Auth-Token: AUTH_tka8ec5a100ccc44158e56c5594174bdbe < Content-Length: 0 < Date: Mon, 09 Jul 2012 09:10:07 GMT < * Connection #0 to host 192.168.241.143 left intact

* Closing connection #0

2.

root@proxy:/etc/swift# curl -k -v -X POST -H "X-Auth-Token: AUTH_tka8ec5a100ccc44158e56c5594174bdbe" -H "X-Account-Meta-Temp-Url-Key: testkey" http://192.168.241.143:8080/v1/AUTH_system (http://192.168.241.143:8080/v1/AUTH_s...) * About to connect() to 192.168.241.143 port 8080 (#0) * Trying 192.168.241.143... connected

POST /v1/AUTH_system HTTP/1.1 User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3 Host: 192.168.241.143:8080 Accept: / X-Auth-Token: AUTH_tka8ec5a100ccc44158e56c5594174bdbe X-Account-Meta-Temp-Url-Key: testkey

< HTTP/1.1 204 No Content < Content-Length: 0 < Content-Type: text/html; charset=UTF-8 < Date: Mon, 09 Jul 2012 09:10:59 GMT < * Connection #0 to host 192.168.241.143 left intact * Closing connection #0 root@proxy:/etc/swift#

=========================================================================

  1. root@proxy:/etc/swift# swift-temp-url GET 300 /v1/AUTH_system/myfiles/hero2.zip testkey /v1/AUTH_system/myfiles/hero2.zip?temp_url_sig=f4e88eacea3cbb436585377ca46212ca61d3a16a&temp_url_expires=1341825387

=========================================================================

4.

root@proxy:/etc/swift# wget http://192.168.241.143:8080/v1/AUTH_system/myfiles/hero2.zip?temp_url_sig=f4e88eacea3cbb436585377ca46212ca61d3a16a&temp_url_expires=1341825387 (http://192.168.241.143:8080/v1/AUTH_s...) [1] 12998 root@proxy:/etc/swift# --2012-07-09 16:11:59-- http://192.168.241.143:8080/v1/AUTH_system/myfiles/hero2.zip?temp_url_sig=f4e88eacea3cbb436585377ca46212ca61d3a16a (http://192.168.241.143:8080/v1/AUTH_s...) Подключение к 192.168.241.143:8080... соединились. Запрос HTTP послан, ожидание ответа... 401 Unauthorized Авторизация прошла неудачно. root@proxy:/etc/swift#

:(

My proxy-server.conf

GNU nano 2.2.6 Файл: proxy-server.conf

[DEFAULT] #cert_file = /etc/swift/cert.crt #key_file = /etc/swift/cert.key bind_port = 8080 workers = 2 user = swift

[pipeline:main] pipeline = healthcheck cache tempurl tempauth proxy-server

[app:proxy-server] use = egg:swift#proxy allow_account_management = true account_autocreate = true set log_name = swift-proxy-server set log_facility = LOG_LOCAL0 set log_level = DEBUG set access_log_name = swift-proxy-server set access_log_facility = LOG_LOCAL0 set access_log_level = DEBUG set log_headers = True

[filter:tempurl] use = egg:swift#tempurl

[filter:tempauth] use = egg:swift#tempauth user_system_root = testpass .admin http://192.168.241.143:8080/v1/AUTH_system (http://192.168.241.143:8080/v1/AUTH_s...) user_test_tester = testing .admin http://192.168.241.143:8080/v1/AUTH_test allow_overrides = true

[filter:healthcheck] use = egg:swift#healthcheck

[filter:cache] use = egg ... (more)

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2012-07-10 09:25:49 -0600

hettbox gravatar image

resolved =)

edit flag offensive delete link more

Comments

Hello Can you share how you resolved this. I am facing the same Unauthorized error with tempUrl. Thanks

Mohamedsaqib gravatar imageMohamedsaqib ( 2017-07-29 16:05:35 -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: 2012-07-09 06:46:40 -0600

Seen: 153 times

Last updated: Jul 10 '12