【发布时间】:2017-06-02 22:22:36
【问题描述】:
我们正在使用设置为机密的安全约束策略强制从 http 重定向到 https。尽管在本地开发中,我们希望消除约束。在 Jetty 7 中,我们使用 override-web.xml 将传输安全性从 CONFIDENTIAL 重新分配为 NONE。现在,在我们迁移到 Jetty 9 之后,它突然停止了迁移。我怀疑现在使用 Jetty 9 而不是覆盖传输安全性,它会向列表添加约束。
如何在本地环境中将安全约束从 CONFIDENTIAL 覆盖为 NONE?
这是来自web.xml的部分:
<security-constraint>
<web-resource-collection>
<web-resource-name>Some server</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
在本地开发中,我们使用 jetty-maven-plugin 运行码头并指定 override-web.xml。这是来自override-web.xml的部分:
<security-constraint>
<web-resource-collection>
<web-resource-name>Some server</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
Jetty 之前的版本:7.6.10.v20130312
之后的码头版本:9.2.18.v20160721
【问题讨论】:
标签: jetty servlet-3.0 maven-jetty-plugin