<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Keystore password in clear in /etc/default/cloudera-scm-server in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Keystore-password-in-clear-in-etc-default-cloudera-scm/m-p/63997#M50212</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/4054"&gt;@bgooley&lt;/a&gt;&lt;BR /&gt;Regarding permissions, I meant the permissions for the &lt;STRONG&gt;/etc/default/cloudera-scm-server&lt;/STRONG&gt; and not the JKS truststore file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Hamed&lt;/P&gt;</description>
    <pubDate>Thu, 25 Jan 2018 09:14:03 GMT</pubDate>
    <dc:creator>hamed2005</dc:creator>
    <dc:date>2018-01-25T09:14:03Z</dc:date>
    <item>
      <title>Keystore password in clear in /etc/default/cloudera-scm-server</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Keystore-password-in-clear-in-etc-default-cloudera-scm/m-p/63971#M50208</link>
      <description>&lt;P&gt;I successfully configured LDAPS authentication for Cloudera Manager by following the documentation (&lt;A href="https://www.cloudera.com/documentation/enterprise/latest/topics/cm_sg_external_auth.html" target="_self"&gt;https://www.cloudera.com/documentation/enterprise/latest/topics/cm_sg_external_auth.html&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The certificate for the LDAP server is stored in a custom JKS file (protected by password) and based on the documentation, the path and password to that JKS file, could be provided in the &lt;STRONG&gt;/etc/default/cloudera-scm-server&amp;nbsp;&lt;/STRONG&gt;config file, as:&lt;/P&gt;&lt;PRE&gt;export CMF_JAVA_OPTS="-Xmx2G -XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError / -XX:HeapDumpPath=/tmp -Djavax.net.ssl.trustStore=/usr/java/default/jre/lib/security/jssecacerts / -Djavax.net.ssl.trustStorePassword=changeit"&lt;/PRE&gt;&lt;P&gt;Everything works fine, however, the password is in clear text and the file is world readable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Is there a standard way to obfuscate/encrypt the password in the config file?&lt;BR /&gt;-Is it ok to set the permissions to 640?&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2018 16:58:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Keystore-password-in-clear-in-etc-default-cloudera-scm/m-p/63971#M50208</guid>
      <dc:creator>hamed2005</dc:creator>
      <dc:date>2018-01-24T16:58:48Z</dc:date>
    </item>
    <item>
      <title>Re: Keystore password in clear in /etc/default/cloudera-scm-server</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Keystore-password-in-clear-in-etc-default-cloudera-scm/m-p/63974#M50209</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/24415"&gt;@hamed2005&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The password should not be necessary since the keystore is only being used as a trust store (needing only read access).&amp;nbsp; Cloudera Manager would only need to read from the file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try removing -Djavax.net.ssl.trustStorePassword=changeit and then restart Cloudera Manager.&amp;nbsp;&amp;nbsp; If that works fine for you, I'll work with the Cloudera documentation team to get our documentation updated to remove the password.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Ben&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2018 17:09:14 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Keystore-password-in-clear-in-etc-default-cloudera-scm/m-p/63974#M50209</guid>
      <dc:creator>bgooley</dc:creator>
      <dc:date>2018-01-24T17:09:14Z</dc:date>
    </item>
    <item>
      <title>Re: Keystore password in clear in /etc/default/cloudera-scm-server</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Keystore-password-in-clear-in-etc-default-cloudera-scm/m-p/63975#M50210</link>
      <description>&lt;P&gt;Also, for permissions, the file needs to be readable by any users accessing it.&lt;/P&gt;&lt;P&gt;It is not a sensitive file since it does not contain private key material.&amp;nbsp; The role of the "trust store" is to allow clients to be able to define server certificates as "trusted" so the intent of the jssecacerts file is to only contain certificates of certificate authorities that are trusted.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2018 17:12:19 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Keystore-password-in-clear-in-etc-default-cloudera-scm/m-p/63975#M50210</guid>
      <dc:creator>bgooley</dc:creator>
      <dc:date>2018-01-24T17:12:19Z</dc:date>
    </item>
    <item>
      <title>Re: Keystore password in clear in /etc/default/cloudera-scm-server</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Keystore-password-in-clear-in-etc-default-cloudera-scm/m-p/63993#M50211</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/4054"&gt;@bgooley&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The password&amp;nbsp;is necessary to avoid&amp;nbsp;&lt;SPAN&gt;malicious users to modify the truststore's contents (e.g. adding new certificates) and also is needed to check the integrity of the store's contents.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Removing the -Djavax.net.ssl.trustStorePassword=changeit causes the following exception:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Caused by: java.io.IOException: Keystore was tampered with, or password was incorrect
        at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:780)
        at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:56)
        at sun.security.provider.KeyStoreDelegator.engineLoad(KeyStoreDelegator.java:224)
        at sun.security.provider.JavaKeyStore$DualFormatJKS.engineLoad(JavaKeyStore.java:70)
        at java.security.KeyStore.load(KeyStore.java:1445)
        at com.mysql.jdbc.ExportControlled.getSSLSocketFactoryDefaultOrConfigured(ExportControlled.java:428)
        ... 23 more
Caused by: java.security.UnrecoverableKeyException: Password verification failed
        at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:778)
        ... 28 more&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;-Hamed&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jan 2018 09:14:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Keystore-password-in-clear-in-etc-default-cloudera-scm/m-p/63993#M50211</guid>
      <dc:creator>hamed2005</dc:creator>
      <dc:date>2018-01-25T09:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: Keystore password in clear in /etc/default/cloudera-scm-server</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Keystore-password-in-clear-in-etc-default-cloudera-scm/m-p/63997#M50212</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/4054"&gt;@bgooley&lt;/a&gt;&lt;BR /&gt;Regarding permissions, I meant the permissions for the &lt;STRONG&gt;/etc/default/cloudera-scm-server&lt;/STRONG&gt; and not the JKS truststore file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Hamed&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jan 2018 09:14:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Keystore-password-in-clear-in-etc-default-cloudera-scm/m-p/63997#M50212</guid>
      <dc:creator>hamed2005</dc:creator>
      <dc:date>2018-01-25T09:14:03Z</dc:date>
    </item>
    <item>
      <title>Re: Keystore password in clear in /etc/default/cloudera-scm-server</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Keystore-password-in-clear-in-etc-default-cloudera-scm/m-p/64195#M50213</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/24415"&gt;@hamed2005&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The password on the file does not matter for read operations.&amp;nbsp; My point was that Cloudera Manager does not need to know the password of the truststore to access what it needs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tested on CM 5.13.1 with the following in /etc/default/cloudera-scm-server and was able to auth to LDAPS fine:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;export CMF_JAVA_OPTS="-Xmx2G -XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp -Djavax.net.ssl.trustStore=/usr/java/jdk1.8.0_60/jre/lib/security/jssecacerts"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What does your "export" line look like?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2018 21:52:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Keystore-password-in-clear-in-etc-default-cloudera-scm/m-p/64195#M50213</guid>
      <dc:creator>bgooley</dc:creator>
      <dc:date>2018-01-31T21:52:45Z</dc:date>
    </item>
    <item>
      <title>Re: Keystore password in clear in /etc/default/cloudera-scm-server</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Keystore-password-in-clear-in-etc-default-cloudera-scm/m-p/64215#M50214</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/4054"&gt;@bgooley&lt;/a&gt;,&lt;BR /&gt;Thanks for your reply.&lt;BR /&gt;&lt;BR /&gt;This setting causes the error I mentioned:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;export CMF_JAVA_OPTS="-Xmx2G -XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp -Djavax.net.ssl.trustStore=/opt/cloudera/security/pki/truststore.jks"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And this works:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;export CMF_JAVA_OPTS="-Xmx2G -XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp -Djavax.net.ssl.trustStore=/opt/cloudera/security/pki/truststore.jks -Djavax.net.ssl.trustStorePassword=&amp;lt;PASSWORD REMOVED&amp;gt;"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2018 09:20:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Keystore-password-in-clear-in-etc-default-cloudera-scm/m-p/64215#M50214</guid>
      <dc:creator>hamed2005</dc:creator>
      <dc:date>2018-02-01T09:20:23Z</dc:date>
    </item>
    <item>
      <title>Re: Keystore password in clear in /etc/default/cloudera-scm-server</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Keystore-password-in-clear-in-etc-default-cloudera-scm/m-p/64230#M50215</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/24415"&gt;@hamed2005&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I looked more closely at the exception and now think I understand...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;com.mysql.jdbc.ExportControlled.getSSLSocketFactoryDefaultOrConfigured(ExportControlled.java:428)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems that the MySQL JDBC driver may require a password.&amp;nbsp; I was testing in an environment where I wasn't using TLS for my db connection, so it didn't matter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure how to get around this... I'll let you know if I come up with something&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2018 19:30:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Keystore-password-in-clear-in-etc-default-cloudera-scm/m-p/64230#M50215</guid>
      <dc:creator>bgooley</dc:creator>
      <dc:date>2018-02-01T19:30:23Z</dc:date>
    </item>
  </channel>
</rss>

