【发布时间】:2015-05-05 13:27:12
【问题描述】:
我正在使用windows authentication with tomcat 7
我已经完成了域控制器设置和 tomcat 实例设置 我无法使用 tomcat 配置我的网络应用程序 我的意思是我不知道我必须在 web.xml、context.xml 和 server.xml 中更改什么
将在域控制器上创建的 tomcat.keytab 文件复制到 $CATALINA_BASE/conf/tomcat.keytab。 创建 kerberos 配置文件 $CATALINA_BASE/conf/krb5.ini。本指南中使用的文件包含:
[libdefaults]
default_realm = DEV.LOCAL
default_keytab_name = FILE:c:\apache-tomcat-7.0.x\conf\tomcat.keytab
default_tkt_enctypes = rc4-hmac,aes256-cts-hmac-sha1-96,aes128-cts-hmac-sha1-96
default_tgs_enctypes = rc4-hmac,aes256-cts-hmac-sha1-96,aes128-cts-hmac-sha1-96
forwardable=true
[realms]
DEV.LOCAL = {
kdc = win-dc01.dev.local:88
}
可以通过设置 java.security.krb5.conf 系统属性来更改此文件的位置。 创建 JAAS 登录配置文件 $CATALINA_BASE/conf/jaas.conf。本指南中使用的文件包含:
[domain_realm]
dev.local= DEV.LOCAL
.dev.local= DEV.LOCAL
com.sun.security.jgss.krb5.initiate {
com.sun.security.auth.module.Krb5LoginModule required
doNotPrompt=true
principal="HTTP/win-tc01.dev.local@DEV.LOCAL"
useKeyTab=true
keyTab="c:/apache-tomcat-7.0.x/conf/tomcat.keytab"
storeKey=true;
};
com.sun.security.jgss.krb5.accept {
com.sun.security.auth.module.Krb5LoginModule required
doNotPrompt=true
principal="HTTP/win-tc01.dev.local@DEV.LOCAL"
useKeyTab=true
keyTab="c:/apache-tomcat-7.0.x/conf/tomcat.keytab"
storeKey=true;
};
【问题讨论】:
-
日志中有错误信息?没有更多信息就无法回答问题。
-
@Fred 神奇的神奇狗实际上我不知道如何在 server.xml 中设置 conf 顺便说一句我没有尝试你可以发布示例 conf。 server.xml , web.xml 中的设置,我们需要 Windows auhtentication
标签: tomcat7 windows-authentication kerberos