Synchronise LDAP users to MySQL and MariaDB
Project description
myldapsync - fork of pgldapsync by EnterpriseDB Corporation adopted for MySQL and MariaDB
This Python module allows you to synchronise MySQL or MariaDB users with users in an LDAP directory.
Require MySQL 8 with installed and configured simple or sasl LDAP Authentication Plugin or PAM plugin (pam also supported in MySQL 5.7 and MariaDB).
Percona Server for MySQL:
https://docs.percona.com/percona-server/8.0/ldap-authentication
https://docs.percona.com/percona-server/8.0/pam-plugin.html
MySQL:
https://dev.mysql.com/doc/refman/8.0/en/ldap-pluggable-authentication.html
https://dev.mysql.com/doc/refman/8.0/en/pam-pluggable-authentication.html
MariaDB:
https://mariadb.com/kb/en/authentication-plugin-pam/
myldapsync is supported on Python 3.8 or later.
In order to use it, you will need to create a config.ini file containing the site-specific configuration you require. See config.ini.example for a complete list of all the available configuration options. This file should be copied to create your own configuration.
Once configured, simply run myldapsync like so:
python3 myldapsync.py /path/to/config.ini
In order to test the configuration (and dump the SQL that would be executed to stdout), run it like this:
python3 myldapsync.py --dry-run /path/to/config.ini
Creating a virtual environment for dev/test
python3 -m venv /path/to/myldapsync
source /path/to/myldapsync/bin/activate
pip install -r requirements.txt
Adapt the first command as required for your environment/Python version.
Creating a package
To create a package (wheel), run the following in your virtual environment:
python3 setup.py sdist bdist_wheel
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 myldapsync-1.0.8.tar.gz
.
File metadata
- Download URL: myldapsync-1.0.8.tar.gz
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b49e637f2c9acfe34d795fd15f8ab2922de4bb0d56e037234681b6d0a9c8d57 |
|
MD5 | aac04e20bac62b9f460504ff763767a1 |
|
BLAKE2b-256 | fb7115c3b1130df2f274dc2de68b937989780eeaed4b07a5d0d252f50c640910 |
File details
Details for the file myldapsync-1.0.8-py3-none-any.whl
.
File metadata
- Download URL: myldapsync-1.0.8-py3-none-any.whl
- Upload date:
- Size: 13.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 662dc63691511d3f88c083d2058530bb2d08f9916022956e673ba694658d045a |
|
MD5 | d34b66b846a9873d7d37fe8db680207a |
|
BLAKE2b-256 | c128bc01e890f545609fac67351142ac47552ffae80d585e6a01c143279e614a |