Reputation: 23321
I'm using Java on the server side and I want to validate a kerberos ticket with java code. I have a keytab file. How do I do this? I keep finding all of these samples which don't use a keytab but I believe I need to use this. Also, I don't want to use spring or anything like that, just the GSSAPI. I have a krb5.ini file as well. Has anyone else done this?
Upvotes: 2
Views: 3913
Reputation: 357
If you want to use SPNego, then the client also needs to SPNego. Most browsers and curl support SPNego. If your client does not use SPNego, you can GSSP API Accept Security Context. For an example of how to use Keytab for accept security context, see http://docs.oracle.com/javase/1.5.0/docs/guide/security/jgss/tutorials/BasicClientServer.html#Progs
Upvotes: 1
Reputation: 18415
I have done this. Take a look at the code of spnego.sourceforge.net. This is exactly what you need.
Upvotes: 1