You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<tdclass="tableblock halign-left valign-top"><pclass="tableblock">See <ahref="https://www.keycloak.org/nightly/securing-apps/mcp-authz-server">Integrating with Model Context Protocol (MCP)</a>.</p></td>
237
237
</tr>
238
+
<tr>
239
+
<tdclass="tableblock halign-left valign-top"><pclass="tableblock"><ahref="https://openid.net/specs/authorization-api-1_0.html">OpenID AuthZEN Authorization API 1.0</a></p></td>
<td>The <code>http-request del-header <HEADER></code> entries remove particular HTTP headers from the incoming requests before passing them on.
179
-
The example shows removing of the <code>Forwarded</code> and <code>x-forwarded-</code> headers in order to prevent a security vulnerability to IP spoofing attacks, where the client is able to impersonate the proxy or other services.</td>
190
+
<td>The <code>http-request del-header</code> directives remove HTTP headers from incoming requests before forwarding them to Keycloak.
191
+
This prevents external clients from spoofing proxy identity headers (such as <code>Forwarded</code>, <code>X-Forwarded-*</code>, and <code>X-Real-IP</code>), injecting authentication-related headers (such as <code>X-Forwarded-Access-Token</code>), or injecting distributed tracing context (such as W3C Trace Context, Zipkin B3, or Jaeger headers).
192
+
For the full list of recommended headers to filter, see the <ahref="https://www.keycloak.org/nightly/server/reverseproxy#header-filtering-recommendations">Configuring a reverse proxy</a> guide.</td>
<p>When using TLS re-encrypt, the proxy can inspect and modify HTTP traffic.
458
+
Use this capability to prevent external clients from injecting headers that affect identity resolution, access control, or observability.</p>
459
+
</div>
460
+
<divclass="admonitionblock note">
461
+
<table>
462
+
<tr>
463
+
<tdclass="icon">
464
+
<iclass="fa icon-note" title="Note"></i>
465
+
</td>
466
+
<tdclass="content">
467
+
The following assumes that there is only a single proxy layer in front of Keycloak, and that it is not receiving traffic from another trusted proxy layer with trusted headers.
468
+
</td>
469
+
</tr>
470
+
</table>
471
+
</div>
472
+
<divclass="paragraph">
473
+
<p>Configure the proxy to apply the following rules to incoming requests before forwarding them to Keycloak:</p>
474
+
</div>
475
+
<divclass="ulist">
476
+
<ul>
477
+
<li>
478
+
<p><strong>Overwrite</strong><code>Forwarded</code> and <code>X-Forwarded-*</code> headers with the proxy’s own values rather than removing them, because Keycloak relies on these headers when <code>--proxy-headers</code> is configured.</p>
479
+
</li>
480
+
<li>
481
+
<p><strong>Strip</strong> all other headers listed below entirely.</p>
<tdclass="tableblock halign-left valign-top"><pclass="tableblock">Clients can spoof their IP address, protocol, or host, affecting access control and audit logging.
503
+
<strong>Overwrite</strong> these headers rather than stripping them.</p></td>
0 commit comments