在undertow中使用表达式过滤器不起作用

问题描述 投票:0回答:1

我正在使用Wildfly 10,并且试图在underwow配置中添加一个表达式过滤器,以验证来自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,并且试图在underwow配置中添加一个表达式过滤器,以验证来自mod_jk的秘密值。但是,它始终返回错误代码403。以下是我的...

wildfly-10 undertow mod-jk
1个回答
0
投票

在端口后放置“ 和等于(%{PROTOCOL},'AJP')“

© www.soinside.com 2019 - 2024. All rights reserved.