Using SSL connections to a data source
Use case
Cube supports SSL-encrypted connections to various data sources. Please check the documentation for a particular data source for specific instructions.Configuration
Generally, you can enable SSL via theCUBEJS_DB_SSL environment variable.
Cube Core
To enable SSL, set theCUBEJS_DB_SSL environment variable to true. Cube can
also be configured to use custom connection settings. For example, to use a
custom certificate authority and certificates, you could do the following:
Cube Cloud
When setting up a new deployment, select the SSL checkbox when entering database credentials:| Environment Variable | Description | Example |
|---|---|---|
CUBEJS_DB_SSL | If true, enables SSL encryption for database connections from Cube | true, false |
CUBEJS_DB_SSL_CA | The contents of a CA bundle in PEM format, or a path to one. For more information, check the options.ca property for TLS Secure Contexts in the Node.js documentation | A valid CA bundle or a path to one |
CUBEJS_DB_SSL_CERT | The contents of an SSL certificate in PEM format, or a path to one. For more information, check the options.cert property for TLS Secure Contexts in the Node.js documentation | A valid SSL certificate or a path to one |
CUBEJS_DB_SSL_KEY | The contents of a private key in PEM format, or a path to one. For more information, check the options.key property for TLS Secure Contexts in the Node.js documentation | A valid SSL private key or a path to one |