- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Do we need to add Knox self-signed cert into Ranger keystore?
- Labels:
-
Apache Knox
-
Apache Ranger
Created ‎11-05-2015 08:30 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It seem that invoking the test from the KNox repository in Ranger failes due to miss path to the cert.
Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Created ‎11-05-2015 09:33 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In HDP 2.3 you can do the following for it
cd $GATEWAY_HOME/data/security/keystores keytool -exportcert -alias gateway-identity -keystore gateway.jks -file knox.crt
- no password
Copy knox.crt file onto machine running Ranger admin to a working directory, /usr/hdp/current/ranger-admin/
cd /usr/hdp/current/ranger-admin cp /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.91-2.6.2.1.el7_1.x86_64/jre/lib/security/cacerts cacertswithknox keytool -import -trustcacerts -file knox.crt -alias knox -keystore cacertswithknox
- password: changeit
cd /usr/hdp/current/ranger-admin/ews
Add following to /usr/hdp/current/ranger-admin/ews/ranger-admin-services.sh
-Djavax.net.ssl.trustStore=/usr/hdp/current/ranger-admin/cacertswithknox
in
start() { java -Dproc_rangeradmin ${JAVA_OPTS} -Dlogdir=${XAPOLICYMGR_EWS_DIR}/logs/ -Dcatalina.base=${XAPOLICYMGR_EWS_DIR} -cp "${XAPOLICYMGR_EWS_DIR}/webapp/WEB-INF/classes/conf:${XAPOLICYMGR_EWS_DIR}/lib/*:${RANGER_JAAS_LIB_DIR}/*:${RANGER_JAAS_CONF_DIR}:${JAVA_HOME}/lib/*:$CLASSPATH" org.apache.ranger.server.tomcat.EmbeddedServer > logs/catalina.out 2>&1 & echo "Apache Ranger Admin has started." }
restart ranger-admin
Created ‎11-05-2015 08:44 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes that is right , you need to add self-signed cert into Ranger keystore for Test connection and lookup functionality to work
Created ‎11-05-2015 09:33 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In HDP 2.3 you can do the following for it
cd $GATEWAY_HOME/data/security/keystores keytool -exportcert -alias gateway-identity -keystore gateway.jks -file knox.crt
- no password
Copy knox.crt file onto machine running Ranger admin to a working directory, /usr/hdp/current/ranger-admin/
cd /usr/hdp/current/ranger-admin cp /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.91-2.6.2.1.el7_1.x86_64/jre/lib/security/cacerts cacertswithknox keytool -import -trustcacerts -file knox.crt -alias knox -keystore cacertswithknox
- password: changeit
cd /usr/hdp/current/ranger-admin/ews
Add following to /usr/hdp/current/ranger-admin/ews/ranger-admin-services.sh
-Djavax.net.ssl.trustStore=/usr/hdp/current/ranger-admin/cacertswithknox
in
start() { java -Dproc_rangeradmin ${JAVA_OPTS} -Dlogdir=${XAPOLICYMGR_EWS_DIR}/logs/ -Dcatalina.base=${XAPOLICYMGR_EWS_DIR} -cp "${XAPOLICYMGR_EWS_DIR}/webapp/WEB-INF/classes/conf:${XAPOLICYMGR_EWS_DIR}/lib/*:${RANGER_JAAS_LIB_DIR}/*:${RANGER_JAAS_CONF_DIR}:${JAVA_HOME}/lib/*:$CLASSPATH" org.apache.ranger.server.tomcat.EmbeddedServer > logs/catalina.out 2>&1 & echo "Apache Ranger Admin has started." }
restart ranger-admin
Created ‎11-05-2015 09:46 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks @rmani@hortonworks.com
Created ‎05-13-2016 07:16 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks @Ramesh Mani
Created ‎08-30-2016 03:42 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
if above steps don't work then please add/update the value of property 'ranger.truststore.file' and 'ranger.truststore.password' in the ranger-admin module according to your environment :
According to steps mentioned above sample value would be :
ranger.truststore.file=/usr/hdp/current/ranger-admin/cacertswithknox ranger.truststore.password=changeit
