diff --git a/CHANGELOG.md b/CHANGELOG.md index aa189ba..22752ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ * Made 04-server_contact_info.cfg.lua configurable with ENV variables. Fixes [#4](https://github.com/SaraSmiseth/prosody/issues/4). * Made 03-e2e-policy.cfg.lua configurable with ENV variables. Fixes [#9](https://github.com/SaraSmiseth/prosody/issues/9). +* Added E2E_POLICY_WHITELIST ENV variable to configure e2e_policy_whitelist. Fixes [#10](https://github.com/SaraSmiseth/prosody/issues/10). ## v1.1.1 diff --git a/conf.d/03-e2e-policy.cfg.lua b/conf.d/03-e2e-policy.cfg.lua index c4f1053..e296475 100644 --- a/conf.d/03-e2e-policy.cfg.lua +++ b/conf.d/03-e2e-policy.cfg.lua @@ -1,6 +1,6 @@ e2e_policy_chat = os.getenv("E2E_POLICY_CHAT") e2e_policy_muc = os.getenv("E2E_POLICY_MUC") -e2e_policy_whitelist = {} +e2e_policy_whitelist = { os.getenv("E2E_POLICY_WHITELIST") } e2e_policy_message_optional_chat = "For security reasons, OMEMO, OTR or PGP encryption is STRONGLY recommended for conversations on this server." e2e_policy_message_required_chat = "For security reasons, OMEMO, OTR or PGP encryption is required for conversations on this server." e2e_policy_message_optional_muc = "For security reasons, OMEMO, OTR or PGP encryption is STRONGLY recommended for MUC on this server." diff --git a/conf.d/04-server_contact_info.cfg.lua b/conf.d/04-server_contact_info.cfg.lua index 1aaf5fd..6268d9d 100644 --- a/conf.d/04-server_contact_info.cfg.lua +++ b/conf.d/04-server_contact_info.cfg.lua @@ -1,5 +1,3 @@ -local domain = os.getenv("DOMAIN") - contact_info = { abuse = { os.getenv("SERVER_CONTACT_INFO_ABUSE") }; admin = { os.getenv("SERVER_CONTACT_INFO_ADMIN") }; diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index a562226..9569365 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -22,6 +22,7 @@ export DOMAIN_PROXY=${DOMAIN_PROXY:-"proxy.$DOMAIN"} export DOMAIN_PUBSUB=${DOMAIN_PUBSUB:-"pubsub.$DOMAIN"} export E2E_POLICY_CHAT=${E2E_POLICY_CHAT:-"required"} export E2E_POLICY_MUC=${E2E_POLICY_MUC:-"required"} +export E2E_POLICY_WHITELIST=${E2E_POLICY_WHITELIST:-""} export LOG_LEVEL=${LOG_LEVEL:-"info"} export C2S_REQUIRE_ENCRYPTION=${C2S_REQUIRE_ENCRYPTION:-true} export S2S_REQUIRE_ENCRYPTION=${S2S_REQUIRE_ENCRYPTION:-true} diff --git a/readme.md b/readme.md index 66bf117..61c6624 100644 --- a/readme.md +++ b/readme.md @@ -192,6 +192,7 @@ Inspect logs: ```docker-compose logs -f```. | **DOMAIN_PUBSUB** | Domain for a XEP-0060 pubsub service | *optional* | pubsub.**DOMAIN** | | **E2E_POLICY_CHAT** | Policy for chat messages. Possible values: "none", "optional" and "required". | *optional* | "required" | | **E2E_POLICY_MUC** | Policy for MUC messages. Possible values: "none", "optional" and "required". | *optional* | "required" | +| **E2E_POLICY_WHITELIST** | Make this module ignore messages sent to and from this JIDs or MUCs. | *optional* | "" | | **LOG_LEVEL** | Min log level. Change to debug for more information | *optional* | info | | **C2S_REQUIRE_ENCRYPTION** | Whether to force all client-to-server connections to be encrypted or not | *optional* | true | | **S2S_REQUIRE_ENCRYPTION** | Whether to force all server-to-server connections to be encrypted or not | *optional* | true |