IP addresses with VPN, and "kinit -xa"
By Weijun-Oracle on May 08, 2008
But here comes a problem, Java's Kerberos uses the following method to fill addresses into the AS-REQ message when requesting the initial TGT from a KDC (which is in the office):
InetAddress.getAllByName(InetAddress.getLocalHost().getHostName())and it cannot find the VPN IP. So if I use this TGT to request for a service ticket, an error is returned: Incorrect net address.
To solve this problem, I write a patch for Kinit.java in Java, creating a new option "-xa address" which adds an extra address into AS-REQ (this option can be provided more than once). The option "-a" is also added into Klist.java to print the addresses for a ticket. Everything works now.
BTW, I don't like the decision that Sun removed kinit and klist tools from JDK/JRE on Linux and Solaris. They're still very useful. On the other hand, on Windows, these tools exist. But any one who has downloaded MS's own klist.exe will find himself confused all the time: Sun's klist.exe shows ticket cache from the %HOME%/krbccc_xxx file, and MS's klist.exe shows the LSA cache, totally different content.