【发布时间】:2019-08-01 13:29:14
【问题描述】:
我正在尝试将应用程序从 WebSphere 7.0 迁移到 JBoss EAP 6.4。
我已完成所有必要的更改以查看网页。但我的问题从那时开始。
在 web.xml 中,多个 jsp 文件有 6 种不同的安全角色声明。
当我从浏览器打开应用程序时,它会显示欢迎页面,可以,
但是当我点击登录按钮时,我在 EAP 6.4 的屏幕上看到 403 错误。
当我在 WebSphere 上打开同一个应用程序并单击登录按钮时,它会打开一个浏览器弹出窗口,要求输入用户名和密码。
安全角色是这些
<security-role>
<description></description>
<role-name>xxxx</role-name>
</security-role>
<security-role>
<description></description>
<role-name>yyyy</role-name>
</security-role>
<security-role>
<description></description>
<role-name>zzzz</role-name>
</security-role>
<security-role>
<description></description>
<role-name>kkkk</role-name>
</security-role>
<security-role>
<description></description>
<role-name>pppp</role-name>
</security-role>
<security-role>
<description></description>
<role-name>llll</role-name>
</security-role>
这些是作为 jsp 页面的 auth-constraint 和 security-constraint 给出的。
<security-constraint>
<display-name>xxxx</display-name>
<web-resource-collection>
<web-resource-name>xxxx</web-resource-name>
<description></description>
<url-pattern>/jsp/auth/*</url-pattern>
<url-pattern>/jsp/includes/*</url-pattern>
<url-pattern>*.do</url-pattern>
<url-pattern>/jsp/menu.jsp</url-pattern>
<http-method>GET</http-method>
<http-method>PUT</http-method>
<http-method>HEAD</http-method>
<http-method>TRACE</http-method>
<http-method>POST</http-method>
<http-method>DELETE</http-method>
<http-method>OPTIONS</http-method>
</web-resource-collection>
<auth-constraint>
<description></description>
<role-name>xxxx</role-name>
</auth-constraint>
</security-constraint>
我相信我必须在 JBoss EAP 6.4 上定义这些角色才能使其像在 WebSphere 上一样工作。
所以,我的问题是: 我如何在 JBoss EAP 6.4 中定义这些角色?我检查了文档并尝试执行它们,但无法使其工作。
谢谢。
【问题讨论】:
标签: jboss security-roles