Swift用户的授权

cjm*_*ulu 4 openstack-swift openstack

大家.我安装了Swift 1.7.4,我想为Swift添加一个新用户,我怎么能这样做?我发现在1.4.8版本中,有人说我应该先安装swauth,我注意到Swift api也说选择一种authrize方式,所以我必须先安装一个授权服务?我还发现proxy-server.conf文件中有一个tempauth中间件,我可以用它来添加用户吗?

one*_*uth 8

是.您可以选择swauth或tempauth.这两个auth系统的最大区别在于它们存储用户信息.

Swauth将用户/密码信息存储在swift集群中.它使用一个特殊的容器并将每个用户的信息存储在其中.Swauth提供了一组命令的用户管理诸如swauth-add-user,swauth-prep

在tempauth中,它存储用户信息proxy-server.conf,因此它非常易于使用.在您的proxy-server.conf管道中启用tempauth并将用户信息放入tempauth部分.例如,

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

[filter:tempauth]
use = egg:swift#tempauth
user_admin_admin = admin .admin
user_hi_hihi = testing
Run Code Online (Sandbox Code Playgroud)

然后你将有两个用户.一个是admin:admin谁的密码admin.另一个是hi:hihi密码是谁testing.

  • 使用用户`test:tester`和密码`testing`快速测试TempAuth:`curl -v -H'X-Storage-User:test:tester'-H'X-Storage-Pass:测试'http:// < swifthost>:8080/AUTH/v1.0` (5认同)