LDAP-based Identity Management Web service.
NOTE: this was started as a generic LDAP identity management Web service but later on additional custom bits were added making it harder to adapt it to different LDAP directory schemes. Code now obviously needs some refactoring.
It's recommended to use virtualenv.
python3 -m venv ~/venv3
source ~/venv3/bin/activate
Note that on Debian/Ubuntu you might need to install python3-venv package.
Once it's set up we need to download all the dependencies, it can be done in place:
python setup.py develop
Make sure you read Configuration below and that you have ldapcommon.py ready.
Run the service via pserve:
pserve --reload emokykla-dev.ini
You can test it using one of the dummy scripts in curl-tests.
./curl-tests/login.sh namsur1 password
NOTE: this is insecure and to be used only for testing purposes therefore do not play like this with the real credentials.
Configuration is a bit ugly at the moment, all variables are declared in a Python module. To start copy the skeleton:
cp emokykla/ldapcommon_example.py emokykla/ldapcommon.py
and edit it paying attention to the first part before "Development parameters" comment.
Somewhat readable API documentation can be generated by Sphinx from the docstrings:
cd emokykla/docs
make html
HTML files will be generated in emokykla/docs/build/html folder.