我正在尝试将华夫饼集成到我的web应用程序项目(jsp)中。我想从活动目录(遵循Kerberos协议)验证我的webapp的用户。
每当用户提示url首先从活动目录服务器对用户进行身份验证时,用户就可以使用我的web应用程序(jsp)。
下面是我为实现华夫饼所遵循的设置。当我点击url弹出以便在成功登录后进行验证时,它显示
HTTP状态403 -对请求的资源的访问已被拒绝,
context.xml
<Context>
<Realm className="org.apache.catalina.realm.JAASRealm"
appName="Jaas"
userClassNames="waffle.jaas.UserPrincipal"
roleClassNames="waffle.jaas.RolePrincipal"
useContextClassLoader="false"
debug="true" />
</Context>web.xml
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>Jaas</realm-name>
</login-config>
<security-role>
<role-name>Everyone</role-name>
</security-role>
<security-constraint>
<display-name>Waffle Security Constraint</display-name>
<web-resource-collection>
<web-resource-name>Protected Area</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>Everyone</role-name>
</auth-constraint>
</security-constraint>login.conf
Jaas {
waffle.jaas.WindowsLoginModule sufficient;
};jaas.policy
grant Principal * * {
permission java.security.AllPermission "/*";
};发布于 2018-10-17 06:07:08
我尝试了下面的配置,它对我是有效的。
<security-role>
<role-name>*</role-name>
</security-role>
<security-constraint>
<display-name>Waffle Security Constraint</display-name>
<web-resource-collection>
<web-resource-name>Protected Area</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>*</role-name>
</auth-constraint>
</security-constraint>https://stackoverflow.com/questions/48168218
复制相似问题