matomo-org / matomo

Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
https://matomo.org/
GNU General Public License v3.0
19.68k stars 2.62k forks source link

[Bug] Matomo wizard and SSL connections #22570

Closed florentvaldelievre closed 1 week ago

florentvaldelievre commented 1 week ago

What happened?

I am trying to setup Matomo on our AKS cluster. We are using bitnami Chart . Matomo is configured to target Azure MySQL Flexible server. MySQL server is configured with require_secure_transport parameter to ON.

We pass Matomo CA certificate as described in the Microsoft documentation

However, the wizard is failing with the following error:

Could not connect to the database server: Connections using insecure transport are prohibited while --require_secure_transport=ON.

I have opened an issue with bitnami, but I feel like the issue is in this repository. From what I see here, the wizard is trying to call the database with ssl_enable = false statically set.

$dbInfos = array(
    'host'          => (is_null($host)) ? $host : trim($host),
    'username'      => $this->getSubmitValue('username'),
    'password'      => $password,
    'dbname'        => $dbname,
    'tables_prefix' => (is_null($tables_prefix)) ? $tables_prefix : trim($tables_prefix),
    'adapter'       => $adapter,
    'port'          => Db\Schema::getDefaultPortForSchema($schema),
    'schema'        => $schema,
    'type'          => $this->getSubmitValue('type'),
    'enable_ssl'    => false
);

From what I understand, the wizard is currently not supporting SSL connections. Could you please confirm?

What should happen?

The wizard should work with SSL connections

How can this be reproduced?

SImply setup Mysql server with SSL connection enabled.

Matomo version

5.1.1

PHP version

No response

Server operating system

No response

What browsers are you seeing the problem on?

No response

Computer operating system

No response

Relevant log output

No response

Validations

sgiehl commented 1 week ago

Hey @florentvaldelievre This is indeed not possible. By now you can only switch to SSL once Matomo was installed. See https://github.com/matomo-org/matomo/issues/16404