Changeset - 6ff3a42bd396
[Not reviewed]
0 6 0
Branko Majic (branko) - 1 month ago 2025-02-13 22:48:38
branko@majic.rs
MAR-242: Added role parameter to xmpp_server role for configuring uploaded file expiration (XEP-0363):

- Also reworded and harmonised related role parameter descriptions.
6 files changed with 21 insertions and 8 deletions:
0 comments (0 inline, 0 general) First comment
docs/rolereference.rst
Show inline comments
 
@@ -978,13 +978,20 @@ Parameters
 
  for user authentication and listing.
 

	
 
**xmpp_http_file_share_daily_quota** (integer, optional, ``104857600``)
 
  Daily quota for individual users - maximum file size in bytes that a
 
  particular user can upload per day (`XEP-0363: HTTP File Upload
 
  <https://xmpp.org/extensions/xep-0363.html>`_).
 
  Daily quota (in bytes) for users sharing (uploading) files via
 
  `XEP-0363: HTTP File Upload
 
  <https://xmpp.org/extensions/xep-0363.html>`_.
 

	
 
**xmpp_http_file_share_expiry** (integer, optional, ``604800``)
 
  Expiration time (in seconds) for files shared via `XEP-0363: HTTP
 
  File Upload <https://xmpp.org/extensions/xep-0363.html>`_. Expired
 
  files are removed from the server in order to avoid filling up the
 
  disk.
 

	
 
**xmpp_http_file_share_size_limit** (integer, optional, ``10485760``)
 
  Maximum file size in bytes to allow for upload (`XEP-0363: HTTP File
 
  Upload <https://xmpp.org/extensions/xep-0363.html>`_).
 
  Maximum file size (in bytes) for files shared (uploaded) via
 
  `XEP-0363: HTTP File Upload
 
  <https://xmpp.org/extensions/xep-0363.html>`_.
 

	
 
**xmpp_server_archive_expiration** (string, optional, ``never``)
 
  Expiration period for messages stored server-side using `XEP-0313:
roles/xmpp_server/defaults/main.yml
Show inline comments
 
@@ -2,6 +2,7 @@
 

	
 
enable_backup: false
 
xmpp_http_file_share_daily_quota: 104857600  # 100MiB
 
xmpp_http_file_share_expiry: 604800  # one week
 
xmpp_http_file_share_size_limit: 10485760  # 10MiB
 
xmpp_server_archive_expiration: "never"
 
xmpp_server_tls_protocol: "tlsv1_2+"
roles/xmpp_server/molecule/default/group_vars/parameters-optional.yml
Show inline comments
 
@@ -7,6 +7,7 @@ xmpp_domains:
 
  - domain2
 
  - domain3
 
xmpp_http_file_share_daily_quota: 73400320  # 70MiB
 
xmpp_http_file_share_expiry: 345600  # 4 days
 
xmpp_http_file_share_size_limit: 20971520  # 20MiB
 
xmpp_ldap_base_dn: dc=local
 
xmpp_ldap_password: prosodypassword
roles/xmpp_server/molecule/default/tests/test_mandatory.py
Show inline comments
 
@@ -40,7 +40,8 @@ Component "proxy.domain1" "proxy65"
 
Component "upload.domain1" "http_file_share"
 
  http_file_share_access = { "domain1" }
 
  http_file_share_size_limit = 10485760
 
  http_file_share_daily_quota = 104857600""" in config.content_string
 
  http_file_share_daily_quota = 104857600
 
  http_file_share_expires_after = 604800""" in config.content_string
 

	
 

	
 
def test_xmpp_server_uses_correct_dh_parameters(host):
roles/xmpp_server/molecule/default/tests/test_optional.py
Show inline comments
 
@@ -40,7 +40,8 @@ Component "proxy.domain2" "proxy65"
 
Component "upload.domain2" "http_file_share"
 
  http_file_share_access = { "domain2" }
 
  http_file_share_size_limit = 20971520
 
  http_file_share_daily_quota = 73400320""" in config.content_string
 
  http_file_share_daily_quota = 73400320
 
  http_file_share_expires_after = 345600""" in config.content_string
 

	
 
        assert """VirtualHost "domain3"
 
Component "conference.domain3" "muc"
 
@@ -50,7 +51,8 @@ Component "proxy.domain3" "proxy65"
 
Component "upload.domain3" "http_file_share"
 
  http_file_share_access = { "domain3" }
 
  http_file_share_size_limit = 20971520
 
  http_file_share_daily_quota = 73400320""" in config.content_string
 
  http_file_share_daily_quota = 73400320
 
  http_file_share_expires_after = 345600""" in config.content_string
 

	
 

	
 
@pytest.mark.parametrize("port", [
roles/xmpp_server/templates/prosody.cfg.lua.j2
Show inline comments
 
@@ -114,4 +114,5 @@ Component "upload.{{ domain }}" "http_file_share"
 
  http_file_share_access = { "{{ domain }}" }
 
  http_file_share_size_limit = {{ xmpp_http_file_share_size_limit }}
 
  http_file_share_daily_quota = {{ xmpp_http_file_share_daily_quota }}
 
  http_file_share_expires_after = {{ xmpp_http_file_share_expiry }}
 
{% endfor -%}
0 comments (0 inline, 0 general) First comment
You need to be logged in to comment. Login now