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)" role: name_attribute: cn options: LOGIN parent: ldap $ ldap2pg --config docs/ldap2pg.minimal.yml --real Starting ldap2pg 4.5. Using .../docs/ldap2pg.minimal.yml. Running in real mode. Inspecting Postgres roles... Querying LDAP ou=people,dc=ldap,dc=lda... (objectClass... Create albert. Create alter. Create didier. Create dorothée. Create ldap. Add ldap members. Update options of alice. Update options of alan. Reassign olivier objects and purge ACL on appdb. Reassign olivier objects and purge ACL on olddb. Drop olivier. 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. ldap2pg is available with the help of wonderful people, jump to contributors list to see them.
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.8.tar.gz
.
File metadata
- Download URL: ldap2pg-4.8.tar.gz
- Upload date:
- Size: 25.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a35db0e85ce5ec0c5516ec39e0346f358ef0651cb094aa24e33ce4036bdc6de |
|
MD5 | 845d661ee29d6b0e118a1d46378b5133 |
|
BLAKE2b-256 | bc6714585a2246941dce89d08b998b1c255988401042f5bf631bf854d370190c |
File details
Details for the file ldap2pg-4.8-py2.py3-none-any.whl
.
File metadata
- Download URL: ldap2pg-4.8-py2.py3-none-any.whl
- Upload date:
- Size: 32.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0deb92bc70a41e8cec5dec7893bbe0c105c38bbe744d1aa282a53534a6dfb478 |
|
MD5 | b90fa0da67a85df3dadd78c7272547c1 |
|
BLAKE2b-256 | d606cbfc8ca3b71bb218c973b4892a20e4ab037807ac0478b24f407f95fdb782 |