I have a problem setting up integrated authentication with Kerberos towards a MS Sql Server on Wildfly 8.2.0.
Here's what I've done so far:
Managed to get it going on Wildfly 9.0.2, simply because Wildfly 9 contains the "new" login module class org.jboss.security.negotiation.KerberosLoginModule. A security domain configured like this:
<login-module code="org.jboss.security.negotiation.KerberosLoginModule" flag="required" module="org.jboss.security.negotiation"> <module-option name="storeKey" value="false"/> <module-option name="useKeyTab" value="false"/> <module-option name="principal" value="app-srv@REALM"/> <module-option name="useTicketCache" value="true"/> <module-option name="debug" value="true"/> <module-option name="refreshKrb5Config" value="true"/> <module-option name="isInitiator" value="true"/> <module-option name="addGSSCredential" value="true"/> <module-option name="delegationCredential" value="USE"/> </login-module>
works perfectly fine. Before I added "addGSSCredential" to "true" I was getting the error "No matching credentials in Subject!" but then I read what this guy was saying here: https://developer.jboss.org/message/913652#913652.
Now, the problem is that I don't want Wildfly 9, I want to have it set up on Wildfly 8.2. Should be possible right?
So, on Wildfly 8.2:
- Wildfly 8.2 does not have the KerberosLoginModule. It instead uses the sun provided login module (com.sun.security.auth.module.Krb5LoginModule) as specified here
- Once I got Wildfly 8 to use this login module from Sun (does NOT work out of the box - which makes me wonder if the guys from JBoss actually ever tested this?- ...because the module that loads the login class (org.picketbox) does not depend on sun.jdk module and it fails wonderfully with a classnotfoundexception), I stumbled upon the same error I was getting on Wildfly 9 before adding the addGSSCredentials option: "No matching credentials in Subject!"
- Problem is, addGSSCredentials is not supported by the Sun login module class.
So, has anybody ever set up Kerberos for a datasource on Wildfly 8.2 using the Sun class? Or must I upgrade the libraries to get the KerberosLoginModule from jboss-negotiation?