Bug 37877 - Create a UCS security guide
Create a UCS security guide
Status: NEW
Product: UCS extended documentation
Classification: Unclassified
Component: Installation
unspecified
Other Linux
: P5 enhancement (vote)
: ---
Assigned To: Docu maintainers
https://help.univention.com/t/ucs-and...
:
Depends on:
Blocks: 39485
  Show dependency treegraph
 
Reported: 2015-02-25 08:48 CET by Moritz Muehlenhoff
Modified: 2023-10-17 15:04 CEST (History)
10 users (show)

See Also:
What kind of report is it?: Feature Request
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?: Yes
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2017011721000128, 2017101921000287
Bug group (optional): External feedback, Release Goal, Roadmap discussion (moved)
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Moritz Muehlenhoff univentionstaff 2015-02-25 08:48:01 CET
We should create a guide which describes security hardening possibilities for a UCS system

E.g. configuring stricter default options for the TLS settings in Apache: If TLS 1.2 is enforced, Internet Explorer 7 and 8 are unable to complete the handshake, but it's a security enhancement in environments where only modern browsers are used.
Comment 1 Daniel Tröder univentionstaff 2015-08-28 18:08:58 CEST
I should include checking the SSH host keys. 4.0 installs no ECDSA keys by default. After (re)creating ssh keys "ucr commit /etc/ssh/sshd_config" must be run, to activate the usage of keys that didn't exist before.
Comment 2 Stefan Gohmann univentionstaff 2015-10-07 06:33:54 CEST
Bug #39485: A section about the Samba 4 DC possibilities on a DC Slave.
Comment 3 Florian Best univentionstaff 2016-03-10 07:08:18 CET
Disallow the apache UserDir module (~/public_html → http://server/~username/).
Comment 4 Stefan Gohmann univentionstaff 2017-01-24 07:43:38 CET
From Ticket #2017011721000128:

------------------------------------------------------------------------
ich habe eben die ucr-Variable „dns/allow/transfer” im template gefunden -
einen manuellen Mechanismus gibt es also schon. Das finde ich super.

Ich würde mir trotzdem wünschen, dass von Hause aus die ACL-Datei
angelegt/benutzt wird.
Sie erweitert sich dann automatisch beim Hinzufügen von neuen Slaves,
sodaß man für ein sicheres Setup nicht selbst Nacharbeiten muss.
------------------------------------------------------------------------
Comment 5 Stefan Gohmann univentionstaff 2017-01-27 08:53:41 CET
See also Bug #43425:
 Disable simple_bind over unencrypted ldap://$HOST:[7]389
Comment 6 Florian Best univentionstaff 2017-09-14 14:20:12 CEST
ucr set saml/idp/show-errors=false (See Bug #45393).
Comment 7 Florian Best univentionstaff 2017-09-18 11:04:24 CEST
Disable apache directory listings.
Comment 8 Florian Best univentionstaff 2017-09-19 14:54:55 CEST
There are multiple places where MITM is possible if connector/ad/ldap/ssl is set to false.
Comment 9 Arvid Requate univentionstaff 2017-11-14 11:20:03 CET
UCS Security Hardening - A Collection:

https://help.univention.com/t/ucs-and-security-hardening/6059
Comment 10 Nico Gulden univentionstaff 2018-02-07 15:55:17 CET
Requested at Ticket#2017101921000287
Comment 11 Stefan Gohmann univentionstaff 2018-04-26 06:59:41 CEST
Ticket #2017101921000287 is a customer.
Comment 12 Florian Best univentionstaff 2019-05-20 16:45:33 CEST
The UCR variables listener/shares/whitelist/.* should be stripped down to it's minimal necessarities.
Comment 13 Florian Best univentionstaff 2021-12-17 13:53:32 CET
The default for PermitRootLogin for ssh is yes:
base/univention-base-files/debian/univention-base-files.postinst:       sshd/permitroot?yes

We should document that it should be set to "prohibit-password" or "no".
Comment 14 Florian Best univentionstaff 2021-12-17 13:55:47 CET
it should be documented how to disable LDAP anonymous bind (Bug #52866).
Comment 15 Florian Best univentionstaff 2022-03-04 15:33:58 CET
ucr set \
 apache2/force_https=yes \
 apache2/hsts=yes \
 apache2/server-tokens=Prod \
 apache2/server-signature=Off \
 apache2/ssl/tlsv11=false \
 apache2/ssl/tlsv12=false \
 apache2/ssl/ciphersuite=HIGH \
 apache2/ssl/honorcipherorder=true \
 umc/http/show_tracebacks=false \
 directory/manager/rest/show-tracebacks=false

rm -f /usr/share/apache2/icons/README* (better: remove `Alias /icons/ "/usr/share/apache2/icons/"` from/etc/apache2/mods-available/alias.conf)

Comment 16 Florian Best univentionstaff 2022-03-04 16:02:39 CET
(In reply to Florian Best from comment #15)
>  apache2/ssl/tlsv11=false \
>  apache2/ssl/tlsv12=false \
Ah wrong, the UCR variable is counter intuitive. It only enables the TLS versions or higher. So the only meaning for the variable is `true`.

As of Bug #54306 only `apache2/ssl/tlsv13=true` should be set.
Comment 17 Florian Best univentionstaff 2022-03-30 04:18:30 CEST
ucr set saml/idp/show-errors=false saml/idp/show-error-reporting=false
Comment 18 Florian Best univentionstaff 2022-05-05 10:19:48 CEST
ucr set umc/http/enforce-secure-cookie=true umc/http/cookie/samesite=Stict
Bug #54484
Comment 19 Florian Best univentionstaff 2022-06-01 10:20:28 CEST
ucr set saml/idp/{session,language}-cookie/{secure=true,samesite=Strict}
Comment 20 Florian Best univentionstaff 2022-10-26 13:21:41 CEST
(In reply to Florian Best from comment #15)
> rm -f /usr/share/apache2/icons/README* (better: remove `Alias /icons/
> "/usr/share/apache2/icons/"` from/etc/apache2/mods-available/alias.conf)
> 
Also due to https://demo.univention.de/html/:
rm -rf /var/www/html/
Comment 21 Tim Breidenbach univentionstaff 2023-01-07 13:52:48 CET
Ansible role: https://github.com/univention/ansible-roles/tree/main/roles/hardening