Skip to main content

Synchronize PostgreSQL roles from LDAP

Project description

Continuous Integration report Code coverage report Version on PyPI

Swiss-army knife to synchronize Postgres roles 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).

  • 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
    options: LOGIN
$ ldap2pg --real
Using ./ldap2pg.yml.
Starting ldap2pg 1.0a2.
Running in real mode.
Inspecting Postgres...
Querying LDAP cn=people,dc=ldap2pg,dc=local...
Create bar.
Create baz.
Create bob.
Create foo.
Update options of alice.
Drop spurious.
Synchronization complete.
$

See versionned ldap2pg.yml for further options.

Installation

Install it from PypI tarball:

pip install ldap2pg

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.0b1.tar.gz (10.5 kB view hashes)

Uploaded Source

Built Distribution

ldap2pg-1.0b1-py2.py3-none-any.whl (13.9 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