Ask Your Question
0

Can the user in swift certified by swauth be seen by S3?

asked 2013-10-31 06:25:07 -0500

qi-weining gravatar image

I installed swift and swauth in four DELL servers.

(1) proxy and swauth. IP:210...*,192.168.1.2. (2)storage node,IP:192.168.1.3. (3)storage node,IP:192.168.1.4. (4)storage node,IP:192.168.1.5.

I use swauth add users in swift, and upload containers and objects. I want to use a S3 client access the containers and objects. How can I do that?

Thanks a lot.

edit retag flag offensive close merge delete

11 answers

Sort by » oldest newest most voted
0

answered 2013-11-01 09:25:33 -0500

I have used boto(https://github.com/boto/boto) to test s3 api for swift.

But which api did you use in cyberduck for swift, s3-style or swift-style?

edit flag offensive delete link more
0

answered 2013-11-01 09:02:16 -0500

If you have to use S3 client, you need your swift response S3-style-api for your swift servers. Currently, for swift, there is a middleware to implement the S3-style-api: https://github.com/fujita/swift3

It's not difficult and you could clone the source codes and have a run

edit flag offensive delete link more
0

answered 2013-11-01 09:13:21 -0500

qi-weining gravatar image

Thank you, Kun Huang.

I have installed swift3 and it run. The auth in my swift is swauth.

I have changed the proxy_server.conf.

The cyberduck can be used to access my swift.

However, I can not use s3curl asscessed my swift with s3.

I need a client to let my mates apply for new account and changed their password.

Any one know such a S3 client?

edit flag offensive delete link more
0

answered 2013-11-01 10:26:59 -0500

qi-weining gravatar image

I use the conf file from "•​Download the Openstack Swift (Swauth HTTP) profile for preconfigured settings. "

If I have used a swift-style, Does it mean that I need another test?

I have installed boto. But I can not connect to my swift.

Can you give me some advice about boto. Or can you give me the python examples?

edit flag offensive delete link more
0

answered 2013-11-01 11:04:32 -0500

1st, you should install swift3 middleware to enable s3-style api 2nd, setup boto connection and try boto's libraries, like this:

import boto from boto.s3.connection import S3Connection conn= S3Connection( aws_access_key_id='system:root', aws_secret_access_key='testpass', port=8080, host='127.0.0.1', is_secure=False, calling_format=boto.s3.connection.OrdinaryCallingFormat())

edit flag offensive delete link more
0

answered 2013-11-05 03:03:04 -0500

qi-weining gravatar image

Thanks, Kun huang. Your advices help me. There is another problem. Boto conncetion is OK. But when I want to create a bucket, 403 forbidden.

conn.create_bucket('testforq') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "boto/s3/connection.py", line 441, in create_bucket response.status, response.reason, body) boto.exception.S3ResponseError: S3ResponseError: 403 Forbidden <error> AccessDenied <message>Access denied</message> </error>

edit flag offensive delete link more
0

answered 2013-11-05 03:16:50 -0500

What is your aws_access_key_id and its key? And what content have you used in swauth section in config file

edit flag offensive delete link more
0

answered 2013-11-05 03:27:50 -0500

qi-weining gravatar image

aws_access_key_id:test1:tester1 key:testing

conn.access_key 'test1:tester1' conn.aws_access_key_id 'test1:tester1' conn.aws_secret_access_key 'testing'

my config file

[DEFAULT] bind_port = 8080 user = swift log_facility = LOG_LOCAL0

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

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

[filter:swauth] use = egg:swauth#swauth

Highly recommended to change this.

super_admin_key = swauthkey default_swift_cluster = local#http://210...*:8080/v1#http://192.168.1.2:8080/v1

[filter:swift3] use = egg:swift3#swift3

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

[filter:cache] use = egg:swift#memcache memcache_servers = 192.168.1.2:11211

edit flag offensive delete link more
0

answered 2013-11-05 03:40:17 -0500

I found you didn't use test or testing in your swauth section. You could have a try "admin:key" and "swauthkey"

edit flag offensive delete link more
0

answered 2013-11-05 04:37:17 -0500

qi-weining gravatar image

I have used these for adding users. And upload containers and objs.

I just want to test the S3 in swift.

swift and swauth are both OK.

swauth-add-user -A http://127.0.0.1:8080/auth/ -K swauthkey -a test tester testing

swauth-add-user -A http://127.0.0.1:8080/auth/ -K swauthkey -a test1 teste1 testing

swift -A http://127.0.0.1:8080/auth/v1.0 -U test:tester -K testing upload

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: 2013-10-31 06:25:07 -0500

Seen: 243 times

Last updated: Nov 05 '13