Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple certificates in keystore for Mysql SSL Client authentication and JMX over SSL setup

My Java application needs to authenticate to Google cloud Mysql instance with SSL client authentication. Its client-key and certificate are provided by Google. I also need to setup JMX agent with SSL on same application whose certificates are provided by a private CA.

How to prevent Mysql from presenting JMX certificate and vice-versa in case I add both private certificates into single keystore provided to JVM at startup

Is there any other way to authenticate SSL certificates with Mysql beside putting then in 'javax.net.ssl.keyStore'? If not, are there any aliases that Mysql or JMX agent prefer over other names?

like image 312
Sunil Kumar Avatar asked Oct 20 '15 05:10

Sunil Kumar


People also ask

Can keystore have multiple certificates?

You can have a keystore with as many certificates and keys as you like. If there are multiple certificates in a keystore a client uses as its truststore, all certificates are being looked at until one is found that fits. You can look at the preinstalled certificates, they are in /lib/security/cacerts.

Can Truststore have multiple certificates?

As long as a chain is in the trust store, any certificate issued by the chain will be allowed by the virtual host at run-time during 2-way SSL authentication.

What is an SSL client certificate What are the advantages of authentication using SSL client certificates over other methods?

SSL certificate authentication can be defined as a security protocol specifically designed to encrypt the data transferred between the website server and the user's browser so that a cyber criminal cannot access, read, or change the data in transit.


1 Answers

You can look at using the Cloud SQL MySQL socket factory which uses temporary SSL certificates to authenticate to Cloud SQL (only supported for Second Generation instances):

https://github.com/GoogleCloudPlatform/cloud-sql-mysql-socket-factory

like image 191
Vadim Avatar answered Oct 20 '22 02:10

Vadim