Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSL connection #15

Open
BrainFeeder opened this issue Jan 26, 2018 · 3 comments
Open

SSL connection #15

BrainFeeder opened this issue Jan 26, 2018 · 3 comments

Comments

@BrainFeeder
Copy link

Hello, I'm using Datamapper for ages and I don't know if this is the active repo at the moment... but, I am looking for a way to connect with the database through SSL (with European GDPR comming up).

Is there a simple way of implementing this? It should be nice if this could be done in the configs.

@richplane
Copy link

Datamapper uses the Codeigniter DB connection, and I think you can configure that to encrypt the connection. I haven't used CI3 but it seems straightforward enough from the docs.

@BrainFeeder
Copy link
Author

We are still using CI2. Server admin says it is safe enough as it is now... I trust him ^^

@inieves
Copy link

inieves commented Aug 27, 2018

At least in MySQL, enabling (and also forcing) database connections to use SSL, is a setting of the database itself... not the application (such as CI) connecting to the database.

Let me add some detail about best practices... at least that I follow. No remote root connections to db, only local (from host) root connections to db. Some people use SSL on local connections, I do not. Non-root connections CAN be made remotely and they MUST be forced to use SSL for security reasons. Password is not enough, in fact without SSL your password is sent in plaintext, very bad.

To get mysql to use ssl I have to give it a path to credentials in my.cnf:

[mysqld]
ssl-ca=/etc/mysql/certs/ca.pem
ssl-cert=/etc/mysql/certs/server-cert.pem
ssl-key=/etc/mysql/certs/server-key.pem

[client]
ssl-ca=/etc/mysql/certs/ca.pem
ssl-cert=/etc/mysql/certs/client-cert.pem
ssl-key=/etc/mysql/certs/client-key.pem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants