directory-kerby mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Boorshtein <mboorsht...@gmail.com>
Subject Getting started with the client API
Date Thu, 12 Nov 2015 16:48:27 GMT
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();

kerb.init();

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 sun.nio.ch.Net.checkAddress(Net.java:96)

at sun.nio.ch.DatagramChannelImpl.connect(DatagramChannelImpl.java:722)

at org.apache.kerby.kerberos.kerb.transport.KrbUdpTransport.<init>(
KrbUdpTransport.java:42)

at org.apache.kerby.kerberos.kerb.transport.KrbNetwork.connect(
KrbNetwork.java:50)

at org.apache.kerby.kerberos.kerb.client.impl.DefaultInternalKrbClient.init(
DefaultInternalKrbClient.java:61)

at org.apache.kerby.kerberos.kerb.client.KrbClient.init(KrbClient.java:150)

at TestKerb.main(TestKerb.java:11)

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


Thanks

Marc

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message