mod_roster can be enabled by default in the Debian package. For the other two, we will need to understand the requirements and security/privacy implications.
I agree with both of you; I think we should find sensible, cautious defaults, but ultimately leave the choice to the user, along with a warning about the implications and point to resources if they need more info.
So to get ready for implementation, I propose
Expose checkboxes to enable/disable XEPs on ejabberd configuration page, along with explanations.
Potentially monitor the size of the mnesia database used by mod_mam.
Potentially monitor the used storage for mod_http_upload.
@jvalleroy, did you manage to test vagrant box's ejabberd with https://github.com/iNPUTmice/ComplianceTester? If so, how? I've somewhat blindly tried by first apt-get install default-jdk and then tried to run it within the vagrant using localhost... but it seems to get stuck, without a clear error message (at least for me):
root@freedombox:/vagrant # java -jar ComplianceTester-0.1.jar testuser@localhost testpasswordUse compliance suite 'Advanced Server Core Compliance Suite' to test localhostTimeout while waiting on advertised authentication mechanisms.Use compliance suite 'Advanced Server IM Compliance Suite' to test localhostUse compliance suite 'Advanced Server Mobile Compliance Suite' to test localhostUse compliance suite 'Conversations Compliance Suite' to test localhost
I've got the ComplianceTester working now for the vagrant image, making further development easier. It's currently a bit annoying since you need to create a new certificate for ejabberd, because java seems to insist that the hostname is in the cert's Common Name, which currently isn't the case in the vagrant image.
The steps below assume you're in the Plinth root folder (/vagrant in the virtual image), and run the ComplianceTester from the host machine (another way may be to run it from within vagrant, but then you need to first install java).
First, you need to forward ejabberd's c2s port to the host machine, by adding this line into Vagrantfile, make sure to restart vagrant afterwards: config.vm.network "forwarded_port", guest: 5222, host: 5222
You'll want the vagrant image also reachable by its default hostname, so add this line to /etc/hosts/: 127.0.0.1 freedombox.localdomain freedombox
Within vagrant, create a new certificate for ejabberd:
On to the third, XEP-0363: HTTP File Upload.
This is the most complicated one; it needs more configuration, including the firewall. That means more defaults - let's discuss them here and document the decision process. I think we also need mod_http_upload_quota, to regulate how much disk space a user can use. I'm afraid the alternative is that it keeps filling until the disk is full.
The core assumption behind my suggestions below is that ejabberd serves only a few users, maybe 10-15 (not hundreds). I think these few users should not be hampered by too little upload space (>1 GiB, if possible). On the other hand, we're targeting small machines, and ejabberd should not unduly interfere with other services (<50% of all space). I'm assuming here at least 32 GiB in the box, so a hard limit of 1.1 GiB per user would result in just above 50% of that machine if all is used.
Maybe some settings need to be exposed in Plinth?
Maybe reporting them to the admin is suffcient?
Maybe some defaults should be adaptive to the actual machine that is being configured?
Below are the interesting settings I think we should discuss the defaults of. For those I don't mention, I think ejabberd's defaults clearly make sense. See https://docs.ejabberd.im/admin/configuration/#mod-http-upload for the details. Those of mod_http_upload_quota are just below.
Drafted defaults for mod_http_upload:
max_size: Maximal size of a single file. Ejabberd's default is 100 MiB. Seems fine?
docroot: Where to place the files. Ejabberd's default is on root partition. Seems fine, but we could give the admin a choice, in case they connect another disk?
Drafted defaults for mod_http_upload_quota:
max_days: Number of days until files are deleted. Ejabberd's default is infinity. I'd rather like something finite, like 365?
access_hard_quota: Hard limit per user. If exceeded, oldest files get erased. Ejabberd has no default. I suggest 1.1 GiB.
access_soft_quota: Soft limit per user. Unclear to me what happens if exceeded. Ejabberd has no default. I suggest 1.0 GiB.