Keycloak 限制对KeyClope管理控制台的访问

Keycloak 限制对KeyClope管理控制台的访问,keycloak,Keycloak,有没有办法配置Key斗篷2.2.1,使管理控制台无法从远程IP访问 基本上,我想将其设置为类似于Wildfly管理控制台,您可以在服务器上本地访问它,但不能远程访问它。根据KeyClope文档,每个领域都有一个专用的管理控制台,可以通过访问URL/auth/admin/{realm name}/console来访问 我认为您可以阻止此URL进行外部访问,以保持对其他URI的关注,这些URI可能用于KeyClope REST API,以及外部应用程序也可以下载的外部模块(如javascript模块

有没有办法配置Key斗篷2.2.1,使管理控制台无法从远程IP访问


基本上,我想将其设置为类似于Wildfly管理控制台,您可以在服务器上本地访问它,但不能远程访问它。

根据KeyClope文档,每个领域都有一个专用的管理控制台,可以通过访问URL/auth/admin/{realm name}/console来访问

我认为您可以阻止此URL进行外部访问,以保持对其他URI的关注,这些URI可能用于KeyClope REST API,以及外部应用程序也可以下载的外部模块(如javascript模块)。同样的方法也可以应用于JBoss EAP控制台管理员的默认端口9990

JBoss EAP具有其他功能,可用于阻止特定IP范围或仅限制对本地服务器的访问

您还可以应用特定的底拖过滤器来阻止外部访问。 见下例:

<subsystem xmlns="urn:jboss:domain:undertow:4.0">
            <buffer-cache name="default"/>
            <server name="default-server">
                <ajp-listener name="ajp" socket-binding="ajp"/>
                <http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true"/>
                <https-listener name="https" socket-binding="https" security-realm="ApplicationRealm" enable-http2="true"/>
                <host name="default-host" alias="localhost">
                    <location name="/" handler="welcome-content"/>
                    <http-invoker security-realm="ApplicationRealm"/>
                    <filter-ref name="proxy-peer" />
                    <filter-ref name="restrict-admin-console-access" />
                    <access-log pattern="%h %l %u [%t] &quot;%r&quot; %s %b &quot;%{i,Referer}&quot; &quot;%{i,User-Agent}&quot;" />
                </host>
            </server>
            <servlet-container name="default">
                <jsp-config/>
                <websockets/>
            </servlet-container>
            <handlers>
                <file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>
            </handlers>
            <filters>
                    <filter name="request-dumper" class-name="io.undertow.server.handlers.RequestDumpingHandler" module="io.undertow.core" />
                    <request-limit name="limit-connections" queue-size="100" max-concurrent-requests="1200" />
                    <filter name="proxy-peer" module="io.undertow.core" class-name="io.undertow.server.handlers.ProxyPeerAddressHandler" />
                    <expression-filter module="io.undertow.core" name="restrict-admin-console-access" expression="path-prefix(/auth/admin/master/console/) -&gt; ip-access-control(default-allow=false, acl={'127.0.0.1 allow'})" />
            </filters>
        </subsystem>