<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Introduction to Http Filter on Apache Dubbo</title><link>https://deploy-preview-3199--dubbo.netlify.app/en/overview/reference/pixiu/other/user/httpfilter/</link><description>Recent content in Introduction to Http Filter on Apache Dubbo</description><generator>Hugo</generator><language>en</language><atom:link href="https://deploy-preview-3199--dubbo.netlify.app/en/overview/reference/pixiu/other/user/httpfilter/index.xml" rel="self" type="application/rss+xml"/><item><title>Introduction to Dubbo HttpFilter</title><link>https://deploy-preview-3199--dubbo.netlify.app/en/overview/reference/pixiu/other/user/httpfilter/dubbo/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-3199--dubbo.netlify.app/en/overview/reference/pixiu/other/user/httpfilter/dubbo/</guid><description>&lt;h1 id="using-http-to-call-dubbo">Using HTTP to Call Dubbo&lt;/h1>
&lt;h2 id="define-pixiu-configuration-file">Define Pixiu Configuration File&lt;/h2>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">static_resources&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">listeners&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#268bd2">name&lt;/span>: &lt;span style="color:#2aa198">&amp;#34;http-listener&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">protocol_type&lt;/span>: &lt;span style="color:#2aa198">&amp;#34;HTTP&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">address&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">socket_address&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">address&lt;/span>: &lt;span style="color:#2aa198">&amp;#34;0.0.0.0&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">port&lt;/span>: &lt;span style="color:#2aa198">8888&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">filter_chains&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">filters&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#268bd2">name&lt;/span>: dgp.filter.httpconnectionmanager
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">config&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">route_config&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">routes&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#268bd2">match&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">prefix&lt;/span>: &lt;span style="color:#2aa198">&amp;#34;*&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">http_filters&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#268bd2">name&lt;/span>: dgp.filter.http.dubboproxy
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">config&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">dubboProxyConfig&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">auto_resolve&lt;/span>: &lt;span style="color:#cb4b16">true&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">registries&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#2aa198">&amp;#34;zookeeper&amp;#34;&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">protocol&lt;/span>: &lt;span style="color:#2aa198">&amp;#34;zookeeper&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">timeout&lt;/span>: &lt;span style="color:#2aa198">&amp;#34;3s&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">address&lt;/span>: &lt;span style="color:#2aa198">&amp;#34;127.0.0.1:2181&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">username&lt;/span>: &lt;span style="color:#2aa198">&amp;#34;&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">password&lt;/span>: &lt;span style="color:#2aa198">&amp;#34;&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">timeout_config&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">connect_timeout&lt;/span>: 5s
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">request_timeout&lt;/span>: 5s
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">clusters&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#268bd2">name&lt;/span>: &lt;span style="color:#2aa198">&amp;#34;dubbo-server&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">lb_policy&lt;/span>: &lt;span style="color:#2aa198">&amp;#34;lb&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">endpoints&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#268bd2">id&lt;/span>: &lt;span style="color:#2aa198">1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">socket_address&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">address&lt;/span>: &lt;span style="color:#2aa198">127.0.0.1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">port&lt;/span>: &lt;span style="color:#2aa198">20000&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">shutdown_config&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">timeout&lt;/span>: &lt;span style="color:#2aa198">&amp;#34;60s&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">step_timeout&lt;/span>: &lt;span style="color:#2aa198">&amp;#34;10s&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">reject_policy&lt;/span>: &lt;span style="color:#2aa198">&amp;#34;immediacy&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="prepare-dubbo-service">Prepare Dubbo Service&lt;/h2>
&lt;h3 id="start-zookeeper-ensure-docker-and-compose-are-prepared-in-advance-if-available-locally-this-can-be-ignored">Start zookeeper, ensure docker and compose are prepared in advance. If available locally, this can be ignored.&lt;/h3>
&lt;p>&lt;a href="https://github.com/apache/dubbo-go-pixiu-samples/tree/main/dubbohttpproxy/server/dubbo/app">docker-compose.yml&lt;/a>&lt;/p></description></item><item><title>Introduction to RateLimiter</title><link>https://deploy-preview-3199--dubbo.netlify.app/en/overview/reference/pixiu/other/user/httpfilter/ratelimit/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-3199--dubbo.netlify.app/en/overview/reference/pixiu/other/user/httpfilter/ratelimit/</guid><description>&lt;p>Welcome to contribute to this document.&lt;/p></description></item><item><title>Metric Introduction</title><link>https://deploy-preview-3199--dubbo.netlify.app/en/overview/reference/pixiu/other/user/httpfilter/metric/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-3199--dubbo.netlify.app/en/overview/reference/pixiu/other/user/httpfilter/metric/</guid><description>&lt;h1 id="metric-reporter-filter-dgpfilterhttpmetric">Metric Reporter Filter (dgp.filter.http.metric)&lt;/h1>
&lt;hr>
&lt;h2 id="overview">Overview&lt;/h2>
&lt;p>The &lt;code>dgp.filter.http.metric&lt;/code> filter provides unified metric reporting for Pixiu gateway. It consolidates the functionality of two previous filters (&lt;code>dgp.filter.http.metric&lt;/code> and &lt;code>dgp.filter.http.prometheusmetric&lt;/code>) and supports both &lt;strong>Pull&lt;/strong> and &lt;strong>Push&lt;/strong> modes with OpenTelemetry integration.&lt;/p>
&lt;blockquote>
&lt;p>&lt;strong>Note&lt;/strong>: This filter defaults to &lt;strong>Push&lt;/strong> mode. To use Pull mode, explicitly specify &lt;code>mode: &amp;quot;pull&amp;quot;&lt;/code> in the configuration.&lt;/p>
&lt;/blockquote>
&lt;h3 id="key-features">Key Features&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>Unified Entry Point&lt;/strong>: Single filter for both Pull and Push modes&lt;/li>
&lt;li>&lt;strong>OpenTelemetry Integration&lt;/strong>: Pull mode uses OpenTelemetry for metrics (consistent with Pixiu Tracing)&lt;/li>
&lt;li>&lt;strong>Context-based Extension&lt;/strong>: Other filters can record custom metrics via &lt;code>HttpContext.RecordMetric()&lt;/code>&lt;/li>
&lt;li>&lt;strong>Backward Compatible&lt;/strong>: Reuses logic from original filters&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="modes">Modes&lt;/h2>
&lt;h3 id="pull-mode-recommended">Pull Mode (Recommended)&lt;/h3>
&lt;p>Metrics are exposed via HTTP endpoint for Prometheus to scrape.&lt;/p></description></item><item><title>Opa Introduction</title><link>https://deploy-preview-3199--dubbo.netlify.app/en/overview/reference/pixiu/other/user/httpfilter/opa/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-3199--dubbo.netlify.app/en/overview/reference/pixiu/other/user/httpfilter/opa/</guid><description>&lt;h1 id="opa-filter-dgpfilterhttpopa">OPA Filter (dgp.filter.http.opa)&lt;/h1>
&lt;hr>
&lt;h2 id="english">English&lt;/h2>
&lt;h3 id="overview">Overview&lt;/h3>
&lt;p>The &lt;code>dgp.filter.http.opa&lt;/code> filter delegates authorization decisions to Open Policy Agent (OPA) via a Rego policy. This filter evaluates requests and determines whether to allow or deny based on the policy defined in Rego. The policy is provided as an inline Rego module and evaluated using OPA&amp;rsquo;s built-in query engine.&lt;/p>
&lt;h3 id="what-the-filter-does-current-behavior">What the filter does (current behavior)&lt;/h3>
&lt;ul>
&lt;li>Loads a Rego &lt;strong>module string&lt;/strong> from &lt;code>config.policy&lt;/code>.&lt;/li>
&lt;li>Builds a Rego &lt;strong>query&lt;/strong> from &lt;code>config.entrypoint&lt;/code>.&lt;/li>
&lt;li>For each incoming request, constructs an &lt;code>input&lt;/code> object and evaluates the query.&lt;/li>
&lt;li>If the query result is &lt;code>true&lt;/code>, the request is allowed. Otherwise, the request is denied.&lt;/li>
&lt;/ul>
&lt;blockquote>
&lt;p>There is &lt;strong>no built-in support&lt;/strong> for external policy files or URIs, custom HTTP status codes, or custom error bodies.&lt;/p></description></item><item><title>SAML Introduction</title><link>https://deploy-preview-3199--dubbo.netlify.app/en/overview/reference/pixiu/other/user/httpfilter/saml/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-3199--dubbo.netlify.app/en/overview/reference/pixiu/other/user/httpfilter/saml/</guid><description>&lt;h1 id="saml-auth-filter-dgpfilterhttpauthsaml">SAML Auth Filter (dgp.filter.http.auth.saml)&lt;/h1>
&lt;hr>
&lt;h2 id="english">English&lt;/h2>
&lt;h3 id="overview">Overview&lt;/h3>
&lt;p>The &lt;code>dgp.filter.http.auth.saml&lt;/code> filter allows Pixiu to act as a SAML Service Provider (SP).&lt;/p>
&lt;p>With this filter enabled, Pixiu can:&lt;/p>
&lt;ul>
&lt;li>expose SP metadata for IdP registration&lt;/li>
&lt;li>redirect unauthenticated browser requests to the IdP login page&lt;/li>
&lt;li>receive the SAML response on the ACS endpoint&lt;/li>
&lt;li>create a session cookie after a successful login&lt;/li>
&lt;li>forward selected SAML assertion attributes to upstream services as HTTP headers&lt;/li>
&lt;/ul>
&lt;p>Typical IdPs include Keycloak, Okta, and Microsoft Entra ID.&lt;/p></description></item><item><title>Circuit Breaker Introduction</title><link>https://deploy-preview-3199--dubbo.netlify.app/en/overview/reference/pixiu/other/user/httpfilter/hystrix/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-3199--dubbo.netlify.app/en/overview/reference/pixiu/other/user/httpfilter/hystrix/</guid><description>&lt;p>Welcome to contribute to supplement this documentation.&lt;/p></description></item></channel></rss>