我在使用Kerberos向Wildfly 8.2.0上的MS Sql Server设置集成身份验证时遇到问题 .
这是我到目前为止所做的:
- 由于Wildfly 9包含“新”登录模块类org.jboss.security.negotiation.KerberosLoginModule而被管理以使其在Wildfly 9.0.2上运行 . 安全域配置如下:
<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>
工作得非常好 . 在我将"addGSSCredential"添加到"true"之前我收到了错误"No matching credentials in Subject!"但是后来我读到了这个人在这里说的话:https://developer.jboss.org/message/913652#913652 .
现在,问题是我不想要Wildfly 9,我想在Wildfly 8.2上设置它 . 应该可能吗?
所以,在Wildfly 8.2上:
-
Wildfly 8.2没有KerberosLoginModule . 它改为使用sun提供的登录模块(com.sun.security.auth.module.Krb5LoginModule)here
-
一旦我使用Wildfly 8从Sun使用这个登录模块(开箱即用 - 这让我想知道JBoss的人是否真的测试了这个? - ...因为加载登录类的模块(org) .picketbox)不依赖于sun.jdk模块,它使用classnotfoundexception失败了,我偶然发现了在添加addGSSCredentials选项之前我在Wildfly 9上遇到的同样错误:"No matching credentials in Subject!"
-
问题是,Sun登录模块类不支持addGSSCredentials .
那么,有没有人使用Sun类在Wildfly 8.2上为数据源设置Kerberos?或者我必须升级库以从jboss-negotiation获取KerberosLoginModule吗?
1 回答
我可以在WildFly 8.2.1.Final中使用它的唯一方法是将
jboss-negotiation-common-<version>.jar
和jboss-negotiation-extras-<version>.jar
从2.2.7.Final
更新为3.0.2.Final
,WildFly 10.1.0.Final提供的版本(抱歉,我没有尝试使用WildFly中的那些) 9) .您需要更新
modules\system\layers\base\org\jboss\security\negotiation\main\
才能引用新的jar .或者,您可以使用WildFly 10.1.0.Final附带的版本替换整个
org.jboss.security.negotiation
模块 .作为参考,
standalone.xml
中的登录模块是:我发现我不需要设置
isInitiator
或delegationCredential
选项 .PS . 感谢您发布此问题!我在Kerberos身份验证方面遇到了很多问题,因为我将
storeKey
设置为true
,直到遇到此问题 .PSS . 我应该补充一点,我没有连接到MS SQL Server,而是连接到Apache Phoenix数据源,这可以解释为什么我不需要设置一些登录选项 .