Using a different GSSCredential for JNDI GSSAPI login

I have a server program which authenticates to a kerberos server using the GSSAPI Mechanisem. When I connect to my LDAP server using GSSAPI, it uses it's own credential by default. But what I want is to use a different GSSCredential, forwarded by the client to the server.

I have tried creating a Subject whit this GSSCredential and using doAs... which resulted in a "can not find ticket" error.

I have also tried creating a SocketFactory, which uses the credential to establish a security context whit the ldap server. But I can not let JNDI pickup the socket correctly. It always does a simple bind, or other which kills the socket connection.

So how should I use a GSSCredential to authenticate whit my ldap server using JNDI?

[755 byte] By [mivz@spugium.neta] at [2007-10-1 23:16:36]
# 1
just closing the loop - i believe this is addressed in: http://forum.java.sun.com/thread.jspa?threadID=665649
charlie.laia at 2007-7-15 14:05:14 > top of Java-index,Security,Other Security APIs, Tools, and Issues...