node-mysql2 icon indicating copy to clipboard operation
node-mysql2 copied to clipboard

Invalid ssl option but still DB connection working fine

Open swapnil-raj-kgs opened this issue 1 year ago • 2 comments

Hello,

We are using mysql2 version 3.9.7 and MySQL v8.0 also having RDS proxy connected to the DB instance. We are seeing the DB connection is working fine when we pass ssl : {}.

When we enabled Transport Layer Security in the RDS proxy and also turned ON require_secure_transport in the RDS parameter group we passed the ssl option as Amazon RDS at first but received the error unable to get local issuer certificate.

So we created a key in secret manager and placed the certificate in it and used it while connecting to the DB as below. Later the connection was working fine.

ssl : { ca: secret[config.certificate.caKey], rejectUnauthorized: true, verifyIdentity: true, }

But if we pass ssl : {} still the connection is working fine with above settings of TLS and SSL enabled. Can someone look into it?

swapnil-raj-kgs avatar May 13 '24 14:05 swapnil-raj-kgs

Related:

  • https://github.com/sidorares/node-mysql2/issues/2581

wellwelwel avatar May 13 '24 18:05 wellwelwel

Hi, I ran into the same issue as you. I commented in https://github.com/sidorares/node-mysql2/issues/2581#issuecomment-2208714267 why does ssl: {} works, check it out!

MarioRomanDono avatar Jul 04 '24 11:07 MarioRomanDono