您好, 欢迎来到 !    登录 | 注册 | | 设为首页 | 收藏本站

使用Liferay启动Tomcat 8时存在严重的安全约束

使用Liferay启动Tomcat 8时存在严重的安全约束

这意味着web.xml某人仅针对pattern上的POST和GET方法指定了安全性约束/bg/c/portal/protected,可能与此类似:

<security-constraint>
    <web-resource-collection>
        <url-pattern>/bg/c/portal/protected</url-pattern>
        <http-method>POST</http-method>
        <http-method>GET</http-method>
    </web-resource-collection>
    <user-data-constraint>
        <transport-guarantee>...</transport-guarantee>
    </user-data-constraint>
</security-constraint>

您应该删除http-method方括号以使其匹配此方法的所有方法url-pattern或者如果您想为其设置不同的安全性约束而没有任何http- method方括号,则创建第二个方括号。

例如,如果您想/bg/c/portal/protectedPOSTGET方法使用SSL 端点进行安全保护,而对于其他方法则不需要,则应创建如下配置:

<security-constraint>
    <web-resource-collection>
        <url-pattern>/bg/c/portal/protected</url-pattern>
        <http-method>POST</http-method>
        <http-method>GET</http-method>
    </web-resource-collection>
    <user-data-constraint>
        <transport-guarantee>CONFIDENTIAL</transport-guarantee>
    </user-data-constraint>
</security-constraint>
<security-constraint>
    <web-resource-collection>
        <url-pattern>/bg/c/portal/protected</url-pattern>
    </web-resource-collection>
    <user-data-constraint>
        <transport-guarantee>NONE</transport-guarantee>
    </user-data-constraint>
</security-constraint>

如您现在所见,该模式的所有方法均已涵盖,因此不会引发任何错误

其他 2022/1/1 18:22:22 有429人围观

撰写回答


你尚未登录,登录后可以

和开发者交流问题的细节

关注并接收问题和回答的更新提醒

参与内容的编辑和改进,让解决方法与时俱进

请先登录

推荐问题


联系我
置顶