Synchronize PostgreSQL roles from LDAP
Project description
Swiss-army knife to synchronize Postgres roles and ACLs from any LDAP directory.
Features
Creates, alter and drops PostgreSQL roles from LDAP queries.
Creates static roles from YAML to complete LDAP entries.
Manage role members (alias groups).
Grant or revoke custom ACL statically or from LDAP entries.
Dry run.
Logs LDAP queries as ldapsearch commands.
Logs every SQL queries.
Reads settings from YAML config file.
Here is a sample configuration and execution:
$ cat ldap2pg.minimal.yml sync_map: - role: name: ldap options: NOLOGIN - ldap: base: ou=people,dc=ldap,dc=ldap2pg,dc=docker filter: "(objectClass=organizationalRole)" attribute: cn role: name_attribute: cn options: LOGIN parent: ldap $ ldap2pg --color --config ldap2pg.minimal.yml --real 2>&1 | sed s,bersace,...,g Starting ldap2pg 2.0a3. Using /home/.../src/dalibo/ldap2pg/ldap2pg.minimal.yml. Running in real mode. Inspecting Postgres... Querying LDAP ou=people,dc=ldap,dc=ldap2pg,dc=docker... Create alan. Create albert. Create dave. Create donald. Create ldap. Add ldap members. Update options of alice. Reassign oscar objects and purge ACL on frontend. Reassign oscar objects and purge ACL on postgres. Reassign oscar objects and purge ACL on template1. Drop oscar. Synchronization complete. $
See versionned ldap2pg.yml and documentation for further options.
Installation
Install it from PyPI tarball:
pip install ldap2pg
More details can be found in documentation.
ldap2pg is licensed under PostgreSQL license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ldap2pg-3.0.tar.gz
.
File metadata
- Download URL: ldap2pg-3.0.tar.gz
- Upload date:
- Size: 17.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ea23b0bdf0291e76af055880cbb5bbfc02429657a3f82652929b0135a96bf5a |
|
MD5 | 6efd3bbe47947bca5b5169dd97e58440 |
|
BLAKE2b-256 | f963cadccde6e681ef9560dcc7760e49276884433f9b098fe20432ca7676aa4b |
File details
Details for the file ldap2pg-3.0-py2.py3-none-any.whl
.
File metadata
- Download URL: ldap2pg-3.0-py2.py3-none-any.whl
- Upload date:
- Size: 22.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 137b64c228842aa4c5302892999c7d40543ddf52228fd361071f16d23d0fdee8 |
|
MD5 | e7a1b9baf95fa6bf469f81436c363830 |
|
BLAKE2b-256 | 0796eaafc087325e545b46cdd8994fee3dfa56e7852ce5f60a2c44a66809f70b |