8.6 Connecting Oracle GoldenGate Veridata to SSL-Enabled MySQL Database
Setting up Agent Authentication via server certificate
Setting up Client Authentication via client certificate
- Copy
client-cert.pemandclient-key.pemtwo files from MySQL database server to veridata agent machine. - Run the
opensslcommand in the veridata agent machine to convert the client key and certificate files to a PKCS #12 archive:$> openssl pkcs12 -export -in client-cert.pem -inkey client-key.pem -name "<Set_Your_name>" -passout pass:<Set_Your_Password> -out client-keystore.p12 - Run the
keytoolcommand in the veridata agent machine to import the PKCS file:$> keytool -importkeystore -srckeystore client-keystore.p12 -srcstoretype pkcs12 -srcstorepass <Set_Your_Password> -destkeystore keystore -deststoretype JKS -deststorepass <Set_Your_Password>.After the step, you can delete the PKCS #12 archive (client-keystore.p12 in the example).Note:
If the keystore file does not already exist, then new one is created; else, the certificate is added to the existing file. - Export java parameters to read the keystore
you just created or modified:
export JAVA_OPTS="$JAVA_OPTS -Djavax.net.ssl.keyStore=<path_to_keystore_file> -Djavax.net.ssl.keyStorePassword=<your_keystore_password>". - Authentication via client certificate does not require
connection parameters in
MySQL JDBC URLas opposed to via server certificate.
2-Way Authentication
Apply the steps outlined in both Setting up Server Authentication via server certificate and Setting up Client Authentication via client certificate topics.
Export Java parameters to enable both authentication schemas for server and client at the same time:
export JAVA_OPTS="$JAVA_OPTS
-Djavax.net.ssl.trustStore=<path_to_truststore_file>
-Djavax.net.ssl.trustStorePassword=<your_truststore_password>
-Djavax.net.ssl.keyStore=<path_to_keystore_file>
-Djavax.net.ssl.keyStorePassword=<your_keystore_password>"
Parent topic: Secure