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

Failing to use SSL when connecting to RDS

Open dynamike opened this issue 8 years ago • 7 comments

We are using mariasql version 0.2.6 to connect to an RDS instance running on AWS.

This is how I'm trying to setup the connection

{
  host: 'rds-hostname',
  user: 'rds-user', 
  db: 'db-name',
  password: 'rds-password',
  ssl: {
    ca: '/path/rds-combined-ca-bundle.pem'
  }
}

The SSL CA is hosted publicly here -- https://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem

I don't see any errors when running in this configuration, but when I do a tcpdump on the connection to the database everything is in clear text, so we are not actually connecting over SSL.

dynamike avatar Mar 15 '17 23:03 dynamike

Same for azure, where actually only mysql is available as a SaaS though. Seems to be a general problem with such services though.

Azure does reply, that ssl needs to be activated and it looks like it never tries actually.

wzrdtales avatar Oct 27 '17 11:10 wzrdtales

Has anyone tested if ssl works in general?

wzrdtales avatar Oct 27 '17 12:10 wzrdtales

You're probably better off using mysql2 instead.

mscdex avatar Oct 27 '17 16:10 mscdex

@mscdex Probably, but actually Azures scalable MySQL offer hasn't really worked that well at all, so I dropped it in favour of an own version of MariaDB, which does not scale that good but works, so I'm fine again here.

But my question was has anyone tested ssl on a normal MariaDB? Just wondering if this is a general bug or just a problem with such providers, I never had a need for SSL within my own network though. If no one tested it yet I would setup a test just to be sure here :)

wzrdtales avatar Oct 28 '17 13:10 wzrdtales

@wzrdtales No I mean the mysql2 module on npm. You can use whichever server you want, they both speak the same protocol.

mscdex avatar Oct 28 '17 14:10 mscdex

Ah ok, so you mean you would generally suggest to use mysql2 in any case? Haven't looked at it, have been quite satisfied with your lib over the year. Is there any comparison how mysql2 performance against your module? Especially when we talk about MariaDB?

wzrdtales avatar Oct 28 '17 15:10 wzrdtales

And do you plan to drop this project? Does sound a bit like it.

wzrdtales avatar Oct 28 '17 15:10 wzrdtales