Configure Ranger Usersync
How to configure Ranger Usersync, when setting up Ambari Ranger SSL using self-signed certificates.
- Stop Ranger Usersync by selecting the Ranger Usersync link, then select Started > Stop next to Ranger Usersync.
- Check to see if
unixauthservice.jks
is in the/etc/ranger/usersync/conf/
directory. If not, run the following commands in the CLI:cd /etc/ranger/usersync/conf/ mkdir cert keytool -genkeypair -keyalg RSA -alias selfsigned -keystore /etc/ranger/usersync/conf/cert/unixauthservice.jks -keypass UnIx529p -storepass UnIx529p -validity 3600 -keysize 2048 -dname 'cn=unixauthservice,ou=authenticator,o=mycompany,c=US' chown -R ranger:ranger /etc/ranger/usersync/conf/cert chmod -R 400 /etc/ranger/usersync/conf/cert
-
Create a truststore for the Ranger Admin's
self-signed keystore. When prompted for a password, press the Enter key.
cd /etc/ranger/usersync/conf/ keytool -export -keystore /etc/ranger/admin/conf/ranger-admin-keystore.jks -alias rangeradmin -file ranger-admin-trust.cerchown -R ranger:ranger /etc/ranger/usersync/conf/cert keytool -import -file ranger-admin-trust.cer -alias rangeradmintrust -keystore mytruststore.jks -storepass changeit chown ranger:ranger mytruststore.jks
-
Navigate back to Ranger and select Configs > Advanced, then click
Advanced ranger-ugsync-site. Set the following properties:
ranger.usersync.truststore.file
-- Enter the path to the truststore file.ranger.usersync.truststore.password
-- Enter the truststore password.
- Start Ranger Usersync by selecting the Ranger Usersync link on the Summary tab, then select Stopped > Start next to Ranger Usersync.