Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

curl add container

Hi ,all

(1)

I have swift.1.4.2 installed and swauth1.0.2 installed, as SAIO in ubuntu-11.04-server-i386.

vim /etc/swift/proxy-server.conf

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

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

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

[filter:swauth] use = egg:swauth#swauth default_swift_cluster = local#https://192.168.1.57:443/v1#https://127.0.0.1:443/v1 user_admin_admin = admin .admin .reseller_admin user_test_tester = testing .admin user_test2_tester2 = testing2 .admin user_test_tester3 = testing3 set log_name = root super_admin_key = password

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

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

follow commands

swauth-prep -K password -A https://127.0.0.1/auth/

swauth-add-user -K password -A https://127.0.0.1/auth/ -a test tester testing

curl -k -v -H 'X-Storage-User: test:tester' -H 'X-Storage-Pass: testing' https://192.168.1.57/auth/v1.0

  • About to connect() to 192.168.1.57 port 443 (#0)
  • Trying 192.168.1.57... connected
  • Connected to 192.168.1.57 (192.168.1.57) port 443 (#0)
  • successfully set certificate verify locations:
  • CAfile: none CApath: /etc/ssl/certs
  • SSLv3, TLS handshake, Client hello (1):
  • SSLv3, TLS handshake, Server hello (2):
  • SSLv3, TLS handshake, CERT (11):
  • SSLv3, TLS handshake, Server finished (14):
  • SSLv3, TLS handshake, Client key exchange (16):
  • SSLv3, TLS change cipher, Client hello (1):
  • SSLv3, TLS handshake, Finished (20):
  • SSLv3, TLS change cipher, Client hello (1):
  • SSLv3, TLS handshake, Finished (20):
  • SSL connection using AES256-SHA
  • Server certificate:
  • subject: C=CH; ST=ZJ; L=HZ; O=INFOCORE; OU=INFOCORE; CN=LYQ; emailAddress=linyouqing7@gmail.com
  • start date: 2011-08-28 11:48:22 GMT
  • expire date: 2011-09-27 11:48:22 GMT
  • common name: LYQ (does not match '192.168.1.57')
  • issuer: C=CH; ST=ZJ; L=HZ; O=INFOCORE; OU=INFOCORE; CN=LYQ; emailAddress=linyouqing7@gmail.com
  • SSL certificate verify result: self signed certificate (18), continuing anyway. > GET /auth/v1.0 HTTP/1.1 > User-Agent: curl/7.21.3 (i686-pc-linux-gnu) libcurl/7.21.3 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.18 > Host: 192.168.1.57 > Accept: / > X-Storage-User: test:tester > X-Storage-Pass: testing > < HTTP/1.1 200 OK < X-Storage-Url: https://127.0.0.1:443/v1/AUTH_24dde20f-275d-42d0-955c-8ab1a6e6e3e1 < X-Storage-Token: AUTH_tk7db9b58676e84bc99380fb04ce794f81 < X-Auth-Token: AUTH_tk7db9b58676e84bc99380fb04ce794f81 < Content-Length: 112 < Date: Mon, 29 Aug 2011 02:54:37 GMT <
  • Connection #0 to host 192.168.1.57 left intact
  • Closing connection #0
  • SSLv3, TLS alert, Client hello (1): {"storage": {"default": "local", "local": "https://127.0.0.1:443/v1/AUTH_24dde20f-275d-42d0-955c-8ab1a6e6e3e1"}}

then I have two problem 1) how to create container , 2)how to use Cyberduck in windows to connet swift ? 1) swift -A https://127.0.0.1:443/auth/v1.0 -U test:tester -K testing stat Account HEAD failed: https://127.0.0.1:443/v1/AUTH_24dde20f-275d-42d0-955c-8ab1a6e6e3e1 403 Forbidden 2) curl -X PUT -D - -H "X-Auth_Token: AUTH_tk7db9b58676e84bc99380fb04ce794f81" https://127.0.0.1:443/auth/v1/AUTH_test/container curl: (60) SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle" of Certificate Authority (CA) public keys (CA certs). If the default bundle file isn't adequate, you can specify an alternate file using the --cacert option. If this HTTPS server uses a certificate signed by a CA represented in the bundle, the certificate verification probably failed due to a problem with the certificate (it might be expired, or the name might not match the domain name in the URL). If you'd like to turn off curl's verification of the certificate, use the -k (or --insecure) option.

3)at windows cyberduck I choose Swift and input

Server: 192.168.1.57 Port:443 Name:test:tester API Access Key:testing

but it return login failed .

I didn't kown how solve these problems, it's grateful that someone could help me .