Skip to main content

Synchronize PostgreSQL roles from LDAP

Project description

Continuous Integration report Code coverage report

Swiss-army knife to synchronize Postgres roles from any LDAP directory.

Features

  • Creates and drops PostgreSQL roles from LDAP queries.

  • Manage role options (CREATE and ALTER).

  • Manage role members (alias groups).

  • Dry run.

  • logs LDAP queries as ldapsearch commands.

  • logs every SQL queries.

  • Reads settings from YAML config file.

$ cat ldap2pg.yml
sync_map:
  ldap:
    base: ou=people,dc=ldap2pg,dc=local
    filter: "(objectClass=organizationalRole)"
    attribute: cn
  role:
    name_attribute: cn
$ ldap2pg
 INFO Starting ldap2pg 0.1.
 INFO Creating new role alice.
WARNI Dropping existing role toto.
 INFO Synchronization complete.
$

See versionned ldap2pg.yml for further options.

Installation

Install it from GitHub tarball:

pip install https://github.com/dalibo/ldap2pg/archive/master.zip

ldap2pg is licensed under PostgreSQL license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ldap2pg-1.0a1.tar.gz (10.3 kB view hashes)

Uploaded Source

Built Distribution

ldap2pg-1.0a1-py2.py3-none-any.whl (13.7 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page