mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-02-27 15:25:40 +08:00
Merge pull request #1150 from nextcloud/enh/1149/collabora-seccomp
allow to disable seccomp for collabora
This commit is contained in:
commit
dff437fe26
7 changed files with 24 additions and 1 deletions
|
@ -27,6 +27,7 @@ services:
|
|||
# - NEXTCLOUD_UPLOAD_LIMIT=10G # Can be adjusted if you need more. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-upload-limit-for-nextcloud
|
||||
# - NEXTCLOUD_MAX_TIME=3600 # Can be adjusted if you need more. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-max-execution-time-for-nextcloud
|
||||
# - TRUSTED_CACERTS_DIR=/path/to/my/cacerts # CA certificates in this directory will be trusted by the OS of the nexcloud container (Useful e.g. for LDAPS) See See https://github.com/nextcloud/all-in-one#how-to-trust-user-defiend-certification-authorities-(ca)
|
||||
# - COLLABORA_SECCOMP_DISABLED=false # Setting this to true allows to disable Collabora's Seccomp feature. See https://github.com/nextcloud/all-in-one#how-to-disable-collaboras-seccomp-feature
|
||||
|
||||
# # Optional: Caddy reverse proxy. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
|
||||
# # You can find further examples here: https://github.com/nextcloud/all-in-one/discussions/588
|
||||
|
|
|
@ -74,6 +74,7 @@ sed -i 's|AIO_URL=|AIO_URL=localhost # Has no function but needs to be
|
|||
sed -i 's|NC_DOMAIN=|NC_DOMAIN=yourdomain.com # TODO! Needs to be changed to the domain that you want to use for Nextcloud.|' sample.conf
|
||||
sed -i 's|NEXTCLOUD_PASSWORD=|NEXTCLOUD_PASSWORD= # TODO! This is the password of the initially created Nextcloud admin with username "admin".|' sample.conf
|
||||
sed -i 's|TIMEZONE=|TIMEZONE=Europe/Berlin # TODO! This is the timezone that your containers will use.|' sample.conf
|
||||
sed -i 's|COLLABORA_SECCOMP_POLICY=|COLLABORA_SECCOMP_POLICY=--o:security.seccomp=true # Changing the value to false allows to disable the seccomp feature of the Collabora container.|' sample.conf
|
||||
sed -i 's|=$|= # TODO! This needs to be a unique and good password!|' sample.conf
|
||||
|
||||
cat sample.conf
|
||||
|
|
|
@ -193,7 +193,7 @@
|
|||
],
|
||||
"environmentVariables": [
|
||||
"aliasgroup1=https://%NC_DOMAIN%:443",
|
||||
"extra_params=--o:ssl.enable=false --o:ssl.termination=true --o:logging.level=warning --o:home_mode.enable=true",
|
||||
"extra_params=--o:ssl.enable=false --o:ssl.termination=true --o:logging.level=warning --o:home_mode.enable=true %COLLABORA_SECCOMP_POLICY%",
|
||||
"dictionaries=%COLLABORA_DICTIONARIES%",
|
||||
"TZ=%TIMEZONE%"
|
||||
],
|
||||
|
|
|
@ -550,6 +550,21 @@ class ConfigurationManager
|
|||
return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue);
|
||||
}
|
||||
|
||||
public function GetCollaboraSeccompPolicy() : string {
|
||||
$defaultString = '--o:security.seccomp=';
|
||||
if ($this->GetCollaboraSeccompDisabledState() !== 'true') {
|
||||
return $defaultString . 'true';
|
||||
}
|
||||
return $defaultString . 'false';
|
||||
}
|
||||
|
||||
private function GetCollaboraSeccompDisabledState() : string {
|
||||
$envVariableName = 'COLLABORA_SECCOMP_DISABLED';
|
||||
$configName = 'collabora_seccomp_disabled';
|
||||
$defaultValue = 'false';
|
||||
return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws InvalidSettingConfigurationException
|
||||
*/
|
||||
|
|
|
@ -326,6 +326,8 @@ class DockerActionManager
|
|||
$replacements[1] = $this->configurationManager->GetBorgBackupHostLocation();
|
||||
} elseif ($out[1] === 'APACHE_MAX_SIZE') {
|
||||
$replacements[1] = $this->configurationManager->GetApacheMaxSize();
|
||||
} elseif ($out[1] === 'COLLABORA_SECCOMP_POLICY') {
|
||||
$replacements[1] = $this->configurationManager->GetCollaboraSeccompPolicy();
|
||||
} else {
|
||||
$replacements[1] = $this->configurationManager->GetSecret($out[1]);
|
||||
}
|
||||
|
|
|
@ -501,3 +501,6 @@ You can make the Nextcloud container trust any Certification Authority by provid
|
|||
When using `docker run`, the environmental variable can be set with `-e TRUSTED_CACERTS_DIR=/path/to/my/cacerts`.
|
||||
|
||||
In order for the value to be valid, the path should start with `/` and not end with '/' and point to an existing **directory**. Pointing the variable directly to a certificate **file** will not work and may also break things.
|
||||
|
||||
### How to disable Collabora's Seccomp feature?
|
||||
The Collabora container enables Seccomp by default, which is a security feature of the Linux kernel. On systems without this kernel feature enabled, you need to provide `-e COLLABORA_SECCOMP_DISABLED=true` to the initial docker run command in order to make it work.
|
||||
|
|
|
@ -13,5 +13,6 @@
|
|||
- [ ] When starting the mastercontainer with `-e DISABLE_BACKUP_SECTION=true` it should hide the backup section that gets shown after AIO is set up (everything of [020-backup-and-restore](./020-backup-and-restore.md)) and simply show that the backup section is disabled.
|
||||
- [ ] When starting the mastercontainer with `-e TRUSTED_CACERTS_DIR=/path/to/my/cacerts`, the resulting nextcloud container should trust all the Certification Authorities, whose certificates are included in the directory `/path/to/my/cacerts` on the host.
|
||||
See https://github.com/nextcloud/all-in-one#how-to-trust-user-defiend-certification-authorities-(ca)
|
||||
- [ ] When starting the mastercontainer with `-e COLLABORA_SECCOMP_DISABLED=true`, the resulting collabora container should have `--o:security.seccomp=false` applied to it.
|
||||
|
||||
You can now continue with [070-timezone-change.md](./070-timezone-change.md)
|
||||
|
|
Loading…
Reference in a new issue