directory-kerby mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zheng, Kai" <kai.zh...@intel.com>
Subject RE: Getting started with the client API
Date Mon, 16 Nov 2015 13:11:47 GMT
The issue was just solved. Now default_realm will be respected and used.

commit cf6e39b6d4be9681dbf513a0c1417e5cf6ad839f
Author: Kai Zheng <kai.zheng@intel.com>
Date:   Mon Nov 16 21:09:09 2015 +0800

    Handling default config value in better way and solved DIRKRB-457

-----Original Message-----
From: Marc Boorshtein [mailto:mboorshtein@gmail.com] 
Sent: Saturday, November 14, 2015 11:57 PM
To: kerby@directory.apache.org
Subject: Re: Getting started with the client API

> Thanks Kai!  We're making progress.  Here's the current stack trace:
>
> Exception in thread "main" java.lang.NullPointerException
>
> at org.apache.kerby.kerberos.kerb.client.request.AsRequest.getTicket(
> AsRequest.java:135)
>
> at
> org.apache.kerby.kerberos.kerb.client.impl.DefaultInternalKrbClient.do
> RequestTgtTicket(
> DefaultInternalKrbClient.java:76)
>
> at
> org.apache.kerby.kerberos.kerb.client.impl.AbstractInternalKrbClient.r
> equestTgtTicket(
> AbstractInternalKrbClient.java:105)
>
> at 
> org.apache.kerby.kerberos.kerb.client.KrbClient.requestTgtWithOptions(
> KrbClient.java:252)
>
> at 
> org.apache.kerby.kerberos.kerb.client.KrbClient.requestTgtWithKeytab(
> KrbClient.java:194)
>
> at TestKerb.main(TestKerb.java:12)
>
> Looking at the kerberos messages over the wire it looks like its 
> setting the realm to EXAMPLE.COM even though the krb5.conf file has 
> "default_realm = RHELENT.LAN" which is causing the KDC to fail.  
> Trying to see if I can make that setting in the code instead of the krb5.conf file.
>
> Thanks
>
>
> I got a ticket!  Here's the code that worked:

KrbClient kerb = new KrbClient(new File("/Users/mlb/Documents/testkerb"));

kerb.init();

kerb.setKdcRealm("RHELENT.LAN");
TgtTicket tgt = kerb.requestTgtWithKeytab("HTTP/s4u.rhelent.lan@RHELENT.LAN",
new File("/Users/mlb/Documents/localdev.keytab"));

I'll open a jira ticket for the bug with the config so we can track it.

Thanks again!  now for the fun part.
Mime
View raw message