Skip to content

ext_authz: document the limitations of filter_enabled_metadata#42462

Merged
botengyao merged 5 commits intoenvoyproxy:mainfrom
agrawroh:docs-eauthz-fm
Dec 12, 2025
Merged

ext_authz: document the limitations of filter_enabled_metadata#42462
botengyao merged 5 commits intoenvoyproxy:mainfrom
agrawroh:docs-eauthz-fm

Conversation

@agrawroh
Copy link
Copy Markdown
Member

@agrawroh agrawroh commented Dec 8, 2025

Description

This PR clearly documents the limitations of using filter_enabled_metadata in the ExtAuthZ filter and that it doesn't work if the filter itself is disabled in the main filter chain or using a per-route override. We have also provided examples using ExtensionWithMatcher which should be the recommended way to invoke filters conditionally.

The previous attempt which broke some expectations is reverted.

Fix #41501


Commit Message: ext_authz: document the limitations of filter_enabled_metadata
Additional Description: Add documentation for describing the limitations around using filter_enabled_metadata and provide workaround examples using ExtensionWithMatcher.
Risk Level: N/A
Testing: CI
Docs Changes: Added
Release Notes: N/A

@repokitteh-read-only
Copy link
Copy Markdown

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to (api/envoy/|docs/root/api-docs/).
envoyproxy/api-shepherds assignee is @adisuissa
CC @envoyproxy/api-watchers: FYI only for changes made to (api/envoy/|docs/root/api-docs/).

🐱

Caused by: #42462 was opened by agrawroh.

see: more, trace.

adisuissa
adisuissa previously approved these changes Dec 8, 2025
Copy link
Copy Markdown
Contributor

@adisuissa adisuissa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!
/lgtm api
It may be better to get someone with more experience with ExtensionWithMatcher to validate the correctness of the filters instantiations.

Signed-off-by: Rohit Agrawal <rohit.agrawal@databricks.com>
Signed-off-by: Rohit Agrawal <rohit.agrawal@databricks.com>
Signed-off-by: Rohit Agrawal <rohit.agrawal@databricks.com>
Comment thread docs/root/configuration/http/http_filters/ext_authz_filter.rst Outdated
Signed-off-by: Rohit Agrawal <rohit.agrawal@databricks.com>
@agrawroh
Copy link
Copy Markdown
Member Author

agrawroh commented Dec 9, 2025

@adisuissa Could you please take another look at this?

Copy link
Copy Markdown
Member

@botengyao botengyao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks and lgtm! ExtensionWithMatcher is the recommended way for filter.

@botengyao botengyao merged commit 2cdf0a1 into envoyproxy:main Dec 12, 2025
26 checks passed
MayorFaj pushed a commit to MayorFaj/envoy that referenced this pull request Dec 15, 2025
…proxy#42462)

## Description

This PR clearly documents the limitations of using
`filter_enabled_metadata` in the ExtAuthZ filter and that it doesn't
work if the filter itself is disabled in the main filter chain or using
a per-route override. We have also provided examples using
`ExtensionWithMatcher` which should be the recommended way to invoke
filters conditionally.

The [previous attempt](envoyproxy#41937)
which broke some expectations is reverted.

Fix envoyproxy#41501

---

**Commit Message:** ext_authz: document the limitations of
filter_enabled_metadata
**Additional Description:** Add documentation for describing the
limitations around using `filter_enabled_metadata` and provide
workaround examples using `ExtensionWithMatcher`.
**Risk Level:** N/A
**Testing:** CI
**Docs Changes:** Added
**Release Notes:** N/A

---------

Signed-off-by: Rohit Agrawal <rohit.agrawal@databricks.com>
Signed-off-by: MayorFaj <mayorfaj@gmail.com>
grnmeira pushed a commit to grnmeira/envoy that referenced this pull request Mar 20, 2026
…proxy#42462)

## Description

This PR clearly documents the limitations of using
`filter_enabled_metadata` in the ExtAuthZ filter and that it doesn't
work if the filter itself is disabled in the main filter chain or using
a per-route override. We have also provided examples using
`ExtensionWithMatcher` which should be the recommended way to invoke
filters conditionally.

The [previous attempt](envoyproxy#41937)
which broke some expectations is reverted.

Fix envoyproxy#41501

---

**Commit Message:** ext_authz: document the limitations of
filter_enabled_metadata
**Additional Description:** Add documentation for describing the
limitations around using `filter_enabled_metadata` and provide
workaround examples using `ExtensionWithMatcher`.
**Risk Level:** N/A
**Testing:** CI
**Docs Changes:** Added
**Release Notes:** N/A

---------

Signed-off-by: Rohit Agrawal <rohit.agrawal@databricks.com>
Signed-off-by: Gustavo <grnmeira@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ext_authz filter_enabled_metadata is not honored when metadata is set by a preceding Lua filter

3 participants