<?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 Ambari createKeytabFileCommand with IPA does not use encryption_types in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Ambari-createKeytabFileCommand-with-IPA-does-not-use/m-p/235755#M197568</link>
    <description>&lt;P&gt;Hello -&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I have ambari version: 2.6.2.2-1 with IPA version: 4.6.4.&lt;/P&gt;&lt;P&gt;Issue I am facing is when ambari pulls the keytab file for each host after creating the principle (step 2 of the enable kerberos) it does not take into account the encryption types field used. It pulls all the encryptions from the IPA server but the IPA server only supports: aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Looking at the code: &lt;A rel="noopener noreferrer noopener noreferrer" href="https://github.com/apache/ambari/blob/c17ecd1b2d5e41e66533266c9f4d5880ef5bd948/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/IPAKerberosOperationHandler.java" target="_blank"&gt;https://github.com/apache/ambari/blob/c17ecd1b2d5e41e66533266c9f4d5880ef5bd948/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/IPAKerberosOperationHandler.java&lt;/A&gt;&lt;/P&gt;&lt;PRE&gt;String[] createKeytabFileCommand = (StringUtils.isEmpty(encryptionTypeSpec))
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ? new String[]{executableIpaGetKeytab, "-s", getAdminServerHost(true), "-p", principal, "-k", keytabFileDestinationPath}
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; : new String[]{executableIpaGetKeytab, "-s", getAdminServerHost(true), "-e", encryptionTypeSpec, "-p", principal, "-k", keytabFileDestinationPath};&lt;/PRE&gt;&lt;P&gt;It should add -e value with what was put in the box but it does not. Executing the below command works and generates the desired encryptions:&lt;/P&gt;&lt;PRE&gt;ipa-getkeytab -p devops-val01@DEVOPS.MTL -k /etc/security/keytabs/kerberos.service_check.new.keytab -e aes256-cts-hmac-sha1-96,aes128-cts-hmac-sha1-96&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Tried turning debug on ambari-agent did not show anything new. &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Any idea how i can debug this further?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Oleg&lt;/P&gt;</description>
    <pubDate>Fri, 16 Sep 2022 14:13:52 GMT</pubDate>
    <dc:creator>oleg_tarassov</dc:creator>
    <dc:date>2022-09-16T14:13:52Z</dc:date>
    <item>
      <title>Ambari createKeytabFileCommand with IPA does not use encryption_types</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Ambari-createKeytabFileCommand-with-IPA-does-not-use/m-p/235755#M197568</link>
      <description>&lt;P&gt;Hello -&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I have ambari version: 2.6.2.2-1 with IPA version: 4.6.4.&lt;/P&gt;&lt;P&gt;Issue I am facing is when ambari pulls the keytab file for each host after creating the principle (step 2 of the enable kerberos) it does not take into account the encryption types field used. It pulls all the encryptions from the IPA server but the IPA server only supports: aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Looking at the code: &lt;A rel="noopener noreferrer noopener noreferrer" href="https://github.com/apache/ambari/blob/c17ecd1b2d5e41e66533266c9f4d5880ef5bd948/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/IPAKerberosOperationHandler.java" target="_blank"&gt;https://github.com/apache/ambari/blob/c17ecd1b2d5e41e66533266c9f4d5880ef5bd948/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/IPAKerberosOperationHandler.java&lt;/A&gt;&lt;/P&gt;&lt;PRE&gt;String[] createKeytabFileCommand = (StringUtils.isEmpty(encryptionTypeSpec))
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ? new String[]{executableIpaGetKeytab, "-s", getAdminServerHost(true), "-p", principal, "-k", keytabFileDestinationPath}
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; : new String[]{executableIpaGetKeytab, "-s", getAdminServerHost(true), "-e", encryptionTypeSpec, "-p", principal, "-k", keytabFileDestinationPath};&lt;/PRE&gt;&lt;P&gt;It should add -e value with what was put in the box but it does not. Executing the below command works and generates the desired encryptions:&lt;/P&gt;&lt;PRE&gt;ipa-getkeytab -p devops-val01@DEVOPS.MTL -k /etc/security/keytabs/kerberos.service_check.new.keytab -e aes256-cts-hmac-sha1-96,aes128-cts-hmac-sha1-96&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Tried turning debug on ambari-agent did not show anything new. &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Any idea how i can debug this further?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Oleg&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 14:13:52 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Ambari-createKeytabFileCommand-with-IPA-does-not-use/m-p/235755#M197568</guid>
      <dc:creator>oleg_tarassov</dc:creator>
      <dc:date>2022-09-16T14:13:52Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari createKeytabFileCommand with IPA does not use encryption_types</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Ambari-createKeytabFileCommand-with-IPA-does-not-use/m-p/235756#M197569</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/112332/olegtarassov.html" nodeid="112332"&gt;@Oleg Tarassov&lt;/A&gt;,  You are not looking at the correct source code version for Ambari 2.6.2.2.  I believe that you want to look at &lt;A rel="noopener noreferrer noopener noreferrer" href="https://github.com/apache/ambari/blob/release-2.6.2/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/IPAKerberosOperationHandler.java#L949" target="_blank"&gt;https://github.com/apache/ambari/blob/release-2.6.2/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/IPAKerberosOperationHandler.java#L949&lt;/A&gt;.    &lt;/P&gt;&lt;P&gt;According to this, the encryption types are not considered when exporting keytab files from IPA.  This has been fixed in Ambari 2.7.0 and above. See &lt;A rel="noopener noreferrer noopener noreferrer noopener noreferrer" href="https://issues.apache.org/jira/browse/AMBARI-22293" target="_blank"&gt;https://issues.apache.org/jira/browse/AMBARI-22293&lt;/A&gt;.  &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2019 20:00:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Ambari-createKeytabFileCommand-with-IPA-does-not-use/m-p/235756#M197569</guid>
      <dc:creator>rlevas</dc:creator>
      <dc:date>2019-03-14T20:00:04Z</dc:date>
    </item>
  </channel>
</rss>

