Enabling SSL Security for HttpFS
You can enable SSL
security for HttpFS using an ssl_keystore and
ssl_truststore. These are generated automatically for a secure
cluster in /opt/mapr/conf/. When using SSL on nonsecure clusters, you
must manually generate a keystore and truststore.
About this task
Procedure
-
Enable SSL in
etc/hadoop/httpfs-site.xmlconfiguration file:<property> <name>httpfs.ssl.enabled</name> <value>true</value> <description> Whether SSL is enabled. Default is false, i.e. disabled. </description> </property> -
Use the credential provider to create secure SSL passwords:
hadoop credential create ssl.server.keystore.password -value 123 \ -provider localjceks://file/home/mapr/httpfs.jcekshadoop credential create ssl.server.keystore.keypassword -value 123 \ -provider localjceks://file/home/mapr/httpfs_keypassword.jceks -
Run the Java
keytoolcommand to create an SSL certificate for the HttpFS server:keytool -genkey -alias jetty -keyalg RSAYou will be prompted to answer a series of questions to create a keystore file named.keystore.- You must enter the same password for “keystore password” as the
value of the property
ssl.server.keystore.passwordset while creating secure SSL passwords. - You must answer “What is your first and last name?” (i.e. “CN”) with the host name of the machine where the HttpFS Server will be running.
The
.keystorefile will be stored in the HttpFS user home directory. - You must enter the same password for “keystore password” as the
value of the property
-
Configure the
etc/hadoop/ssl-server.xmlfile to set the SSLkeystorelocation:<property> <name>ssl.server.keystore.location</name> <value>/home/mapr/.keystore</value> <description>Keystore to be used. Must be specified. </description> </property> -
Configure the
/opt/mapr/hadoop/hadoop-3.3.4/etc/hadoop/httpfs-site.xmlfile with the following property to set credential provider path and enable the credential provider:<property> <name>hadoop.security.credential.provider.path</name> <value>localjceks://file/home/lmccay/aws.jceks</value> <description>Path to interrogate for protected credentials.</description> </property> -
Restart the HttpFS server:
maprcli node services -action restart -name httpfs -nodes <node>