Stopping the service principle from requesting a TGT

Is there a way to stop the service end of the JGSS negotiation from requesting a TGT for its service principle ?

In a Kerberos GSSAPI negotiation the accepting service only needs access to a keytable containing the exported service key to successfully authentication and identify the client principal. The service does not need any network access to the KDC.

The JGSS implementation during the acceptSecContext requests a TGT for the service principal, even though it makes no use of it and discards it. The service therefore requires network access to the KDC and incurs the overhead of a KDC access for each authentication.

This can simply be demonstrated using the sample code at:

<pre>

http://java.sun.com/javase/6/docs/technotes/guides/security/jgss/tutorials/BasicClientServer.html

</pre>

If the com.sun.security.jgss.accept entry is bcsLogin.conf is modified to:

<pre>

com.sun.security.jgss.accept {

com.sun.security.auth.module.Krb5LoginModule required storeKey=true doNotPrompt=true useKeyTab=true keyTab="service.keytab" principal="service";

};

</pre>

I would not expect the service to request a TGT, but it does, as the KDC log shows:

<pre>

Jun 27 16:06:35 kdc krb5kdc[1865](info): AS_REQ (3 etypes {16 3 1}) 192.168.111.1: ISSUE: authtime 1151420795, etypes {rep=16 tkt=16 ses=16}, service@REALM for krbtgt/REALM@REALM

Jun 27 16:06:35 kdc krb5kdc[1865](info): AS_REQ (3 etypes {16 3 1}) 192.168.111.1: ISSUE: authtime 1151420795, etypes {rep=16 tkt=16 ses=16}, service@REALM for krbtgt/REALM@REALM

</pre>

Any ideas ?

Thank

Phil

[1753 byte] By [Phil-Sa] at [2008-2-24]
# 1
You can configure the server to be an acceptor only.This is available starting from Java SE 6.For details, check the javadoc on Krb5LoginModule: http://download.java.net/jdk6/docs/jre/api/security/jaas/spec/com/sun/security/auth/module/Krb5LoginModule.htmlSeema
Seema-1a at 2007-7-14 > top of java,Security,Kerberos & Java GSS (JGSS)...
# 2

Hi Seema,

Thanks for the reply. I assume you're talking about the isInitiator flag ?

I'm using Java version 1.6.0-beta2 and still getting the same results. The config file is now:

com.sun.security.jgss.initiate {

com.sun.security.auth.module.Krb5LoginModule required

useTicketCache=true ticketCache=ticket.cache debug=true;

};

com.sun.security.jgss.accept {

com.sun.security.auth.module.Krb5LoginModule required isInitiator=false

storeKey=true doNotPrompt=true useKeyTab=true

keyTab="service.keytab" principal="service" debug=true;

};

The output from the SampleServer is:

[root@kdc gssapi.new]# ./server

Waiting for incoming connection...

Got connection from client /127.0.0.1

Will read input token of size 445 for processing by acceptSecContext

Debug is true storeKey true useTicketCache false useKeyTab true

doNotPrompt true ticketCache is null KeyTab is service.keytab

refreshKrb5Config is false principal is service tryFirstPass is false

useFirstPass is false storePass is false clearPass is false

principal's key obtained from the keytab principal is service@REALM

Acquire TGT using AS Exchange

EncryptionKey: keyType=3 keyBytes (hex dump)=0000: 57 08 1A 80 75 D0 7C 31

...

As you can see the server is still acquiring a TGT. Also the isInitiator flag is not showing up in the debug options.

Is this functionality in version 1.6.0-beta2 ?

Thanks again

Phil

Phil-Sa at 2007-7-14 > top of java,Security,Kerberos & Java GSS (JGSS)...
# 3
Support for the "isInitiator" flag is available starting from Java SE 6 b89.Please download the latest build of Java SE 6 (Mustang). http://download.java.net/jdk6/binaries/Seema
Seema-1a at 2007-7-14 > top of java,Security,Kerberos & Java GSS (JGSS)...
# 4
Hi Seema,Success...........Thanks for the help.....CheersPhil
Phil-Sa at 2007-7-14 > top of java,Security,Kerberos & Java GSS (JGSS)...