I am testing the JGSS sample on my local domain but have a problem with hostbased service. Below is the setup:
obtain a keytab generated from command
ktpass -princ myservice/[email protected] -mapuser [email protected] -crypto RC4-HMAC-NT -ptype KRB5_NT_PRINCILAL -pass krbpass -out myservice-host.keytabsystem admin run
setspn -S myservice/host.my.example.com krbsrvto set SPN for active directory.from GssClient.java create the serverprincipal by:
GSSName serverName = manager.createName(serverPrinc, GSSName.NT_HOSTBASED_SERVICE);this will result in
java.security.PrivilegedActionException: GSSException: No valid credentials provided (Mechanism level: Server not found in Kerberos database (7))exception.but if I call
createName()withGSSName.NT_USER_NAMEthere will be no error.I have asked system admin and verified no duplicate for
setspn -L krbsrvandsetspln-X myservice/host.my.example.com.
So would there be anything I have messed up? The server is running on Solaris and client is running on Windows, both on Java 6u27.
Advice is greatly appreciated.