#917188 radicale: configuration changes for FreedomBox

#917188#5
Date:
2018-12-23 20:42:05 UTC
From:
To:
Dear Maintainer,

Currently, FreedomBox makes the following changes to /etc/radicale/config:
1. Sets server/hosts to '127.0.0.1:5232, [::1]:5232'.
2. Sets server/base_prefix to '/radicale/'.
3. Sets well-known/caldav to '/radicale/%(user)s/caldav/'.
4. Sets well-known/carddav to '/radicale/%(user)s/carddav/'.
5. Sets rights/type to 'owner_only'.

Here is the diff between the original and modified file:

diff --git a/config b/etc/radicale/config
index 9c89526..179c8c2 100644
--- a/config
+++ b/etc/radicale/config
@@ -58,6 +58,8 @@ key = /etc/ssl/private/ssl-cert-snakeoil.key
 #realm = Radicale - Password Required


+hosts=127.0.0.1:5232, [::1]:5232
+base_prefix=/radicale/
 [encoding]

 # Encoding for responding requests
@@ -90,7 +92,7 @@ type = remote_user

 # Rights backend
 # Value: none | authenticated | owner_only | owner_write | from_file
-type = from_file
+type = owner_only

 # File for rights management from_file
 file = /etc/radicale/rights
@@ -156,3 +158,6 @@ file = /etc/radicale/rights

 # Additional HTTP headers
 #Access-Control-Allow-Origin = *
+[well-known]
+caldav=/radicale/%(user)s/caldav/
+carddav=/radicale/%(user)s/carddav/


Note that rights/type can be further configured through plinth. It can
be set to 'owner_only', 'owner_write', or 'authenticated'.

*Note* Above configs are for radicale 1.x. For 2.x, some changes are
required (at least 'base_prefix' is no longer a valid option).

We would like to see if these configuration can either be made default
for radicale package, or can be offered as a debconf configuration option.

Regards,
James

#917188#10
Date:
2018-12-24 00:29:21 UTC
From:
To:
Hi James,

Quoting James Valleroy (2018-12-23 21:42:05)

Thanks for this bugreport. Very helpful!

It is not recommended to use the built-in web service for production.

Debian package ships with uWSGI configuration ready to use, and
documentation for using that has recently been updated: Please check if
that is usable for FreedomBox.

with uWSGI, you can declare prefix in a Apache vhost snippet - see
example snippet shipped with Radicale in unstable.

Please test and tell if it works - I use Radicale only at the root of a
dedicated vhost.

I believe this is no longer needed with Radicale 2.x - please file bugs
if something like this is needed.

Radicale in unstable use 'from_file' by default, with rights file
configured similar to owner_only.

Suggestions welcome for improved default setup of rights file.

Don't have Plinth edit conffiles ever - it *CANNOT* work reliably!

All Radicale configfiles are currently (and previously too) conffiles.

Here is one way to have adaptable Radicale configuration without risking
questions during upgrade, for Buster:

 1. Copy radicale files to somewhere under Plinth control:
    * /etc/radicale/* → /etc/plinth/radicale/*
    * /etc/uwsgi/*/radicale.conf → /etc/uwsgi/*/radicale_plinth.conf
 2. Edit the copied files to use each other
 3. Edit the copied files for the needed adaption
 4. When Plinth is asked to change a setting, do steps 1-3.
 5. When radicale package is updated, do steps 1-3.

I guess step 5 is done with a dpkg trigger, but I have no experience
with that.

If you want Radicale to offer debconf handling of auth type, then please
file a separate bugreport to discuss that specifically.  Beware that in
my experience user-friendly CalDAV/CardDAV clients (read: Apple ical)
can only make use of "ower_only"-style auth types - only crude clients
(read: Lightning) can use more "creative" auth types.  I am therefore
hesitant to spending time making that configurable.  But if needed,
please file a bugreport and try convince me :-)


 - Jonas