Krb5LoginModule verify TGT?
cneberg
cneberg at gmail.com
Fri Mar 11 02:19:13 UTC 2011
>> 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
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.
-Christopher
On Thu, Mar 10, 2011 at 6:36 PM, Weijun Wang <weijun.wang at oracle.com> wrote:
> Hi Christopher
>
> 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?
>
> 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.
>
> All public methods we have around Kerberos are APIs defined in JAAS and
> JGSS.
>
> 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.
>
> http://forums.oracle.com/forums/forum.jspa?forumID=963
>
> Thanks
> Max
>
>
>
> On 03/11/2011 01:49 AM, cneberg wrote:
>
>> How do I get the com.sun.security.auth.module.Krb5LoginModule login
>> module to verify the TGT against a key in the keytab like is done in
>> krb5_verify_init_creds() which is part of C Krb5 API?
>>
>> Notes on that API
>>
>> http://www.daemon-systems.org/man/krb5_verify_init_creds.3.html
>>
>> Thanks,
>> Christopher
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/security-dev/attachments/20110310/77b80d5f/attachment.htm>
More information about the security-dev
mailing list