base
base copied to clipboard
No support for SSL/TLS in database connections
I cannot use remote databases with this currently, but I believe this would be easy to add by introducing a few new environment variables, like:
OWNCLOUD_DB_SSL_ENABLEOWNCLOUD_DB_SSL_CA_CERTOWNCLOUD_DB_SSL_VERIFY_SERVER_CERTOWNCLOUD_DB_SSL_CLIENT_CERT
etc.
@wkloucek Do you have an idea how to reflect settings like https://github.com/owncloud/core/blob/master/config/config.sample.php#L1282 using docker env variables?
Looks like the PDO config works completely different for mysl and postgres what makes it even harder...
Looks like config is pretty broken in that point:
- mysql
'dbdriveroptions' => [ PDO::MYSQL_ATTR_SSL_CA => '/file/path/to/ca_cert.pem', PDO::MYSQL_ATTR_INIT_COMMAND => 'SET wait_timeout = 28800' ], - postgresql
‘dbhost’ => ‘127.0.0.1:5432;sslmode=verify-full;sslcert=~/.postgresql/postgresql.crt;sslkey=~/.postgresql/postgresql.key;sslrootcert=~/.postgresql/root.crt’
Totally different things for different databases and that's only two of the four supported (don't know if we should count SQLite)
We could use OWNCLOUD_DB_TYPE to render different config options with gomplate to a database.config.php config file!? Looks pretty ugly though...