Hi all:
I found that Krb5LoginModule does not work.
Here is an example:
First, I set a Kerberos V5 server for this test and add a principal
"[EMAIL PROTECTED]" with password "1111111".
Then I ran next segment of code:
Krb5LoginModule krb5Login = new Krb5LoginModule();
Map<String,String> options = new HashMap<String,String>();
options.put("principal", "[EMAIL PROTECTED]");
Subject subject = new Subject();
krb5Login.initialize(subject, new TextCallbackHandler(), null, options);
krb5Login.login();
krb5Login.commit();
with following vm arguments:
-Djava.security.krb5.realm=EXAMPLE.COM
-Djava.security.krb5.kdc=<kdc ip address>:88
-Djavax.security.auth.useSubjectCredsOnly=false
The exception was thrown as follows:
javax.security.auth.login.LoginException
at org.apache.harmony.auth.module.Krb5LoginModule.login(
Krb5LoginModule.java:141)
at
org.apache.harmony.auth.jgss.kerberos.test.TestForKerberosLoginModule.main(
TestForKerberosLoginModule.java:31)
Caused by: org.apache.harmony.auth.internal.kerberos.v5.KerberosException:
Error code: 6
at org.apache.harmony.auth.internal.kerberos.v5.KrbClient.doAS(
KrbClient.java:157)
at org.apache.harmony.auth.module.Krb5LoginModule.login(
Krb5LoginModule.java:96)
... 1 more
I've reported it on jira HARMONY-4921. Is there anyone familar with it could
help to have a look at it?
Thanks,
John