跳转到主要内容

Swift的替代认证系统

项目描述

Swauth

Swauth是一个作为WSGI中间件使用的认证服务,它使用Swift自身作为后端存储。文档在:<https://swauth.readthedocs.io/> 或在freenode的#openstack-swauth上提问 [IRC](http://eavesdrop.openstack.org/irclogs/%23openstack-swauth/).

另请参阅 <https://github.com/openstack/keystone> 以了解标准的OpenStack认证服务。

注意

请务必查看以下文档:<https://swauth.readthedocs.io/>

快速安装

  1. 使用 sudo python setup.py installsudo python setup.py develop 或您可能使用的任何打包系统来安装 Swauth。

  2. 将您的 proxy-server.conf 管道修改为使用 swauth 而不是 tempauth

    原本是

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

    改为

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

  3. 在 proxy-server.conf 中添加 Swauth WSGI 过滤器部分

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

  4. 确保您的代理服务器允许账户管理

    [app:proxy-server] … allow_account_management = true

  5. 重启您的代理服务器 swift-init proxy reload

  6. 在 Swift 中初始化 Swauth 后台存储 swauth-prep -K swauthkey

  7. 添加账户/用户 swauth-add-user -A http://127.0.0.1:8080/auth/ -K swauthkey -a test tester testing

  8. 确保其正常工作 swift -A http://127.0.0.1:8080/auth/v1.0 -U test:tester -K testing stat -v

Web 管理员安装

  1. 如果您是从软件包安装的,您需要切换到安装的软件包中的 webadmin 目录。这是 Lucid 软件包中的 /usr/share/doc/python-swauth/webadmin。如果您是从源代码安装的,您需要切换到源代码目录中的 webadmin 目录。

  2. 使用 swift -A http://127.0.0.1:8080/auth/v1.0 -U .super_admin:.super_admin -K swauthkey upload .webadmin . 命令上传 Web 管理员文件

  3. 在浏览器中打开 http://127.0.0.1:8080/auth/

Swift3 中间件兼容性

[Swift3 中间件](https://github.com/openstack/swift3) 可以与 swauth 一起使用,当 swauth 中的 auth_type 配置为 Plaintext(默认)时。

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

也可以与设置为 Sha1/Sha512 的 auth_type 一起使用,但有一些注意事项和安全问题。因此,默认情况下禁用了 s3 支持,您必须在配置中显式启用它。有关更多详细信息,请参阅文档中的 Swift3 兼容性 [部分](https://swauth.readthedocs.io/en/latest/#swift3-middleware-compatibility)

项目详情


下载文件

下载您平台上的文件。如果您不确定要选择哪个,请了解有关 安装软件包 的更多信息。

源代码分发

swauth-1.3.0.tar.gz (161.8 kB 查看哈希值)

上传时间 源代码

构建分发

swauth-1.3.0-py2-none-any.whl (38.3 kB 查看哈希值)

上传时间 Python 2

由以下机构支持