directory-kerby mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zheng, Kai" <>
Subject RE: Getting started with the client API
Date Fri, 13 Nov 2015 00:40:00 GMT
Just forgot to mention that you may expect to load the network port from client configuration.
If that's the case, please check the configuration file like /etc/krb5.conf is available and

-----Original Message-----
From: Zheng, Kai [] 
Sent: Friday, November 13, 2015 6:28 AM
Subject: RE: Getting started with the client API

Hi Marc,

It looks like you didn't set the UDP/TCP port. Please note the NPE place. It would be good
to have a unit test for the API requestTgtWithKeytab you're going to use, but I don’t find
it (and maybe someone can add), though we do have similar ones for password credentials. But
I thought the basic setup should be very similar, if necessary please look at these existing
test codes and it's good to start with them. 

My pleasure to help.


-----Original Message-----
From: Marc Boorshtein [] 
Sent: Friday, November 13, 2015 12:48 AM
Subject: Getting started with the client API

I'm getting started and trying to build my initial environment.  I'm not able to get the client
working so far.  Here's what I've done:

1.  Setup FreeIPA as both my directory and kerberos server 2.  Generated keytabs 3.  Configured
my /etc/krb.conf file (OSX) 4.  tested the keytab by running kinit:

$ kinit  -k -t /path/to/localdev.keytab -V HTTP/s4u.rhelent.lan@RHELENT.LAN

$ klist

Credentials cache: API:64E0151A-B708-4B43-B032-42B24DAEF251

        Principal: HTTP/s4u.rhelent.lan@RHELENT.LAN

5.  Checked out the latest from git and created a test project

6.  Tried running the following code:

KrbClient kerb = new KrbClient();


TgtTicket tgt = kerb.requestTgtWithKeytab("HTTP/s4u.rhelent.lan@RHELENT.LAN",
new File("/path/to/localdev.keytab"));

I get the following exception:

Exception in thread "main" java.lang.NullPointerException



at org.apache.kerby.kerberos.kerb.transport.KrbUdpTransport.<init>(

at org.apache.kerby.kerberos.kerb.transport.KrbNetwork.connect(

at org.apache.kerby.kerberos.kerb.client.impl.DefaultInternalKrbClient.init(

at org.apache.kerby.kerberos.kerb.client.KrbClient.init(

at TestKerb.main(

I'm sure I'm missing something simple here.  Any help would be appreciated.


View raw message