swift and Cyberduck

asked 2011-08-24 07:11:58 -0500

chaupv79 gravatar image

Hi everybody

Can someone show me how to make a connection between cyberduck in window to swift storage?

currently i have a situation as below

1) I have swift.1.4.3 installed, I have swauth1.0.2 installed

  • I have already created an admin user:

    swauth-add-user -A http://192.168.0.82:8080/auth/ -K secure_key -a test tester testing

  • And make sure it works:

    swift -A http://192.168.0.82:8080/auth/v1.0 -U test:tester -K testing stat -v

2) I have cyberduck 4.1 installed on window7

=> my problem is: when I make a connection on Swift(Open Stack storage) to my swift on ubuntu 10.04 LTS then it requires user and API Access key

I input as below

username: test.tester API access key: testing

my purpose is to see something like picture or files that stored in ubuntu swift will display in cyberduck,

But...

after a while, cyberduck authenticating as test.tester then, it returns nothing, there is no cyberduck swift connection displaying.

Can anyone help me on this matter?

Thank in advance

edit retag flag offensive close merge delete

30 answers

Sort by ยป oldest newest most voted
0

answered 2011-08-24 21:14:12 -0500

btorch gravatar image

Hi Chau,

First of, is this a SAIO setup ? (I assume so)

  • cyberduck only allows https connections. So you need to setup swift-proxy with SSL and on port 443. I don't remember if cyberduck will work with SSL on port 8080.

  • Is this a typo "username: test.tester" ? it should be "test:tester"

  • How does your proxy-server.conf looks like ?

edit flag offensive delete link more
0

answered 2011-08-25 03:28:32 -0500

chaupv79 gravatar image

Hi Marcelo,

Thank for your reply,

Yes, I followed SAIO to setup swift 1.4.3

  • for cyberduck on window, I still don't know what happen while it cannot make a connection to swift server

  • the username for login should be "test:tester"

  • my proxy-server.conf as below:

[DEFAULT] bind_port = 8080 user = root log_facility = LOG_LOCAL1

#cert_file = /etc/swift/cert.crt #key_file = /etc/swift/cert.key

[pipeline:main] pipeline = healthcheck cache swauth proxy-server

[app:proxy-server] use = egg:swift#proxy allow_account_management = true

[filter:tempauth] use = egg:swift#tempauth user_admin_admin = admin .admin .reseller_admin user_test_tester = testing .admin user_test2_tester2 = testing2 .admin user_test_tester3 = testing3

[filter:swauth] use = egg:swauth#swauth set log_name = swauth super_admin_key = secure_key

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

[filter:cache] use = egg:swift#memcache

I am still investigating on cyberduck and swift, to find out how to make a connection between them. I have already change the port from 8080 to 443 but the problem still there.

look forward to hearing from your idea.

Thank you

edit flag offensive delete link more
0

answered 2011-08-25 06:36:08 -0500

Hi Chau/Marcelo, Cyberduck should be honoring the port specified. We had this issue before see ( http://trac.cyberduck.ch/ticket/5216 ). (However, I think you're correct that ssl is required.)

I'd be curious to know if honoring regressed in Cyberduck. Report findings!

Chau, When you make the request on your ubuntu machine. Does the deployment work with 'https' on the command line?

Do either of these work?

swift -A https://192.168.0.82:8080/auth/v1.0 -U test:tester -K testing stat -v

-or-

curl -k -v -H 'X-Auth-User: test:tester' -H 'X-Auth-Key: testing' https://192.168.0.82:8080/auth/v1.0

-Joe

edit flag offensive delete link more
0

answered 2011-08-25 07:11:09 -0500

chaupv79 gravatar image

Hi Joe

swauth and swift don't work for "https" protocol and 443 port.

I am headache with that problems.

when i try to create new user chau:

swauth-add-user -A https://192.168.0.82:8080/auth/ -K secure_key -a chau chauer chauing

error as below:

root@chaupv-desktop:~# swauth-add-user -A https://192.168.0.82:8080/auth/ -K secure_key -a chau chauer chauing Traceback (most recent call last): File "/usr/local/bin/swauth-add-user", line 7, in execfile(__file__) File "/root/swift/gholt-swauth-69fd700/bin/swauth-add-user", line 76, in ssl=(parsed.scheme == 'https')) File "/root/swift/release/swift/common/bufferedhttp.py", line 168, in http_connect_raw conn.endheaders() File "/usr/lib/python2.6/httplib.py", line 904, in endheaders self._send_output() File "/usr/lib/python2.6/httplib.py", line 776, in _send_output self.send(msg) File "/usr/lib/python2.6/httplib.py", line 735, in send self.connect() File "/usr/lib/python2.6/httplib.py", line 1112, in connect self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file) File "/usr/lib/pymodules/python2.6/eventlet/green/ssl.py", line 310, in wrap_socket return GreenSSLSocket(sock, a, *kw) File "/usr/lib/pymodules/python2.6/eventlet/green/ssl.py", line 47, in __init__ super(GreenSSLSocket, self).__init__(sock.fd, args, *kw) File "/usr/lib/python2.6/ssl.py", line 118, in __init__ self.do_handshake() File "/usr/lib/pymodules/python2.6/eventlet/green/ssl.py", line 218, in do_handshake super(GreenSSLSocket, self).do_handshake) File "/usr/lib/pymodules/python2.6/eventlet/green/ssl.py", line 78, in _call_trampolining return func(a, *kw) File "/usr/lib/python2.6/ssl.py", line 293, in do_handshake self._sslobj.do_handshake()

ssl.SSLError: [Errno 1] _ssl.c:480: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol

when i try to test on user "tim" with "https": curl -v -H 'X-Storage-User: tim:timmer' -H 'X-Storage-Pass: timming' https://192.168.0.80:8080/auth/v1.0

output=>

curl -v -H 'X-Storage-User: tim:timmer' -H 'X-Storage-Pass: timming' https://127.0.0.1:8080/auth/v1.0 * About to connect() to 127.0.0.1 port 8080 (#0) * Trying 127.0.0.1... connected * Connected to 127.0.0.1 (127.0.0.1) port 8080 (#0) * successfully set certificate verify locations: * CAfile: none CApath: /etc/ssl/certs * SSLv3, TLS handshake, Client hello (1): * error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol * Closing connection #0 curl: (35) error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol=> * About to connect() to 127.0.0.1 port 8080 (#0) * Trying 127.0.0.1... connected * Connected to 127.0.0.1 (127.0.0.1) port 8080 (#0) * successfully set certificate verify locations: * CAfile: none CApath: /etc/ssl/certs * SSLv3, TLS handshake, Client hello (1): * error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol * Closing connection #0 curl: (35) error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol

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

Do you have any idea? Joe?

Thank you

edit flag offensive delete link more
0

answered 2011-08-25 07:56:53 -0500

chaupv79 gravatar image

Hi Joe/Marcelo

Hi everybody

can anyone show me how to enable "https" on swift?

edit flag offensive delete link more
0

answered 2011-08-25 15:29:43 -0500

btorch gravatar image

ok,

  • First, you need to create the cert/key and also enable them in the proxy-server.conf (assuming you haven't done so already) --> cert_file = /etc/swift/cert.crt --> key_file = /etc/swift/cert.key

I'm also assuming here that your "bind_port" is set to 443

  • Under the swauth section you will also need to add the "default_swift_cluster" option

default_swift_cluster = local#https://192.168.0.80:443//v1#https://127.0.0.1:443/v1

Then restart the proxy

  • Now, you will need to either create a new swauth account/user so that it picks up the new storageUrl or change the storageUrl for the old account with "swauth-set-account-service " tool
edit flag offensive delete link more
0

answered 2011-08-26 03:21:17 -0500

chaupv79 gravatar image

Hi Marcelo,

I have followed your guideline as below


1) my configuration for swift proxy

[DEFAULT] bind_port = 443 cert_file = /etc/swift/cert.crt key_file = /etc/swift/cert.key user = root log_facility = LOG_LOCAL1

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

[app:proxy-server] use = egg:swift#proxy allow_account_management = true

[filter:tempauth] use = egg:swift#tempauth user_admin_admin = admin .admin .reseller_admin user_test_tester = testing .admin user_test2_tester2 = testing2 .admin user_test_tester3 = testing3

[filter:swauth] use = egg:swauth#swauth set log_name = swauth default_swift_cluster = local#https://192.168.0.15:443//v1#https://127.0.0.1:443/v1 super_admin_key = chaupv79

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

[filter:cache] use = egg:swift#memcache


2) when I create new users on "https"

swauth-add-user -A https://192.168.0.15:443/auth/ -K chaupv79 -a chau chauer chauing

=> error

root@chaupv-desktop:~/swift/trunk# swauth-add-user -A https://192.168.0.15:443/auth/ -K chaupv79 -a chau chauer chauing

Account creation failed: 500 Server Error User creation failed: 500 Server Error

Do you know why, Marcelo?

edit flag offensive delete link more
0

answered 2011-08-26 04:43:33 -0500

chaupv79 gravatar image

sorry, default_swift_cluster should be:

default_swift_cluster = local#https://192.168.0.15:443/v1#https://127.0.0.1:443/v1

edit flag offensive delete link more
0

answered 2011-08-26 04:44:00 -0500

chaupv79 gravatar image

2) when I create new users on "https"

swauth-add-user -A https://192.168.0.15:443/auth/ -K chaupv79 -a chau chauer chauing

=> error

root@chaupv-desktop:~/swift/trunk# swauth-add-user -A https://192.168.0.15:443/auth/ -K chaupv79 -a chau chauer chauing

Account creation failed: 500 Server Error User creation failed: 500 Server Error

Do you know why, Marcelo?

edit flag offensive delete link more
0

answered 2011-08-26 05:44:57 -0500

chaupv79 gravatar image

Sorry, I need to add enough information

I had created account before creating user

root@chaupv-desktop:~/swift/trunk# swauth-add-account -A https://192.168.0.15:443/auth/ -K chaupv79 chau

and the error 500 occurs =>

Account creation failed: 500 Server Error

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

2 followers

Stats

Asked: 2011-08-24 07:11:58 -0500

Seen: 1,078 times

Last updated: Jun 24 '12