.. _well_known_dynamic_metadata: Well Known Dynamic Metadata =========================== Filters can emit dynamic metadata via the *setDynamicMetadata* routine in the :repo:`StreamInfo ` interface on a :repo:`Connection `. This metadata emitted by a filter can be consumed by other filters and useful features can be built by stacking such filters. For example, a logging filter can consume dynamic metadata from an RBAC filter to log details about runtime shadow rule behavior. Another example is where an RBAC filter permits/restricts MySQL/MongoDB operations by looking at the operational metadata emitted by the MongoDB filter. The following Envoy filters emit dynamic metadata that other filters can leverage. * :ref:`External Authorization Filter ` * :ref:`External Authorization Network Filter ` * :ref:`Header-To-Metadata Filter ` * :ref:`JWT Authentication Filter ` for the extracted :ref:`header ` and :ref:`payload ` * :ref:`Mongo Proxy Filter ` * :ref:`MySQL Proxy Filter ` * :ref:`Postgres Proxy Filter ` * :ref:`Role Based Access Control (RBAC) Filter ` * :ref:`Role Based Access Control (RBAC) Network Filter ` * :ref:`ZooKeeper Proxy Filter ` * :ref:`MCP Filter ` .. _config_http_filters_mcp_dynamic_metadata: MCP Filter Dynamic Metadata --------------------------- The :ref:`MCP filter ` emits the following dynamic metadata under the ``envoy.filters.http.mcp`` namespace when processing MCP (Model Context Protocol) JSON-RPC requests: .. csv-table:: :header: Name, Type, Description :widths: 1, 1, 4 method, string, "The JSON-RPC method name (e.g., ``initialize``, ``tools/list``, ``tools/call``)." id, number, "The JSON-RPC request ID." params, struct, "The params object from the JSON-RPC request containing method-specific parameters." This metadata is consumed internally by the :ref:`MCP router filter ` for request routing and aggregation. It can also be used by other filters such as RBAC for policy enforcement or access logging. The following Envoy filters can be configured to consume dynamic metadata emitted by other filters. * :ref:`External Authorization Filter via the metadata context namespaces ` * :ref:`RateLimit Filter limit override ` * :ref:`Original destination listener filter ` * :ref:`TLS Inspector listener filter ` .. _shared_dynamic_metadata: Shared Dynamic Metadata ----------------------- Dynamic metadata that is set by multiple filters is placed in the common key namespace ``envoy.common``. Refer to the corresponding rules when setting this metadata. .. csv-table:: :header: Name, Type, Description, Rules :widths: 1, 1, 3, 3 access_log_hint, boolean, Whether access loggers should log the request., "When this metadata is already set: A ``true`` value should not be overwritten by a ``false`` value, while a ``false`` value can be overwritten by a ``true`` value." The following Envoy filters emit shared dynamic metadata. * :ref:`Role Based Access Control (RBAC) Filter ` * :ref:`Role Based Access Control (RBAC) Network Filter ` The following filters consume shared dynamic metadata. * :ref:`Metadata Access Log Filter`