我正在尝试将Web应用程序从Websphere 8.5.5迁移到Liberty 16.0.0.3。在Websphere中,我曾经定义了一些J2C安全条目,然后以编程方式加载。我怎样才能在Liberty中实现这一目标?
我尝试在server.xml中定义一个“authData”条目,然后通过AuthDataProvider.getAuthData()加载它,但是这需要“passwordUtilities-1.0”功能,如果激活它会弄乱我的应用程序,因为每当我尝试通过浏览器访问应用程序时显示授权弹出窗口。
任何人都可以解释我如何解决这个问题,或者我应该以不同的方式做到这一点?任何提示都会有所帮助。谢谢!
您是否定义了保护Web应用程序的安全约束 - 在web.xml或注释中?这是在WebSphere 8.5.5中没有提示您的相同应用程序吗?
如果在应用程序中定义了安全约束,则会提示,因为passwordUtilities-1.0包含appSecurity功能。如果应用程序存在安全性限制且由于某种原因无法删除,则可以使用应用程序的application-bnd元素将EVERYONE特殊主题分配给应用程序角色,以避免提示。一个例子:
<application location="myApp.war">
<application-bnd>
<security-role name="appRoleName"> <!-- role name listed in the security constraints -->
<special-subject type="EVERYONE"/>
</security-role>
</application-bnd>
</application>