Add LDAP authentication support to Prosody (#50)

This commit adds support for LDAP authentication.

The Dockerfile has been modified to install the required Lua modules (lua-ldap) and the prosody.cfg.lua file has been modified to add environment variables for configuring the LDAP connection. These environment variables include LDAP_BASE, LDAP_SERVER, LDAP_ROOTDN, LDAP_PASSWORD, LDAP_FILTER, LDAP_SCOPE, LDAP_TLS, LDAP_MODE, and LDAP_ADMIN_FILTER.

The authentication variable has also been updated to use the value of the AUTHENTICATION environment variable, which defaults to "internal_hashed" if not set. This allows users to configure Prosody to use LDAP for authentication instead of the default internal hashing method.

* Update test dependencies: aioxmpp, pytest-asyncio + add pytz to requirements.txt

This fixes the following error when running the tests:
E   ModuleNotFoundError: No module named 'pytz'

Instead of pytz only pytz-deprecation-shim was installed.

TODO Check if "pytz" can be removed from requirements.txt later on.
This commit is contained in:
Sara Aimée Smiseth 2023-03-25 11:23:51 +01:00 committed by GitHub
parent f7fcfd5d88
commit 81e9c1abd9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 53 additions and 31 deletions

View file

@ -1,3 +1,4 @@
aioxmpp==0.13.2
aioxmpp==0.13.3
pip-chill==1.0.1
pytest-asyncio==0.18.3
pytest-asyncio==0.21.0
pytz==2022.7.1