Step 1: Prepare hosts
Prepare the hosts for FIPS integration.
-
Cryptographic operations require entropy to ensure randomness. Check the
available entropy by using the following command:
cat /proc/sys/kernel/random/entropy_avail- In order to keep the entropy high, install the following tools and keep
them running:
rng-tools- For information about checking available entropy and using therng-toolstool, see Entropy Requirements in Data at Rest Encryption Requirements.Install, enable and start the
rng-toolstool by using the following commands:sudo dnf install rng-toolssudo systemctl enable rngdsudo systemctl start rngd
haveged, available in the Extra Packages for Enterprise Linus (EPEL) Repository - For instructions about using the haveged entropy daemon, see thehavegeddocumentation.
Install, enable and start the havaged entropy daemon by using the following commands:
sudo dnf install havegedsudo systemctl enable havegedsudo systemctl start haveged
- In order to keep the entropy high, install the following tools and keep
them running:
- Configure the operating system for FIPS.
-
On all hosts, run one of the following commands to verify that FIPS mode is
enabled:
Expected output:cat /proc/sys/crypto/fips_enabled
1 indicates that FIPS is enabled.crypto.fips_enabled = 1
Expected output:sysctl crypto.fips_enabled
1 indicates that FIPS is enabled.crypto.fips_enabled = 1
-
Configure a repository to install Cloudera Manager and other
required packages.
-
On the Cloudera Manager server host, download the
repository file for your operating system and version:
https://[username]:[password]@archive.cloudera.com/p/cm7/7.11.3/redhat8/yum/cloudera-manager.repo -
Open the /etc/yum.repos.d/cloudera-manager.repo
file in a text editor and replace the
changemeplaceholder values with your user name and password.[cloudera-manager] name=Cloudera Manager 7.11.3 baseurl=https://archive.cloudera.com/p/cm7/7.11.3/redhat8/yum/ gpgkey=https://archive.cloudera.com/p/cm7/7.11.3/redhat8/yum/ RPM-GPG-KEY-cloudera username=changeme password=changeme gpgcheck=1 enabled=1 autorefresh=0 type=rpm-md - If your hosts do not have access to https://archive.cloudera.com, you must set up a local repository. See Configuring Local Package and Parcel Repositories.
-
On the Cloudera Manager server host, download the
repository file for your operating system and version:
-
Manually install OpenJDK 8 / Oracle JDK 8 or with a tar file (From Cloudera Runtime 7.1.9 SP1
release onwards) on all hosts.
- Installing OpenJDK for Cloudera Runtime
- Installing Oracle JDK for Cloudera Runtime
- Manually through a tarball
-
Download the cloudera-sasl JAR file:
- Obtain the sasl-sha256aes JAR file from:https://archive.cloudera.com/p/cdh7/7.1.9.1021/maven-repository/com/cloudera/sasl/sasl-sha256aes/0.1.0.7.1.9.1021-6/sasl-sha256aes-0.1.0.7.1.9.1021-6.jar
- Copy the file to the following locations on all hosts in the cluster: /opt/cloudera/fips/ (or wherever the CCJ and BCTLS JAR files are stored), /opt/cloudera/parcels/CDH/jars/, and /opt/cloudera/parcels/CDH/lib/hadoop/.
-
Set the environment variable for HADOOP_SASL_MECHANISM. Follow these steps to
set a service-specific environment variable in Cloudera Manager:
- From the Cloudera Manager dashboard, locate the service for which you want to set the environment variable (for example, HDFS, YARN). Click the Service name.
- In the Service page, navigate to the Configuration tab.
-
Search for Environment Advanced Configuration Snippet to show the
<Service-name>Environment Advanced Configuration Snippet (Safety Valve) field. - Add an Environment Variable with the Key as HADOOP_SASL_MECHANISM and value as DIGEST-SHA.
- Save the changes and restart the affected service.
-
Set the Hadoop Configuration Property for DIGEST-SHA:
- Select the service where you intend to apply the new Hadoop configuration property. This example shows the configuration for HDFS.
- In the HDFS service page, navigate to the Configurations tab.
- Search for Cluster-wide Advanced Configuration Snippet (Safety Valve) for core-site.xml.
- Add a new property with the Name as hadoop.security.sasl.mechanism and Value as DIGEST-SHA (description can be left blank).
- Save the changes and restart HDFS or the affected service.
- Add the com.cloudera.security.sasl.ClouderaSaslProvider security providers to the java.security file . The java.security file is a standard configuration file under Java/JDK home. In Java, the java.security file is located at $JAVA_HOME/jre/lib/security/java.security.
-
Download and install CryptoComply for Java (CC for Java) SafeLogic - Java JCE
Provider on all hosts.
- Obtain the SafeLogic CC Java module JAR file.
- Copy the ccj-3.0.2.1.jar file to the $JAVA_HOME/jre/lib/ext directory.
- Obtain the SafeLogic BCTLS Java module JAR file.
- Copy the bctls-safelogic.jar file to the $JAVA_HOME/jre/lib/ext directory.
-
Change the file permissions on both the
ccj-3.0.2.1.jar and
bctls-safelogic.jar files to
rootand0644.chown root: ${JAVA_home}/jre/lib/ext/ccj-3.0.2.1.jar chmod 0644 ${JAVA_home}/jre/lib/ext/ccj-3.0.2.1.jar chown root: ${JAVA_home}/jre/lib/ext/bctls-safelogic.jar chmod 0644 ${JAVA_home}/jre/lib/ext/bctls-safelogic.jar
-
To configure the
java.policypolicy, add the CCJ configuration to the bottom of the $JAVA_HOME/conf/security/java.policy file within the closed bracket://CCJ Java Permissions permission java.lang.RuntimePermission "getProtectionDomain"; permission java.lang.RuntimePermission "accessDeclaredMembers"; permission java.util.PropertyPermission "java.runtime.name", "read"; permission java.security.SecurityPermission "putProviderProperty.CCJ"; //CCJ Key Export and Translation permission com.safelogic.cryptocomply.crypto.CryptoServicesPermission "exportKeys"; //CCJ SSL permission com.safelogic.cryptocomply.crypto.CryptoServicesPermission "tlsAlgorithmsEnabled"; //CCJ Setting of Default SecureRandom permission com.safelogic.cryptocomply.crypto.CryptoServicesPermission "defaultRandomConfig"; //CCJ Setting CryptoServicesRegistrar Properties permission com.safelogic.cryptocomply.crypto.CryptoServicesPermission "globalConfig"; //CCJ Enable JKS permission com.safelogic.cryptocomply.jca.enable_jks "true"; }; -
Add the com.cloudera.security.sasl.ClouderaSaslProvider
security providers to the java.security file. The
java.security file is a standard configuration file
under Java/JDK home. In Java, the java.security file is
located at $JAVA_HOME/jre/lib/security/java.security. Edit
the $JAVA_HOME/jre/lib/security/java.security file as
follows:
-
Add the following lines:
# List of providers and their preference orders: security.provider.1=com.safelogic.cryptocomply.jcajce.provider.CryptoComplyFipsProvider security.provider.2=org.bouncycastle.jsse.provider.BouncyCastleJsseProvider fips:CCJ security.provider.3=sun.security.provider.Sun security.provider.4=sun.security.rsa.SunRsaSign security.provider.5=sun.security.ec.SunEC security.provider.6=com.sun.net.ssl.internal.ssl.Provider security.provider.6=com.sun.crypto.provider.SunJCE security.provider.7=sun.security.jgss.SunProvider security.provider.8=com.sun.security.sasl.Provider security.provider.9=org.jcp.xml.dsig.internal.dom.XMLDSigRI security.provider.11=sun.security.smartcardio.SunPCSC security.provider.12=com.cloudera.security.sasl.ClouderaSaslProvider -
Comment out the
ssl.KeyManagerFactory.algorithm=SunX509line and add a new line with the textssl.KeyManagerFactory.algorithm=X.509.# Determines the default key and trust manager factory algorithms for # the javax.net.ssl package. #ssl.KeyManagerFactory.algorithm=SunX509 ssl.KeyManagerFactory.algorithm=X.509 ssl.TrustManagerFactory.algorithm=PKIX
-
Add the following lines:
