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
Postgres driver (and maybe others) don't support SSL certs as env variables #1495
Comments
Hello @petrusgomes, Thank you for the issue, So, I am working on it. I will come back to you shortly with a better solution. Thanks |
We added support for loading SSL keys from the file system in
Because Thanks |
Thanks, @ovr. Good work refactoring those pieces of code, BTW. |
Happy to hear! If you are using Cube Cloud, |
Describe the bug
When using environment variables to set SSL ca, cert and key, file contents are not read correctly because newlines (/n) are escaped.
I tried like suggested in the example from cube.dev docs:
CUBEJS_DB_SSL_CA="-----BEGIN CERTIFICATE-----\nMIIEBjCCAu6gAwIBAgIJAMc0ZzaSUK51MA0GCSqGSIb3DQEBCwUAMIGPMQswCQYD\nVQQGEwJVUzEQMA4GA1UEBwwHU2VhdHRsZTETMBEGA1UECAwKV2FzaGluZ3RvbjEi\n-----END CERTIFICATE-----"
But the postgres driver fails with:
I was able to succesfully connect adding a "replace" to the following code (in PostgresDriver.js):
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Version:
0.24.2
Additional context
Reproduced locally and on cube cloud, connecting to a Google Cloud SQL postgres 11 database
The text was updated successfully, but these errors were encountered: