[25234] in Kerberos

home help back first fref pref prev next nref lref last post

Re: Java Kerberos question (solved)

daemon@ATHENA.MIT.EDU (Dieter Schicker)
Fri Jan 6 16:44:01 2006

From: Dieter Schicker <didi@ling.uni-graz.at>
Date: Fri, 06 Jan 2006 19:36:53 +0100
Message-ID: <dpm8q4$c5a$1@skirner.kfunigraz.ac.at>
To: kerberos@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: kerberos-bounces@mit.edu

I managed to solve my problem.

1. extracted keytab for special user
2. jaas.conf looks like

XlabAdminLoginContext {
   com.sun.security.auth.module.Krb5LoginModule required
     useKeyTab=true
     keyTab=didi.keytab
     doNotPrompt=true
     principal=didi
   ;
};

Cheers
Didi

Dieter Schicker wrote:
> Hi,
> 
> I have a java application and want to use the kerberos ticket cache for 
> authentication just for testing because I don't want to type in the 
> credentials each time the application starts.
> 
> I have the following jaas.conf file
> 
> XlabAdminLoginContext {
>   com.sun.security.auth.module.Krb5LoginModule required
>             useTicketCache="true"
>             ticketCache="/tmp/krb5cc_1000"
>             doNotPrompt="true"
>             principal="didi@SOME.DOMAIN.TLD"
>             ;
> };
> 
> The java code looks like
> 
> <code>
> System.setProperty("java.security.krb5.kdc", KRB5_HOST);
> 
> try {
>   loginContext = new LoginContext("XlabAdminLoginContext", new 
> DialogCallbackHandler());
>   }
> catch (LoginException ex) {
>   ...
> }
> </code>
> 
> That throws a
> 
> "javax.security.auth.login.LoginException: Unable to obtain password 
> from user"
> 
> When I use the DialogCallbackHandler and do not set "doNotPrompt=true" 
> everything works fine.
> 
> What am I doing wrong? I stress again that it's only for development 
> purposes and I wouldn't care setting the password somewhere in the 
> clear, but where ...?
> 
> Thanks in advance
> Didi
________________________________________________
Kerberos mailing list           Kerberos@mit.edu
https://mailman.mit.edu/mailman/listinfo/kerberos

home help back first fref pref prev next nref lref last post