<div dir="ltr">Thank you for the detailed answer, Mike.<div><br></div><div>Kiju</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-02-03 Michael B Allen <span dir="ltr"><<a href="mailto:ioplex@gmail.com" target="_blank">ioplex@gmail.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Kiju,<br>
<br>
The jcifs-krb5 package is externally contributed and as such it is not<br>
maintained by the JCIFS project. Also, I was not successful in testing<br>
the last contributed package so I cannot endorse it either.<br>
<br>
Now if you're wondering why we even have that package on the site, the<br>
problem is that to properly integrate kerberos into JCIFS I would<br>
first need to factor out all of the NtlmPasswordAuthentication code<br>
and provide a different technique for retrieving credentials as either<br>
properties (which means factoring out the global static Config class)<br>
or by using Thread storage like JAAS. So we don't have proper Kerberos<br>
support because it would require some significant refactoring that<br>
would change the API in ways that would not be backward compatible. So<br>
as a consolation, we host the contributed jcifs-krb5 package just to<br>
give people something.<br>
<br>
Mike<br>
<div class="HOEnZb"><div class="h5"><br>
On Tue, Jan 28, 2014 at 3:41 AM, Kiju Kim <<a href="mailto:kiju98@gmail.com">kiju98@gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
> I've noticed KerbAuthExample in jcifs-krb5-1.3.17 doesn't work on JDK 7.<br>
> It works fine on JDK 6 but produces "jcifs.smb.SmbAuthException:<br>
> Access is denied." on JDK 7.<br>
><br>
> I've learned that it is due to the change how JDK generates subKey<br>
> (<a href="https://bugs.openjdk.java.net/browse/JDK-8031973" target="_blank">https://bugs.openjdk.java.net/browse/JDK-8031973</a>).<br>
><br>
> I prepared the following patch for Kerb5Context.java and saw<br>
> KerbAuthExample worked fine on JDK 7.<br>
> But I'm newt to jcifs and want my patch reviewed.<br>
><br>
> <                 return ticket.getSessionKey();<br>
> ---<br>
>>                 com.sun.security.jgss.ExtendedGSSContext ec =<br>
>>                         (com.sun.security.jgss.ExtendedGSSContext) gssContext;<br>
><br>
>>                 return (Key) ec.inquireSecContext(<br>
>>                         com.sun.security.jgss.InquireType.KRB5_GET_SESSION_KEY<br>
> );<br>
>>                 //return ticket.getSessionKey();<br>
><br>
> Note that ExtendedGSSContext and InquireType are classes newly added in JDK 7.<br>
> Also note that there is a small difference between the Key object<br>
> returned by ticket.getSessionKey() and<br>
> ec.inquireSecContext(KRB5_GET_SESSION_KEY) that their getAlgorithm()<br>
> outputs are different. The former returns "DES" etc, but the later<br>
> returns "1" etc. Looks like it doesn't affect the behavior of<br>
> KerberosAuthExample but I'm not sure if getAlgorithm() is used<br>
> elsewhere.<br>
><br>
> Thanks and regards,<br>
> Kiju<br>
<br>
<br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
Michael B Allen<br>
Java Active Directory Integration<br>
<a href="http://www.ioplex.com/" target="_blank">http://www.ioplex.com/</a><br>
</font></span></blockquote></div><br></div>