【发布时间】:2020-06-22 00:46:06
【问题描述】:
我正在使用 Wildfly 10,我正在尝试在 undertow 配置中添加一个表达式过滤器来验证来自 mod_jk 的秘密值。但是它总是返回错误代码 403。
下面是我在standalone-full.xml中的配置
<subsystem xmlns="urn:jboss:domain:undertow:7.0" ...>
...
<server name="default-server">
<http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true"/>
<ajp-listener name="ajp" socket-binding="ajp"/>
<https-listener name="https" socket-binding="https" security-realm="ApplicationRealm" enable-http2="true"/>
<host name="default-host" alias="localhost">
...
<!-- add the following with your AJP port (8009) -->
<filter-ref name="secret-checker" predicate="equals(%p, 8009)"/>
</host>
</server>
...
<filters>
<!-- add the following with your credential (YOUR_AJP_SECRET) -->
<expression-filter name="secret-checker" expression="not equals(%{r,secret}, 'verysecure') -> response-code(403)"/>
</filters>
下面是worker.properties中mod_jk的配置。
worker.list=ajp13
worker.ajp13.port=8009
worker.ajp13.host=127.0.0.1
worker.ajp13.type=ajp13
worker.ajp13.secret=verysecure
我正在尝试缓解此链接中详述的 ghostcat 漏洞。 https://access.redhat.com/solutions/4851251
感谢任何帮助。提前致谢。
【问题讨论】:
标签: wildfly-10 undertow mod-jk