Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Account for new RDS TLS certificates #122

Closed
doublecompile opened this issue Feb 23, 2024 · 1 comment · Fixed by #124
Closed

Account for new RDS TLS certificates #122

doublecompile opened this issue Feb 23, 2024 · 1 comment · Fixed by #124

Comments

@doublecompile
Copy link
Member

RDS issued new CA certificates and the underlying mysql2 library we use for the MysqlDatabase construct doesn't seem to support them yet.

Figure out a workaround while that library is working on a fix.

@bdf-app-mgmt
Copy link

I found a workaround (i don't like it but i need a working application), you should download the certificate from https://truststore.pki.rds.amazonaws.com/global/global-bundle.pem and then use it in the configuration:

{
  host: process.env.DB_HOST,
  user: process.env.DB_USER,
  password: process.env.DB_PASSWORD,
  database: process.env.DB_NAME,
  waitForConnections: true,
  connectionLimit: 10,
  connectTimeout: 10000,
  queueLimit: 0,
  debug: false,
  ssl: {
            ca: readFileSync('src/config/global-bundle.pem'),
         }
 }

Before the ca change my configuration was:

{
  host: process.env.DB_HOST,
  user: process.env.DB_USER,
  password: process.env.DB_PASSWORD,
  database: process.env.DB_NAME,
  waitForConnections: true,
  connectionLimit: 10,
  connectTimeout: 10000,
  queueLimit: 0,
  debug: false,
  ssl: 'Amazon RDS'
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants