SSL channel security
This article describes the steps to enable channel protection via the SSL protocol when configuring ADS authentication.
Prerequisites for enabling SSL
TLS trust should be configured for all hosts in a cluster. Below are the main principles for configuring TLS for ADS.
-
Save the root ca.crt certificate of the existing (or specially created using OpenSSL) certification authority (CA) (permissions for the certificate — 644):
-
To the system truststore, for example, as shown in the commands given below:
Commands for different distributionsRPM-based distributions (ALT Linux, RedOS):
$ sudo cp ca.crt /etc/pki/ca-trust/source/anchors/ads-ca.crt (1) $ sudo update-ca-trust (2)1 Copies ca.crt to the system certificate store (/etc/pki/ca-trust/source/anchors). 2 Runs an update and merges all certificate authority (CA) certificates and trust settings into single output files. DEB-based distributions (Ubuntu, Astra Linux):
$ sudo cp ca.crt /usr/local/share/ca-certificates/ads-ca.crt (1) $ sudo update-ca-certificates (2)1 Copies ca.crt to the system certificate store /usr/local/share/ca-certificates. 2 Runs an update and merges all certificate authorities (CA) certificates and trust settings into unified output files, placing the root CA certificate into CApath. -
To standard OpenSSL CApath ($OPENSSLDIR/certs):
$ sudo cp ca.crt "$(openssl version -d | cut -d'"' -f2)/certs/ads-ca.crt"Standard CApath OpenSSL on different distributions:
-
ALT Linux: /var/lib/ssl;
-
RedOS: /etc/pki/tls;
-
Ubuntu, Astra Linux: /etc/ssl.
-
-
-
For each cluster host, use OpenSSL to create PEM files for services that require TLS (Monitoring, HAProxy):
-
server.crt — the cluster server TLS certificate in PEM format, signed by the root ca.crt certificate.
The certificate’s Subject Alternative Name (SAN) field should include the fully qualified domain name (FQDN), the short hostname, the host’s IP address, and the address
127.0.0.1.Permissions for the certificate — 644.
-
server.key — the cluster server’s TLS private key in PEM format, without password protection.
Рermissions for the key should be 600, and it must be created as
root. -
merged.pem — a PEM file combining server.crt and server.key (needed by HAProxy for client-side use).
Example command to create merged.pem:
$ cat server.crt server.key | sudo tee /etc/ssl/merged.pem
-
-
Using the keytool utility for Java services (Kafka, NiFi, etc.):
-
create a keystore.jks file — a store containing the server.crt host certificate and the server.key key, which are presented during a TLS handshake;
-
create a truststore.jks file — a store that contains only the CA certificate and is used for checking neighboring hosts;
-
import the CA certificate into the JVM’s system truststore.
-
Additional configurations must be done for the NiFi service according to the NiFi service authentication article, using the following parameters:
-
A list of DNs of all cluster hosts (for example,
CN=ads-host-1.example.com, OU=AD, O=AD, L=MSK, ST=MO, C=RU), created when generating SSL certificates. -
A username that has an entry in the Active Directory, who will act as the NiFi administrator, along with their password.
Start SSL on an ADS cluster using ADCM
To enable SSL, do the following:
-
Apply the Manage SSL cluster action by clicking
in the Actions column of the ADS cluster.
-
In the window that opens, activate the Enable SSL switch, expand the configuration tree, and enter the required parameter values.
Enable SSL on the ADS clusterParameters for enabling SSLParameter Description Default value Keystore path
Path to the keystore.jks storage on hosts
/etc/ssl/keystore.jks
Keystore password
Password for the keystore.jks store
bigdata
Truststore path
Path to the truststore.jks storage on hosts
/etc/ssl/truststore.jks
Truststore password
Password for the truststore.jks store
bigdata
TLS server certificate
Path to the cluster server’s TLS certificate in PEM format, used by services that require TLS
/etc/ssl/server.crt
TLS private key
Path to the cluster server’s TLS private key in PEM format, without password protection, used by services that require TLS
/etc/ssl/server.key
TLS PEM bundle
Path to a single PEM file with the server certificate followed by its private key, for services that need both in one file (like HAProxy)
/etc/ssl/merged.pem
Force rewrite services SSL configuration
If set to
true, the configuration for all services will be overwritten. Use if you entered the wrong password or truststore path when you first enabled SSLfalse
(DANGEROUS!) Clean nifi user and authorizers
If set to
true, previously created users and previous authorization settings will be deletedfalse
-
Click Run.
-
Verify the action in the opened window.
Verify the action -
Wait until SSL is enabled. Analyze and correct errors if they occur.
SSl startup process
Work with services after enabling SSL
Refer to the following articles when authenticating with SSL enabled:
Also, after enabling SSL, on the service configuration pages, values are set automatically:
-
HAProxy — the SSL frontend path parameter value. This value is also set in the *.cfg files that are generated when installing/updating HAProxy (more details in the Use HAProxy to enable HA for ADS services article).
-
Monitoring — the values of the SSL configuration group parameters for service components.
Disable SSL on an ADS cluster using ADCM
To disable SSL, do the following:
-
Apply the Manage SSL cluster action by clicking
in the Actions column of the ADS cluster.
-
In the window that opens, deactivate the Enable SSL switch.
Disable SSL on an ADS cluster -
Click Run.
-
Verify the action in the opened window.
Verify the action -
Wait for the disable SSL to complete. Analyze and correct errors if they occur.