>> So it reads the user's secret key from a keytab and try to decrypt the
TGT to see if it can successfully get the session key inside<br><br>No, it uses the user's TGT to obtain a service ticket for a known valid key in the keytab file (any valid service key would work usually HOST/hostname keys, or HTTP/hostname keys are used). When you do a successful kinit (AS request) you are validating that the user and the KDC agree that the user's key was correct, but until you actually try to use the TGT to get a service ticket for a known service you have not validated that the KDC you are talking to is not spoofed. In other words, if this extra step is not performed inside the Krb5LoginModule then it is not secure for validating passwords. Doing this extra step is standard in mod_auth_kerb, pam_krb5, etc. If it is not supported it will require a change in the openjdk code.<br>
<br>-Christopher<br><br><div class="gmail_quote">On Thu, Mar 10, 2011 at 6:36 PM, Weijun Wang <span dir="ltr"><<a href="mailto:weijun.wang@oracle.com">weijun.wang@oracle.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi Christopher<br>
<br>
I'm not familiar with that function. So it reads the user's secret key from a keytab and try to decrypt the TGT to see if it can successfully get the session key inside?<br>
<br>
This is a part of the Krb5LoginModule login process: it receives a TGT from the KDC and use either the password or keytab (depending on your JAAS config file) to decrypt it. After the commit() method is called, the credentials (containing both the TGT and the session key) are stored as private credentials in the JAAS subject.<br>
<br>
All public methods we have around Kerberos are APIs defined in JAAS and JGSS.<br>
<br>
BTW, this mailing list is used to discuss the development of OpenJDK security libraries itself. For API usage or general technical support, it would be better to post a question in the forum. There are much more experts on application programming there.<br>
<br>
<a href="http://forums.oracle.com/forums/forum.jspa?forumID=963" target="_blank">http://forums.oracle.com/forums/forum.jspa?forumID=963</a><br>
<br>
Thanks<br>
Max<div><div></div><div class="h5"><br>
<br>
<br>
On 03/11/2011 01:49 AM, cneberg wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
How do I get the com.sun.security.auth.module.Krb5LoginModule login<br>
module to verify the TGT against a key in the keytab like is done in<br>
krb5_verify_init_creds() which is part of C Krb5 API?<br>
<br>
Notes on that API<br>
<br>
<a href="http://www.daemon-systems.org/man/krb5_verify_init_creds.3.html" target="_blank">http://www.daemon-systems.org/man/krb5_verify_init_creds.3.html</a><br>
<br>
Thanks,<br>
Christopher<br>
<br>
</blockquote>
</div></div></blockquote></div><br>