i have installed NC 19.0.3 on a UCS 4.4.6 member from the AppCenter. I NC I get the following security warnings:
Es gibt einige Warnungen bei Deiner Systemkonfiguration.
Der HTTP-Header “Strict-Transport-Security” ist nicht auf mindestens 15552000 Sekunden eingestellt. Für mehr Sicherheit wird das Aktivieren von HSTS empfohlen, wie es in den Sicherheitshinweisen erläutert ist.
Dein Web-Server ist nicht richtig eingerichtet um “/.well-known/caldav” aufzulösen. Weitere Informationen findest Du in der Dokumentation.
Dein Web-Server ist nicht richtig eingerichtet um “/.well-known/carddav” aufzulösen. Weitere Informationen findest Du in der Dokumentation.
In der Datenbank fehlen einige Indizes. Auf Grund der Tatsache, dass das Hinzufügen von Indizes in großen Tabellen einige Zeit in Anspruch nehmen kann, wurden diese nicht automatisch erzeugt. Durch das Ausführen von “occ db:add-missing-indices” können die fehlenden Indizes manuell hinzugefügt werden, während die Instanz weiter läuft. Nachdem die Indizes hinzugefügt wurden, sind Anfragen auf die Tabellen normalerweise schneller.
Fehlender Index “calendarobject_calid_index” in der Tabelle “oc_calendarobjects_props”.
Fehlender Index “schedulobj_principuri_index” in der Tabelle “oc_schedulingobjects”.
Fehlender Index “properties_path_index” in der Tabelle “oc_properties”.
In der Datenbank fehlen einige optionale Spalten. Da das Hinzufügen von Spalten bei großen Tabellen einige Zeit dauern kann, wurden sie nicht automatisch hinzugefügt, wenn sie optional sein können. Durch Ausführen von “occ db:add-missing-columns” können diese fehlenden Spalten manuell hinzugefügt werden, während die Instanz weiter läuft. Sobald die Spalten hinzugefügt sind, könnten einige Funktionen die Reaktionsfähigkeit oder die Benutzerfreundlichkeit verbessern.
Fehlende optionale Spalte “reference_id” in der Tabelle “oc_comments”.
Einige Spalten in der Datenbank können zu big int konvertiert werden. Das Ändern von Spaltentypen kann bei großen Tabellen einige Zeit dauern. Deshalb muss die Konvertierung manuell durch den Befehl “occ db:convert-filecache-bigint” gestartet werden. Zur Konvertierung muss die Instanz offline sein. Einzelheiten dazu auf der zugehörigen Dokumentationsseite.
I think unfortunatly not all the warnings can be handled the same way.
hsts: there is a systemwide setting which you can apply. ucr search hsts will give you the relevant settings.
the occ-commands: you can run them with univention-app shell nextcloud sudo -u www-data /var/www/html/occ
I have had difficulties getting rid of the /.well-known/... entries. As I have a dedicated apache-vhost and subdomain for nextcloud, I have finally added the rewrite entries from the nextcloud doc to that file (I didn’t get any .htacces-method to work).
If nextcloud is served through /etc/apache/sites-enabled/default-ssl.conf it should pick up those values I guess. See /etc/univention/templates/files/etc/apache2/sites-available/ssl.d/10hsts
I see on a system - where I didn’t configure a subdomain - that for the well-known part I have created a file: /etc/univention/templates/files/etc/apache2/sites-available/ssl.d/50nextcloud-wellknown
With:
No, if you have just installed it through the app-center, then you won’t have a dedicated apache-vhost.
My proposal is to add a file to a ucs-template - the one that is serving the default-ssl.conf
That beeing said, you should read through the developer handbook from ucs and get comfortable with adding and changing template-files.
I have not seen an easy way to handle those well-known entries.
That beeing said - they actually don’t affect the service on nextcloud. They just serve a discovery-service - especially for mobil devices - for the calendar and contacts app on nextcloud.
Everything should work without these settings too.
On the UCS host (not Docker container) the file “/etc/apache2/sites-enabled/default-ssl.conf” exists.
# Warning: This file is auto-generated and might be overwritten by
# univention-config-registry.
# Please edit the following file(s) instead:
# Warnung: Diese Datei wurde automatisch generiert und kann durch
# univention-config-registry ueberschrieben werden.
# Bitte bearbeiten Sie an Stelle dessen die folgende(n) Datei(en):
#
# /etc/univention/templates/files/etc/apache2/sites-available/ssl.d/00start
# /etc/univention/templates/files/etc/apache2/sites-available/ssl.d/10hsts
# /etc/univention/templates/files/etc/apache2/sites-available/ssl.d/10univention-appcenter
# /etc/univention/templates/files/etc/apache2/sites-available/ssl.d/99end
#
<IfModule mod_ssl.c>
<VirtualHost *:443>
IncludeOptional /etc/apache2/ucs-sites.conf.d/*.conf
SSLEngine on
SSLProxyEngine on
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
SSLProxyCheckPeerExpire off
SSLCertificateFile /etc/univention/ssl/cloud01.gehr.local/cert.pem
SSLCertificateKeyFile /etc/univention/ssl/cloud01.gehr.local/private.key
SSLCACertificateFile /etc/univention/ssl/ucsCA/CAcert.pem
#SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
### To enable special log format for HTTPS-access
# LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\" %p" combinedssl
# CustomLog /var/log/apache2/access.log combinedssl ## with port number
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
</IfModule>
ProxyPass /nextcloud http://127.0.0.1:40000/nextcloud retry=0
ProxyPassReverse /nextcloud http://127.0.0.1:40000/nextcloud
</VirtualHost>
</IfModule>
Here are the values for Nextcloud. In which template do I have to insert which rows?
If you compare the header of your default-ssl.conf with my proposal you will see that I have created an additional template-file 50nextcloud that writes the missing redirections to this file.
But you will actually need two files: 1) the conf-file with the content and 2) and info-file which will tell ucr to actually read this file when creating default-ssl.conf
So warning - read the docs! - the name “default-ssl.conf” indicates some importance.