<?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: Error creating login context using ticket cache: Unable to obtain  Principal Name for authentication . in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Error-creating-login-context-using-ticket-cache-Unable-to/m-p/387489#M246329</link>
    <description>&lt;P&gt;Dear&amp;nbsp;@Former Member, much thanks for the reply.&amp;nbsp; I am using Kerberos outbound only setup and I have followed all steps including registry key change to allow TGTSession sharing (WIN Memory).&amp;nbsp; I have not se any jaas.conf.&amp;nbsp; The examples I find use file based cache.&amp;nbsp; Also, below is a debug output of what the session sees:&lt;/P&gt;&lt;P&gt;get normal credential&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; KrbCreds found the default ticket granting ticket in credential cache.&lt;BR /&gt;Java config name: null&lt;BR /&gt;Native config name: C:\Windows\krb5.ini&lt;BR /&gt;Loaded from native config&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; Obtained TGT from LSA: Credentials:&lt;BR /&gt;client=demo@DC1.PW.ORG&lt;BR /&gt;server=krbtgt/DC1.PW.ORG@DC1.PW.ORG&lt;BR /&gt;authTime=20240425145720Z&lt;BR /&gt;startTime=20240425145720Z&lt;BR /&gt;endTime=20240426005720Z&lt;BR /&gt;renewTill=null&lt;BR /&gt;flags=INITIAL;PRE-AUTHENT&lt;/P&gt;&lt;P&gt;Question, when I go to C:\Windows\krb5.ini (of demo user) there is no such file,&amp;nbsp; how should I interpret this?&lt;/P&gt;&lt;P&gt;#2 all jaas config sample I see are pointing to file-based cache or where IWA is enabled.&amp;nbsp; I have not, what I have done is enabled WIN memory sharing of the TGT ticket, enabled unconstrained delegation, ensure all steps &amp;amp; settings nuances for a WIN are placed.&lt;/P&gt;&lt;P&gt;I do appreciate the help!!!&lt;/P&gt;</description>
    <pubDate>Thu, 02 May 2024 00:15:55 GMT</pubDate>
    <dc:creator>rsheikh</dc:creator>
    <dc:date>2024-05-02T00:15:55Z</dc:date>
    <item>
      <title>Error creating login context using ticket cache: Unable to obtain  Principal Name for authentication .</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Error-creating-login-context-using-ticket-cache-Unable-to/m-p/387410#M246312</link>
      <description>&lt;P&gt;Hello my client is a WIN server 2019, setup outbound Kerberos only, I have enabled WIN registry keys for TGT Session sharing, environment var pointing to CDP JARS, CONFIG paths and default Java_Home to the bundled Zulu private JRE which these days is using Java 11 and comes with unlimited strength JCE (per provider).&amp;nbsp; I could do kinit and receive klist.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SAS is the application.&amp;nbsp; I have setup the CDP JDBC URI provided by CDP team and trustore w credentials.&lt;/P&gt;&lt;P&gt;I have &lt;STRONG&gt;not done&lt;/STRONG&gt; krb5.ini, nor jaas config, nor pointed the env variable&amp;nbsp;java.security.auth.login.config to jaas config.&lt;/P&gt;&lt;P&gt;I get this error:&lt;/P&gt;&lt;P&gt;ERROR: java.sql.SQLException: [Cloudera][HiveJDBCDriver](500168) Error creating login context using ticket cache: Unable to obtain Principal Name for authentication .&lt;/P&gt;&lt;P&gt;ERROR: Error trying to establish connection: [Cloudera][HiveJDBCDriver](500168) Error creating login context using ticket cache:&amp;nbsp;Unable to obtain Principal Name for authentication .&lt;/P&gt;&lt;P&gt;I researched here and some questions are around 2017-18 and community manager responded to another user to start a new question, hence my question here.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance for your time and suggestions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2024 14:24:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Error-creating-login-context-using-ticket-cache-Unable-to/m-p/387410#M246312</guid>
      <dc:creator>rsheikh</dc:creator>
      <dc:date>2024-04-30T14:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: Error creating login context using ticket cache: Unable to obtain  Principal Name for authentication .</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Error-creating-login-context-using-ticket-cache-Unable-to/m-p/387471#M246321</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/22956"&gt;@rsheikh&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Ensure that the Kerberos configuration (krb5.ini) is correctly set up on your Windows Server 2019 machine. The krb5.ini file should contain the necessary realm and KDC (Key Distribution Center) information for your Kerberos setup.&lt;/LI&gt;&lt;LI&gt;Set the java.security.auth.login.config environment variable to point to the JAAS (Java Authentication and Authorization Service) configuration file (jaas.conf). This file defines the login modules used for authentication.&lt;/LI&gt;&lt;LI&gt;Verify that the realm and principal settings in krb5.ini match the configuration of your Kerberos environment.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chethan YM&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2024 11:50:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Error-creating-login-context-using-ticket-cache-Unable-to/m-p/387471#M246321</guid>
      <dc:creator>ChethanYM</dc:creator>
      <dc:date>2024-05-01T11:50:51Z</dc:date>
    </item>
    <item>
      <title>Re: Error creating login context using ticket cache: Unable to obtain  Principal Name for authentication .</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Error-creating-login-context-using-ticket-cache-Unable-to/m-p/387489#M246329</link>
      <description>&lt;P&gt;Dear&amp;nbsp;@Former Member, much thanks for the reply.&amp;nbsp; I am using Kerberos outbound only setup and I have followed all steps including registry key change to allow TGTSession sharing (WIN Memory).&amp;nbsp; I have not se any jaas.conf.&amp;nbsp; The examples I find use file based cache.&amp;nbsp; Also, below is a debug output of what the session sees:&lt;/P&gt;&lt;P&gt;get normal credential&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; KrbCreds found the default ticket granting ticket in credential cache.&lt;BR /&gt;Java config name: null&lt;BR /&gt;Native config name: C:\Windows\krb5.ini&lt;BR /&gt;Loaded from native config&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; Obtained TGT from LSA: Credentials:&lt;BR /&gt;client=demo@DC1.PW.ORG&lt;BR /&gt;server=krbtgt/DC1.PW.ORG@DC1.PW.ORG&lt;BR /&gt;authTime=20240425145720Z&lt;BR /&gt;startTime=20240425145720Z&lt;BR /&gt;endTime=20240426005720Z&lt;BR /&gt;renewTill=null&lt;BR /&gt;flags=INITIAL;PRE-AUTHENT&lt;/P&gt;&lt;P&gt;Question, when I go to C:\Windows\krb5.ini (of demo user) there is no such file,&amp;nbsp; how should I interpret this?&lt;/P&gt;&lt;P&gt;#2 all jaas config sample I see are pointing to file-based cache or where IWA is enabled.&amp;nbsp; I have not, what I have done is enabled WIN memory sharing of the TGT ticket, enabled unconstrained delegation, ensure all steps &amp;amp; settings nuances for a WIN are placed.&lt;/P&gt;&lt;P&gt;I do appreciate the help!!!&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2024 00:15:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Error-creating-login-context-using-ticket-cache-Unable-to/m-p/387489#M246329</guid>
      <dc:creator>rsheikh</dc:creator>
      <dc:date>2024-05-02T00:15:55Z</dc:date>
    </item>
    <item>
      <title>Re: Error creating login context using ticket cache: Unable to obtain  Principal Name for authentication .</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Error-creating-login-context-using-ticket-cache-Unable-to/m-p/387524#M246337</link>
      <description>&lt;P&gt;update: I have made some progress, placed the krb5.ini file.&amp;nbsp; Currently at:&lt;/P&gt;&lt;PRE&gt; ERROR: Caused by: com.cloudera.hiveserver2.support.exceptions.GeneralException: [Cloudera][HiveJDBCDriver](500168) Error creating &lt;BR /&gt;login context using ticket cache: Unable to obtain Principal Name for authentication .&lt;BR /&gt;ERROR: ... 12 more&lt;BR /&gt;ERROR: Caused by: javax.security.auth.login.LoginException: Unable to obtain Principal Name for authentication &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;May I get an example of a jaas.conf file I did find some using keytab etc while my setup is memory based sharing of tgt tickets.&amp;nbsp; I appreciate your time.&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2024 20:09:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Error-creating-login-context-using-ticket-cache-Unable-to/m-p/387524#M246337</guid>
      <dc:creator>rsheikh</dc:creator>
      <dc:date>2024-05-02T20:09:31Z</dc:date>
    </item>
    <item>
      <title>Re: Error creating login context using ticket cache: Unable to obtain  Principal Name for authentication .</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Error-creating-login-context-using-ticket-cache-Unable-to/m-p/387695#M246395</link>
      <description>&lt;P&gt;For doc purpose and if it could be helpful to someone&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;We took krb5.ini that was used at the CDP cluster and saved it to client WIN server&lt;/LI&gt;&lt;LI&gt;We used LogLevel=6 LogPath=&amp;lt;some-path&amp;gt; in our jdbc URI to enable trace level log&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Based on findings from the trace level logs&amp;nbsp;java.security.auth.login.config was pointing to an incorrect login module.&amp;nbsp; Since we turned on memory based cache, removing pointer to the&amp;nbsp;java.security.auth.login.config forced correct tgt ticket to be picked.&amp;nbsp; We did not opt for a custom jaas.conf either.&lt;/P&gt;&lt;P&gt;There were minor tweak of domain &amp;amp; realm value.&lt;/P&gt;&lt;P&gt;This resolved our issue.&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2024 21:43:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Error-creating-login-context-using-ticket-cache-Unable-to/m-p/387695#M246395</guid>
      <dc:creator>rsheikh</dc:creator>
      <dc:date>2024-05-08T21:43:13Z</dc:date>
    </item>
  </channel>
</rss>

