I am connecting to a GCP Cloud SQL instance using a client certificate issued by the GCP Cloud SQL service. When I created the client key-pair GCP Cloud SQL gave me three files: a server certificate, a client private key, and a client certificate. I was able to successfully connect using MySQL Workbench where I set the "SSL" setting to "Require and Verify CA".
When I look at the server certificate it says the issuer and subject are, respectively,
dnQualifier = b35cbfcb-fc96-47d4-6536-1f0e3313eeaf, CN = Google Cloud SQL Server CA, O = "Google, Inc", C = US
dnQualifier = b35cbfcb-fc96-47d4-6536-1f0e3313eeaf, CN = Google Cloud SQL Server CA, O = "Google, Inc", C = US
When I look at the client certificate it says the issuer and subject are, respectively,
dnQualifier = 6772fe8a-0e7c-4803-7fc5-67dbeaaba89c, CN = Google Cloud SQL Client CA certdb, O = "Google, Inc", C = US
CN = certdb, O = "Google, Inc", C = US
I thought the client certificate had to be signed by the server certificate but clearly that is not the case. Can someone explain how the TLS connection works when the client certificate is not signed by the server certificate?