2016-10-18 20:20:59 +00:00
|
|
|
-- see example config at https://hg.prosody.im/0.9/file/0.9.10/prosody.cfg.lua.dist
|
|
|
|
-- easily extendable by putting into different config files within conf.d folder
|
|
|
|
|
2020-10-10 06:55:43 +00:00
|
|
|
local stringy = require "stringy"
|
|
|
|
|
|
|
|
admins = stringy.split(os.getenv("PROSODY_ADMINS"), ", ");
|
|
|
|
|
|
|
|
pidfile = "/var/run/prosody/prosody.pid"
|
2016-10-18 20:20:59 +00:00
|
|
|
|
2020-06-01 06:18:15 +00:00
|
|
|
allow_registration = os.getenv("ALLOW_REGISTRATION");
|
2016-10-18 20:20:59 +00:00
|
|
|
|
2020-06-01 06:18:15 +00:00
|
|
|
c2s_require_encryption = os.getenv("C2S_REQUIRE_ENCRYPTION");
|
|
|
|
s2s_require_encryption = os.getenv("S2S_REQUIRE_ENCRYPTION");
|
|
|
|
s2s_secure_auth = os.getenv("S2S_SECURE_AUTH");
|
2016-10-18 20:20:59 +00:00
|
|
|
|
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.
2023-03-25 10:23:51 +00:00
|
|
|
authentication = os.getenv("AUTHENTICATION") or "internal_hashed";
|
|
|
|
|
|
|
|
ldap_base = os.getenv("LDAP_BASE");
|
|
|
|
ldap_server = os.getenv("LDAP_SERVER") or "localhost";
|
|
|
|
ldap_rootdn = os.getenv("LDAP_ROOTDN") or "";
|
|
|
|
ldap_password = os.getenv("LDAP_PASSWORD") or "";
|
|
|
|
ldap_filter = os.getenv("LDAP_FILTER") or "(uid=$user)";
|
|
|
|
ldap_scope = os.getenv("LDAP_SCOPE") or "subtree";
|
|
|
|
ldap_tls = os.getenv("LDAP_TLS") or "false";
|
|
|
|
ldap_mode = os.getenv("LDAP_MODE") or "bind";
|
|
|
|
ldap_admin_filter = os.getenv("LDAP_ADMIN_FILTER") or "";
|
2016-10-18 20:20:59 +00:00
|
|
|
|
|
|
|
log = {
|
2020-06-01 06:18:15 +00:00
|
|
|
{levels = {min = os.getenv("LOG_LEVEL")}, to = "console"};
|
2016-10-18 20:20:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
Include "conf.d/*.cfg.lua";
|