A Swiss-army knife to synchronize PostgreSQL roles and privileges from YAML or LDAP.
ldap2pg is a synchronization tool that manages PostgreSQL roles and privileges by pulling data from LDAP directories or YAML configuration files. It solves the problem of manually maintaining database user accounts and permissions by automating role creation, updates, and removal based on external identity sources.
Database administrators and DevOps engineers managing PostgreSQL instances in enterprise environments where user identities are stored in LDAP directories like Active Directory, OpenLDAP, or FreeIPA.
Developers choose ldap2pg for its robust automation of PostgreSQL role management, seamless integration with existing LDAP infrastructure, and declarative YAML configuration that ensures consistency and reduces manual errors in database security management.
:elephant: :busts_in_silhouette: Manage PostgreSQL roles and privileges from YAML or LDAP
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports PostgreSQL versions from 9.5 to 17, ensuring compatibility with legacy and modern instances, as explicitly listed in the README.
Combines LDAP synchronization with expressive YAML configs for static roles and privileges, allowing hybrid identity management setups.
Includes dry run and check modes to preview changes, plus logs every SQL statement and LDAP search as ldapsearch commands for full transparency.
Works with directories like Active Directory and OpenLDAP, automating role provisioning from central identity sources, as demonstrated in the sample execution log.
Runs in batch mode via cron or scripts, so changes in LDAP aren't reflected in PostgreSQL until the next execution, potentially causing access delays.
Requires detailed YAML configuration and LDAP integration, which can be daunting for teams without prior experience with these systems, as noted in the installation notes.
Synchronization fails if the LDAP directory is unavailable, disrupting database access management without built-in fallback mechanisms.