Skip to content

Conversation

@wdauchy
Copy link
Contributor

@wdauchy wdauchy commented Jan 29, 2026

Commit Message:
This commit adds a new filter_state_key field to the proxy protocol filter's KeyValuePair configuration. When tlv_location is set to FILTER_STATE and filter_state_key is specified, TLV values are stored as individual filter state objects instead of being grouped in the shared envoy.network.proxy_protocol.tlv object.

When using RBAC or other matchers to authorize connections based on proxy protocol TLV values (e.g., AWS VPC endpoint IDs), users previously had two options:

  1. DYNAMIC_METADATA: Store TLVs in dynamic metadata and use DynamicMetadataInput with path-based access.

  2. FILTER_STATE: Store TLVs in a shared filter state object and access via CEL expressions like: filter_state["envoy.network.proxy_protocol.tlv"]["aws_vpce_id"]

The FILTER_STATE option required CEL for field access because FilterStateInput only supports top-level keys and returns the serialized object (JSON), not individual fields.

With filter_state_key, users can now store each TLV as a separate filter state entry, enabling direct access via FilterStateInput without CEL. This provides parity with DYNAMIC_METADATA + DynamicMetadataInput for users who prefer filter state storage.

Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]

@repokitteh-read-only
Copy link

As a reminder, PRs marked as draft will not be automatically assigned reviewers,
or be handled by maintainer-oncall triage.

Please mark your PR as ready when you want it to be reviewed!

🐱

Caused by: #43212 was opened by wdauchy.

see: more, trace.

This commit adds a new `filter_state_key` field to the proxy protocol
filter's `KeyValuePair` configuration. When `tlv_location` is set to
`FILTER_STATE` and `filter_state_key` is specified, TLV values are
stored as individual filter state objects instead of being grouped
in the shared `envoy.network.proxy_protocol.tlv` object.

Use Case:

When using RBAC or other matchers to authorize connections based on
proxy protocol TLV values (e.g., AWS VPC endpoint IDs), users previously
had two options:

1. DYNAMIC_METADATA: Store TLVs in dynamic metadata and use
   `DynamicMetadataInput` with path-based access.

2. FILTER_STATE: Store TLVs in a shared filter state object and
   access via CEL expressions like:
   filter_state["envoy.network.proxy_protocol.tlv"]["aws_vpce_id"]

The FILTER_STATE option required CEL for field access because
`FilterStateInput` only supports top-level keys and returns the
serialized object (JSON), not individual fields.

With `filter_state_key`, users can now store each TLV as a separate
filter state entry, enabling direct access via `FilterStateInput`
without CEL. This provides parity with DYNAMIC_METADATA + DynamicMetadataInput
for users who prefer filter state storage.

Signed-off-by: William Dauchy <[email protected]>
@wdauchy
Copy link
Contributor Author

wdauchy commented Jan 29, 2026

/retest transients

@wdauchy wdauchy marked this pull request as ready for review January 29, 2026 17:13
@wdauchy wdauchy requested a review from ggreenway as a code owner January 29, 2026 17:13
@repokitteh-read-only
Copy link

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: #43212 was ready_for_review by wdauchy.

see: more, trace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants