Import Custom SSL Certificates
This guide will assist you with importing a custom SSL certificate for enterprise and production Datameer X environments.
Prerequisites
Before you attempt to create a custom certificate, check the following to ensure your environment is ready:
Install Datameer X and Enable SSL.
Install the Java Cryptography Extension (JCE) for your version of Java.
Work within theÂ
current
Datameer X installation directory.Familiarize yourself with obfuscating passwords. The following is an example where the password "changeit" is obfuscated:
Obfuscate password
[datameer@<host> current]$ java -cp ./lib/jetty-util-<version>.jar org.eclipse.jetty.util.security.Password <timestamp>:INFO::main: Logging initialized @75ms Usage - java org.eclipse.jetty.security.Password [<user>] <password> If the password is ?, the user will be prompted for the password # According # Usage - java org.eclipse.jetty.security.Password [<user>] <password> # the user value is optional [datameer@<host> current]$ java -cp lib/jetty-util-<version>.jar org.eclipse.jetty.util.security.Password changeit <timestamp>:INFO::main: Logging initialized @75ms changeit OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0 MD5:b91cd1a54781790beaa2baf741fa6789
Providing a Custom Certificate for Embedded Jetty
Get a certificate
Generate a private key and a certificate signing request (CSR) file before requesting CA authorized certificates:
Create CSR file
openssl req -new -newkey rsa:2048 -nodes -keyout <yourdomain>.key -out <yourdomain>.csr
Download the certificates from the certificate authority (CA).
Check your X.509 certificates:
Check certificate
openssl x509 -in <yourdomain>.crt -text -noout
Generate a PKCS12 file:
Generate PKCS12 file
This file bundles the private key together with the public X.509 certificate and is a public key cryptographic standard. The private key needs to be protected by a password. For the key password, you can use
keypwd
.ÂObfuscate the password.
Obfuscate password
The obfuscated key password, in this exampleÂ
OBF:1u2u1wml1z7s1z7a1wnl1u2g
 , will need to be added to Datameer’sstart.d/ssl.ini
file under the parameterjetty.sslContext.keyManagerPassword
.
Generate a keystoreÂ
Generate a repository of security certificates for Datameer's embedded Jetty. For this process, use keytool.Â
Check the default
keystore
located in your Datameer X installation path withinetc/
:Check keystore
Backup the default
keystore
file:Backup keystore
Ensure you no longer have a file named
keystore
within theetc/
path.Create a new Java KeyStore (JKS) file using theÂ
datameer.p12
 file that was generated previously. Thekeystore
must be protected by a password.ÂCreate keystore
For the keystore password you can useÂ
storepwd
.ÂObfuscate the password:
Obfuscate password
The obfuscated
keystore
password, in this exampleÂOBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4
 , will need to be added to Datameer’sstart.d/ssl.ini
file under the parameterjetty.sslContext.keyStorePassword
.Check the generated
keystore
repository:Check keystore
Use your own keystore
To use the custom certificate stored in the created Java Keystore (JKS) file, configure the start up configuration file.Â
Check the current configuration:
Check current config
Back up the default configuration:
Backup config
Configure
start.d/ssl.ini
by locating and altering the following parameters:Configure start.d/ssl.ini
Create a configuration change log:
Create changelog
Restart the Datameer X service to enable the above changes and monitor the boot process:
Restart and monitor
Renew certificate
Certificates typically have an expiration date as such it is necessary to renew them to prevent Datameer X from loading out of date certificates. To do so, complete the following steps:
Get own certificate
Generate own keystore
Use own keystore
Trusting Custom Certificates from Other Services
The Java Virtual Machine (JVM) enforces security and validates the certification path to the requested target. If the certificate isn't provided from a generally trusted root certificate, you must trust the certificate by adding it to the truststore
of the Java Virtual Machine (JVM) that runs Datameer.Â
Gather the certificate:
Gather certificate
Validate the certificate:
Validate certificate
Trust the certificate by importing it:
Import certificate
Restart the Datameer X service to enable the above changes and monitor the boot process:
Restart and monitor
Further InformationÂ
For more information, refer to the Secure Socket Extension (JSSE) Reference Guide. Â
The JDK ships with a limited number of trusted root certificates in the <java-home>/lib/security/cacerts file. As documented in keytool , it is your responsibility to maintain (that is, add/remove) the certificates contained in this file if you use this file as a truststore.
You can also review available documentation from Hadoop distributors, such as Creating Java Keystores and Truststores, Understanding the SSL Keystore Factory, and Demystify LDAP, SSL, CA Cert integration. If you want to connect to an specific service, see vendor documentation such as Configure External SSL for Tableau.