Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api: ext-proc attributes #4794

Merged
merged 2 commits into from
Nov 28, 2024
Merged

Conversation

guydc
Copy link
Contributor

@guydc guydc commented Nov 27, 2024

What type of PR is this?

Following the discussion at KubeCon NA : https://docs.google.com/document/d/1PS5xLA0IDbj6McHIXXhShn51Zq37WvuistaidBPeHoE/edit?tab=t.0

Scope and Motivation

This API will allow users to define which attributes are sent to the external processor as context for requests/responses.

Attributes provide HTTP extensions with additional context (e.g. TCP, TLS and XDS attributes) that can be relevant inputs for the extension logic.

Comparison to other extension options

Many Envoy extensions are inherently capable of interaction with context attributes:

  • lua: stream and connection attributes are available through StreamInfo
  • wasm: get attributes through get_property

For out-of-process extensions like ext-proc, Envoy must be explicitly configured to allow access to attributes and and define the scope of access. With the increase in ext-proc use cases, such as the llm-instance-gateway, envoy-ai-gateway and externally-deployed WAFs, there is a greater need to provide extension with context.

Security Considerations

Most attributes are scoped to the current connection or stream by their prefix (connection.*, request.*, response.*), with the exception of xds.* attributes such as xds.listener_metadata, xds.upstream_host_metadata, xds.node and generic metadata and filter state access attributes.

Related Work

Release Notes: Yes

Signed-off-by: Guy Daich <[email protected]>
@guydc guydc requested a review from a team as a code owner November 27, 2024 20:49
@guydc guydc mentioned this pull request Nov 27, 2024
Copy link

codecov bot commented Nov 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.60%. Comparing base (a383dd9) to head (bcd6d76).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4794      +/-   ##
==========================================
- Coverage   65.61%   65.60%   -0.02%     
==========================================
  Files         211      211              
  Lines       31989    31989              
==========================================
- Hits        20991    20987       -4     
- Misses       9760     9762       +2     
- Partials     1238     1240       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

arkodg
arkodg previously approved these changes Nov 27, 2024
Copy link
Contributor

@arkodg arkodg left a comment

Choose a reason for hiding this comment

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

LGTM thanks !

@arkodg arkodg requested review from a team November 27, 2024 21:19
@arkodg
Copy link
Contributor

arkodg commented Nov 27, 2024

curious what happens when something like connection.unknown is used ? is it a no-op ?

@guydc
Copy link
Contributor Author

guydc commented Nov 27, 2024

curious what happens when something like connection.unknown is used ? is it a no-op ?

Yes, it's just ignored and not passed. Config is still accepted by the proxy.

Signed-off-by: Guy Daich <[email protected]>
@guydc guydc merged commit 98457b5 into envoyproxy:main Nov 28, 2024
27 checks passed
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.

3 participants