diff --git a/README.md b/README.md index 2cca1ff..22b6980 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Web database management tool -**Shipped version:** 0.40.2~ynh1 +**Shipped version:** 0.40.2~ynh2 diff --git a/README_fr.md b/README_fr.md index 799db9e..d75c444 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Outil web de gestion des bases de données -**Version incluse :** 0.40.2~ynh1 +**Version incluse :** 0.40.2~ynh2 diff --git a/conf/systemd.service b/conf/systemd.service index 2b60a39..1f3c98b 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -17,5 +17,35 @@ SuccessExitStatus=143 TimeoutStopSec=120 Restart=always +# Sandboxing options to harden security +# Depending on specificities of your service/app, you may need to tweak these +# .. but this should be a good baseline +# Details for these options: https://www.freedesktop.org/software/systemd/man/systemd.exec.html +NoNewPrivileges=yes +PrivateTmp=yes +PrivateDevices=yes +RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 +RestrictNamespaces=yes +RestrictRealtime=yes +DevicePolicy=closed +ProtectSystem=full +ProtectControlGroups=yes +ProtectKernelModules=yes +ProtectKernelTunables=yes +LockPersonality=yes +SystemCallFilter=~@clock @debug @module @mount @obsolete @reboot @setuid @swap + +# Denying access to capabilities that should not be relevant for webapps +# Doc: https://man7.org/linux/man-pages/man7/capabilities.7.html +CapabilityBoundingSet=~CAP_RAWIO CAP_MKNOD +CapabilityBoundingSet=~CAP_AUDIT_CONTROL CAP_AUDIT_READ CAP_AUDIT_WRITE +CapabilityBoundingSet=~CAP_SYS_BOOT CAP_SYS_TIME CAP_SYS_MODULE CAP_SYS_PACCT +CapabilityBoundingSet=~CAP_LEASE CAP_LINUX_IMMUTABLE CAP_IPC_LOCK +CapabilityBoundingSet=~CAP_BLOCK_SUSPEND CAP_WAKE_ALARM +CapabilityBoundingSet=~CAP_SYS_TTY_CONFIG +CapabilityBoundingSet=~CAP_MAC_ADMIN CAP_MAC_OVERRIDE +CapabilityBoundingSet=~CAP_NET_ADMIN CAP_NET_BROADCAST CAP_NET_RAW +CapabilityBoundingSet=~CAP_SYS_ADMIN CAP_SYS_PTRACE CAP_SYSLOG + [Install] WantedBy=multi-user.target diff --git a/manifest.json b/manifest.json index 86873ee..f044c5d 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Web database management tool", "fr": "Outil web de gestion des bases de données" }, - "version": "0.40.2~ynh1", + "version": "0.40.2~ynh2", "url": "https://www.metabase.com/", "upstream": { "license": "AGPL-3.0-only", @@ -32,8 +32,7 @@ "arguments": { "install": [{ "name": "domain", - "type": "domain", - "example": "metabase.example.com" + "type": "domain" }, { "name": "is_public", diff --git a/scripts/restore b/scripts/restore index f622c9e..05bbb65 100755 --- a/scripts/restore +++ b/scripts/restore @@ -38,8 +38,6 @@ db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd) #================================================= ynh_script_progression --message="Validating restoration parameters..." --weight=3 -ynh_webpath_available --domain="$domain" --path_url="$path_url" \ - || ynh_die --message="Path not available: ${domain}${path_url}" test ! -d "$final_path" \ || ynh_die --message="There is already a directory: $final_path "