apioo / fusio

Open source API management platform

Home Page:https://www.fusio-project.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Connections using insecure transport are prohibited while --require_secure_transport=ON.

spangher opened this issue · comments

Hi, I've to connect to MySQL server, where is enabled require_secure_transport=ON. I need to pass the certificate to PDO, but it seems that it's not possible. So, when I try to install fusio I get this error:
_An error occurred on installation:
In ExceptionConverter.php line 117:
An exception occurred in the driver: SQLSTATE[HY000] [3159] Connections usi
ng insecure transport are prohibited while --require_secure_transport=ON.

In Exception.php line 28:
SQLSTATE[HY000] [3159] Connections using insecure transport are prohibited
while --require_secure_transport=ON.

In Driver.php line 33:
SQLSTATE[HY000] [3159] Connections using insecure transport are prohibited
while --require_secure_transport=ON.

migrations:migrate [--write-sql [WRITE-SQL]] [--dry-run] [--query-time] [--allow-no-migration] [--all-or-nothing [ALL-OR-NOTHING]] [--configuration CONFIGURATION] [--em EM] [--conn CONN] [--] []_

This is an example of options that I use with my scripts:
$options = [
PDO::MYSQL_ATTR_SSL_CA => 'GlobalRootCA.crt.pem',
PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT => false,
PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"
];

Thanks,
Paolo

Hi @spangher since we use internal doctrine DBAL you need to set the fitting APP_CONNECTION at the .env file, you could try to use the mysqli driver and set the fitting SSL options s. https://www.doctrine-project.org/projects/doctrine-dbal/en/3.7/reference/configuration.html#mysqli

Thanks very much, it works! I used the manual installation.
This is an example of configuration:
APP_CONNECTION="mysqli://fusio:fusio_1234@mysql-server.com/fusio?ssl_key=GlobalCA.crt.pem"