• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.

SSL database connection

Status
Not open for further replies.

bee

💖 Chevereto Fan
Hi.
What did I need to change to use a db connection through SSL?

After last night my database crashed again, I want to test the SQL server from Google Cloud. There is an option to enable SSL connections to the SQL server and I want to try this. Connections without SSL works fine - but when my projects already SSL secured, so I should also secure the db connection.


For this I had to add:

Code:
$pdo = new PDO('mysql:host=ip;dbname=db', 'user', 'pass', array(
  PDO::MYSQL_ATTR_SSL_KEY  =>'/etc/mysql/ssl/client-key.pem',
  PDO::MYSQL_ATTR_SSL_CERT =>'/etc/mysql/ssl/client-cert.pem',
  PDO::MYSQL_ATTR_SSL_CA   =>'/etc/mysql/ssl/ca-cert.pem'
  )
);

The settings.php has no options to add certs.

Is Chevereto ready to use SSL database connections?
 
At this time it doesn't supports SSL database connections, to be honest this is the first time I head about it.

You can hack loader.php here:

upload_2016-9-15_12-57-55.png

And instead of getting the instance just do a new DB(<params>) there, here is the constructor:

upload_2016-9-15_12-58-44.png

Problem is that you will always need to do this hack for each update but don't worry. For next version I will allow to pass custom DB params in the settings.php file. Sounds good?
 
  • Like
Reactions: bee
Sounds good - and I can wait for that update. No problem. NonSSL is working - but for the future I want to switch to SSL, if possible ...
 
Status
Not open for further replies.
Back
Top