简体   繁体   中英

swift + keystone user / password invalid

i am newbie at openstack i just installed and configured Swift. Followed this instruction: http://docs.openstack.org/developer/swift/development_saio.html

everything works fine. Next i want to create users, groups dynamically. But i found its not possible by swift alone, but keystone. I read lots about keystone before install it, because i've never heard keystone.

my swift username and password is admin:admin, then i exported OS_USERNAME=admin,OS_PASSWORD=admin. But it always shows user/ password invalid error when i try to use keystone api or functions. How can i know Openstack user information or Keystone user information ?

is there any other way to manage user, groups, containers ?

My Goal is: creating cloud storage service. Manage all groups, users and storage limits by some back end app. it will be written in PHP, i hope php + curl can manage it.

plus one thing is very unclear, How do i create private files, and how clients access to this private files.

Please help me experts. I am very confused, spent 50 hours straight. Really stacked on it :(

Openstack uses different credentials for each service, you can look at /etc/keystone/keystone.conf for the administration token and then set OS_SERVICE_TOKEN = {TheAdminToken}.

[DEFAULT]

admin_token = password

export OS_SERVICE_TOKEN = password

This way you got a easy access for local administration of keystone (Don't do this in an non-trusted network).

The next step it's to create the users and assign them a role in a tenant, wich can be do by curl or the keystone client.

After that, the last things it's to configure swift to connect to the keystone endpoint to the authentication task.

 swift -V2 -A http://keystone_endpoint_url:5000/v2.0 -U user -K pass -T tenant stat

To create your own php client you'll have to learn the APIs of both services.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM