5

Google launched support for SSL connections in the JDBC service. Google added three new connection parameters to support this feature: _serverSslCertificate, _clientSslCertificate, and _clientSslKey. The documentation is available here:

https://developers.google.com/apps-script/reference/jdbc/jdbc#getConnection(String,Object)

When a database in Amazon is created, we can add SSL support to it:

http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL.html

As an example if we create a MariaDB database, we just have to download the next certificate: rds-ca-2015-root.pem

And access to database with the next command:

mysql -h mymariadbinstance.abcd1234.rds-us-east-1.amazonaws.com --ssl-ca=[full path]rds-combined-ca-bundle.pem --ssl-verify-server-cert

And apply SSL to an specific user:

GRANT USAGE ON *.* TO 'encrypted_user'@'%' REQUIRE SSL

So, how can we conect with SSL to an Amazon Database using the GAS JDBC API?

Laishidua
  • 51
  • 5

1 Answers1

0

The question isn't entirely clear to me, but it looks like you asking how you can pass the server cert while initiating the jdbc connection. The API has a _serverSslCertificate argument that should do just this.

https://developers.google.com/apps-script/reference/jdbc/jdbc#getConnection(String,Object)

Try it out and let us know if you still have issues.

The-Big-K
  • 2,672
  • 16
  • 35