从yaml或ldap管理postgresql角色和权限
ldap2pg的Python项目详细描述
同步来自yaml或ldap的postgres角色和权限的瑞士军刀。
功能
- 创建、更改和删除LDAP查询中的PostgreSQL角色
- 从yaml创建静态角色以完成ldap条目。
- 管理角色成员(别名groups)。
- 静态或从LDAP条目授予或撤消权限。
- 干跑。
- 将LDAP查询记录为ldapsearch命令
- 记录everysql查询。
- 从表示性的yaml配置文件读取设置。
下面是配置和执行示例:
$ cat docs/ldap2pg.minimal.yml - role: name: ldap_roles options: NOLOGIN - ldap: base: ou=people,dc=ldap,dc=ldap2pg,dc=docker filter: "(objectClass=organizationalRole)" role: name: '{cn}' options: LOGIN parent: ldap_roles $ ldap2pg --config docs/ldap2pg.minimal.yml --real Starting ldap2pg 4.9. Using .../docs/ldap2pg.minimal.yml. Running in real mode. Inspecting roles in Postgres cluster... Querying LDAP ou=people,dc=ldap,dc=lda... (objectClass... Create albert. Create alter. Create didier. Create dorothée. Create ldap_roles. Update options of alan. Update options of alice. Add missing ldap_roles members. Delete spurious ldap_roles members. Reassign oscar objects and purge ACL on appdb. Reassign oscar objects and purge ACL on olddb. Drop oscar. Synchronization complete. $
见版本ldap2pg.yml和documentation 更多选择。
安装
从pypi tarball安装:
pip install ldap2pg pyscopg2-binary
更多详细信息请参见documentation。
ldap2pg在postgresqllicense下获得许可。ldap2pg可用于 在优秀人士的帮助下,跳到contributors列表查看他们。
支架
如果您需要支持,但在documentation中找不到,只需放置一个 在GitHub issue中提问! 不要错过cookbook。 不客气!