Question

Does my app need to pass the CA certificate to connect to the DigitalOcean managed MySQL databases?

Posted December 13, 2019 971 views
CoreOSDigitalOcean Managed MySQL Database

Couple of years back I started my Docker journey with CoreOS. While it made me go through a lot of painful transitions, because features of traditional OSes were missing (like no package manager, everything done with systemd config additions or containers) I got used to it and it runs very stable. The roling release system let me never have to think about painful reinstall due to major OS upgrades again. But not CoreOS is reaching the end of its journey.

With the sunset of CoreOS on the horizon, once Fedora CoreOS is out, I’m not sure where to go next. Migrate to Fedora CoreOS or go back to a classical OS.

I’m using it on a single host as my private server, for everything from web hosting, email server to vpn. Is that maybe something that a much simpler CentOS approach might also fullfil?

What the community take on this? Is CoreOS and it’s coming offspring viable for private, single node usage?

edited by bobbyiliev

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

Hello,

DigitalOcean does not enforce using SSL but it is recommended to always use that. 

By default, MySQL server always installs and enables SSL configuration. However, it is not enforced that clients connect using SSL. Clients can choose to connect with or without SSL as the server allows both types of connections.

To tell MySQL to use mutual TLS and not just one-way TLS, we must instruct it to require client authentication to ensure clients present a certificate from our CA when they connect.

MySQL requires client certificates on a per-user basis. The requirement can be configured using CREATE USER or ALTER USER statements. When set, MySQL will reject connections from these users if they don’t present a valid certificate signed by CA.


With –ssl-mode=REQUIRED, clients require an encrypted connection and fail if one cannot be established.

 With –ssl-mode=VERIFYCA or –ssl-mode=VERIFYIDENTITY, clients require an encrypted connection, and also perform verification against the server CA certificate and (with VERIFY_IDENTITY) against the server host name in its certificate.


Hope that this helps.
Regards,
Priyanka