api: add metadata and attribute options for ext-proc
What this PR does / why we need it: Many Envoy extension are inherently capable of interaction with context attributes and dynamic metadata:
- lua:
- get/set dynamic metadata
- stream and connection attributes are available through StreamInfo
- wasm:
- get dynamic metadata
- get attributes through get_property
- set metadata not implemented yet
Attributes provide HTTP extensions with additional context (e.g. TCP, TLS and XDS attributes) that can be relevant inputs for the extension logic. Additionally, extensions may rely on well-know dynamic metadata emitted by previous filters, such as verified JWT subject and issuer. Finally, extensions may emit dynamic metadata that will be consumed by other extensions, access logs, etc.
For out-of-process extensions like ext-proc, Envoy must be explicitly configured to allow access to attributes and metadata and define the scope of access.
This API will allow users to define:
- Which attributes are sent to the external processor as context
- Which Dynamic Metadata namespaces are sent to the external processor as context
- Which Dynamic Metadata namespaces the external process can emit metadata to
Which issue(s) this PR fixes: Relates to #3170