Synchronize PostgreSQL roles and ACLs 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 ACL statically or from LDAP entries.
Dry run.
Logs LDAP queries as ldapsearch commands.
Logs every SQL queries.
Reads settings from an expressive YAML config file.
Here is a sample configuration and execution:
$ cat docs/ldap2pg.minimal.yml - 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 docs/ldap2pg.minimal.yml --real Starting ldap2pg 3.4. Using /.../src/dalibo/ldap2pg/docs/ldap2pg.minimal.yml. Running in real mode. Inspecting Postgres... Querying LDAP ou=people,dc=ldap,dc=ldap2pg,dc=docker... Create albert. Create alter. Create didier. Create ldap. Add ldap members. Update options of alan. Update options of alice. Reassign oscar objects and purge ACL on template1. Reassign oscar objects and purge ACL on appdb. Reassign oscar objects and purge ACL on postgres. 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-4.3.tar.gz
.
File metadata
- Download URL: ldap2pg-4.3.tar.gz
- Upload date:
- Size: 23.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd2f64e3d23c07873489eea9a567adfdaa57b12e7ae7c3c7f574d12c5061c195 |
|
MD5 | dfeb96f5272a528b9d0d90250323ded9 |
|
BLAKE2b-256 | 6756edee470a5ae405746f6380b8847f62e8f007d26160a7f4e62d8ecd102224 |
Provenance
File details
Details for the file ldap2pg-4.3-py2.py3-none-any.whl
.
File metadata
- Download URL: ldap2pg-4.3-py2.py3-none-any.whl
- Upload date:
- Size: 29.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 420fd8fde43d27b0d521b972deeabc4a0a2200e535f9de83bc3a5a23db07dda0 |
|
MD5 | aa676e876b849eb32aab1fb091e5c3b6 |
|
BLAKE2b-256 | 755a092627dd7d2571901d00747e04bdd4c7ed3e619480718d185d9a3615d937 |