proxy_protocol: add filter_state_key for direct TLV access in RBAC #43212
+239
−17
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Commit Message:
This commit adds a new
filter_state_keyfield to the proxy protocol filter'sKeyValuePairconfiguration. Whentlv_locationis set toFILTER_STATEandfilter_state_keyis specified, TLV values are stored as individual filter state objects instead of being grouped in the sharedenvoy.network.proxy_protocol.tlvobject.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:
DYNAMIC_METADATA: Store TLVs in dynamic metadata and use
DynamicMetadataInputwith path-based access.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
FilterStateInputonly 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 viaFilterStateInputwithout 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:]