SSL Configuration for External DB for AWS RDS¶
This guide describes how to connect Trust3 AI services to an external AWS RDS for MySQL or Aurora MySQL database that enforces SSL/TLS (in-transit encryption), using username and password authentication.
When in-transit encryption is enforced on the database (require_secure_transport set to ON), the database rejects every unencrypted connection. If Trust3 AI is not configured for SSL, services such as Apache Ranger Admin and the Trust3 AI Portal fail to start, and Ranger data is not visible in the Portal under Access Management.
The following services connect to the external database and pick up this configuration:
| Service | Uses SSL to the database | Deployed |
|---|---|---|
| Trust3 AI Portal | Yes | Always |
| Apache Ranger Admin | Yes | Always |
| Trust3 AI Ops Server | Yes | When enabled |
| Trust3 AI Scheme Server | Yes | When enabled |
| Access Request Manager | Yes | When enabled |
Services that are deployed only when enabled use the same SSL settings as the Portal and Apache Ranger Admin once they are enabled.
PrivaceraServices
The PrivaceraServices service (disabled by default) does not apply these SSL settings to its database connection. It is not supported with a database that has require_secure_transport set to ON.
Scope
This guide covers AWS RDS for MySQL and Aurora MySQL.
- RDS for PostgreSQL: the external PostgreSQL configuration (
config/custom-vars/vars.external.db.postgres.yml) already addssslmode=require(DB_CONNECTION_EXTRA_PARAMETERS) to the database connections of the Portal, Ops Server, Scheme Server and Access Request Manager. The steps on this page are for MySQL only. See Configure External RDBMS. - Google Cloud SQL: see SSL Configuration for External DB for GCP.
- IAM authentication: to connect to RDS with IAM roles instead of a password, see IAM Authentication for AWS RDS.
Prerequisites¶
| Prerequisite | Description |
|---|---|
| AWS RDS Database | An existing RDS for MySQL or Aurora MySQL instance/cluster, already configured as the external database for Privacera Manager. See Configure External RDBMS. |
| AWS Console Access | Permission to view and modify the DB parameter group (or DB cluster parameter group for Aurora). |
| Privacera Manager Host | SSH access to the host where Privacera Manager is installed, with outbound HTTPS access to download the AWS RDS CA bundle. |
| Database User | A valid database user with username/password authentication. |
Setup¶
Step 1: Enable in-transit encryption on the RDS database¶
Skip this step if require_secure_transport is already ON for your database.
- Sign in to the AWS Management Console and open Amazon RDS.
- Open the parameter group attached to your database:
- RDS for MySQL — the DB parameter group of the instance.
- Aurora MySQL — the DB cluster parameter group of the cluster.
-
Set
require_secure_transporttoON(1) and save the change.Note
The default parameter groups cannot be modified. If the database uses a default parameter group, create a custom parameter group, set the value there and attach it to the database. Attaching a new parameter group requires a reboot of the database.
-
Verify the setting from a MySQL client:
SQL
For details, see the AWS documentation:
Step 2: Enable SSL for the external database in Privacera Manager¶
- SSH to the instance where Privacera Manager is installed.
-
Open the external MySQL database configuration file. This file was created when you configured the external database.
-
Uncomment
DB_SSL_ENABLEand set it totrue:This enables SSL on the database connections of the services listed at the top of this page.
Step 3: Add the AWS RDS CA certificates to the global truststore¶
Privacera Manager imports the certificates placed in the custom_certificates folder into the global truststore that Trust3 AI services use. Download the AWS RDS CA bundle into that folder.
This step is required even though Privacera Manager does not enforce server certificate verification on the database connection. Without the AWS RDS CA certificates in the global truststore, the database driver can fail the TLS handshake with PKIX path building failed.
| Bash | |
|---|---|
Tip
- The global bundle contains the root and intermediate CA certificates for all AWS Regions, so it covers the certificate authority your database uses (for example
rds-ca-rsa2048-g1). - Keep the
.pemextension. Privacera Manager imports every certificate in a.pemfile. Do not rename the bundle: a.crtfile is ignored, and only the first certificate of a.cerfile is imported. - If the Privacera Manager host cannot reach the internet, download the bundle on another machine and copy it into the
custom_certificatesfolder. - For AWS GovCloud or other partitions, use the bundle listed for that partition in Certificate bundles for AWS Regions.
Step 4: Apply changes¶
Run the Privacera Manager setup and Helm upgrade to add the certificates to the global truststore and apply the SSL configuration.
Plan a maintenance window
On an existing installation, this step restarts Apache Ranger Admin, the Trust3 AI Portal and the other services that use the database.
Step 1 - Setup which generates the helm charts. This step usually takes few minutes.
Step 2 - Apply the Privacera Manager helm charts. Step 3 - (Optional) Post-installation step which generates Plugin tar ball, updates Route 53 DNS and so on. This step is not required if you are updating only connector properties.Step 5: Verify¶
-
Verify that the Apache Ranger Admin and Trust3 AI Portal pods start successfully:
Bash -
Log in to the Trust3 AI Portal and confirm that Ranger data (services and policies) is visible under Access Management.
-
Confirm that the connections use SSL. With
require_secure_transportset toON, the database refuses every connection that does not use SSL, so services that start and read data in the steps above are connected over SSL. To check SSL from a MySQL client yourself, connect with the CA bundle and check the session cipher. A non-empty value means the session is encrypted:
Troubleshooting¶
| Symptom | Check |
|---|---|
Ranger Admin or Portal fails to start with Connections using insecure transport are prohibited while --require_secure_transport=ON | DB_SSL_ENABLE: "true" is set and uncommented in config/custom-vars/vars.external.db.mysql.yml, and Step 4 was run after the change. |
SSL handshake or PKIX path building failed errors in the service logs | The CA bundle is present in config/ssl/custom_certificates with a .pem extension, and ./privacera-manager.sh setup was re-run after adding it. |
| Ranger data is not visible in the Portal | Both the Ranger and Portal pods are running and their logs show no database connection errors. |
- Previous: Advanced Configuration