Class DynamicModuleListenerFilter

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
io.envoyproxy.envoy.extensions.filters.listener.dynamic_modules.v3.DynamicModuleListenerFilter
All Implemented Interfaces:
com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, DynamicModuleListenerFilterOrBuilder, Serializable

public final class DynamicModuleListenerFilter extends com.google.protobuf.GeneratedMessageV3 implements DynamicModuleListenerFilterOrBuilder
 Configuration of the listener filter for dynamic modules. This filter allows loading shared object
 files that can be loaded via dlopen by the listener filter.

 A module can be loaded by multiple listener filters, hence the program can be structured in a way
 that the module is loaded only once and shared across multiple filters providing multiple
 functionalities.

 Unlike network filters which operate on established TCP connections, listener filters
 work with raw accepted sockets BEFORE a Connection object is created. The filter can:

 * Inspect initial bytes to detect protocols (TLS, HTTP, PostgreSQL, etc.).
 * Set socket properties (SNI, ALPN, transport protocol, fingerprints).
 * Modify connection addresses (original destination restoration).
 * Set dynamic metadata and filter state for downstream filters.
 * Rate limit incoming connections.
 
Protobuf type envoy.extensions.filters.listener.dynamic_modules.v3.DynamicModuleListenerFilter
See Also:
  • Field Details

    • DYNAMIC_MODULE_CONFIG_FIELD_NUMBER

      public static final int DYNAMIC_MODULE_CONFIG_FIELD_NUMBER
      See Also:
    • FILTER_NAME_FIELD_NUMBER

      public static final int FILTER_NAME_FIELD_NUMBER
      See Also:
    • FILTER_CONFIG_FIELD_NUMBER

      public static final int FILTER_CONFIG_FIELD_NUMBER
      See Also:
  • Method Details

    • newInstance

      protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
      Overrides:
      newInstance in class com.google.protobuf.GeneratedMessageV3
    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
    • hasDynamicModuleConfig

      public boolean hasDynamicModuleConfig()
       Specifies the shared-object level configuration.
       
      .envoy.extensions.dynamic_modules.v3.DynamicModuleConfig dynamic_module_config = 1;
      Specified by:
      hasDynamicModuleConfig in interface DynamicModuleListenerFilterOrBuilder
      Returns:
      Whether the dynamicModuleConfig field is set.
    • getDynamicModuleConfig

      public DynamicModuleConfig getDynamicModuleConfig()
       Specifies the shared-object level configuration.
       
      .envoy.extensions.dynamic_modules.v3.DynamicModuleConfig dynamic_module_config = 1;
      Specified by:
      getDynamicModuleConfig in interface DynamicModuleListenerFilterOrBuilder
      Returns:
      The dynamicModuleConfig.
    • getDynamicModuleConfigOrBuilder

      public DynamicModuleConfigOrBuilder getDynamicModuleConfigOrBuilder()
       Specifies the shared-object level configuration.
       
      .envoy.extensions.dynamic_modules.v3.DynamicModuleConfig dynamic_module_config = 1;
      Specified by:
      getDynamicModuleConfigOrBuilder in interface DynamicModuleListenerFilterOrBuilder
    • getFilterName

      public String getFilterName()
       The name for this filter configuration. This can be used to distinguish between different
       filter implementations inside a dynamic module. For example, a module can have completely
       different filter implementations (TLS inspector, rate limiter, proxy protocol parser).
       When Envoy receives this configuration, it passes the ``filter_name`` to the dynamic module's
       listener filter config init function together with the ``filter_config``. That way a module
       can decide which in-module filter implementation to use based on the name at load time.
       
      string filter_name = 2;
      Specified by:
      getFilterName in interface DynamicModuleListenerFilterOrBuilder
      Returns:
      The filterName.
    • getFilterNameBytes

      public com.google.protobuf.ByteString getFilterNameBytes()
       The name for this filter configuration. This can be used to distinguish between different
       filter implementations inside a dynamic module. For example, a module can have completely
       different filter implementations (TLS inspector, rate limiter, proxy protocol parser).
       When Envoy receives this configuration, it passes the ``filter_name`` to the dynamic module's
       listener filter config init function together with the ``filter_config``. That way a module
       can decide which in-module filter implementation to use based on the name at load time.
       
      string filter_name = 2;
      Specified by:
      getFilterNameBytes in interface DynamicModuleListenerFilterOrBuilder
      Returns:
      The bytes for filterName.
    • hasFilterConfig

      public boolean hasFilterConfig()
       The configuration for the filter chosen by ``filter_name``. This is passed to the module's
       listener filter initialization function. Together with the ``filter_name``, the module can
       decide which in-module filter implementation to use and fine-tune the behavior of the filter.
      
       For example, if a module has two filter implementations, one for TLS inspection and one for
       rate limiting, ``filter_name`` is used to choose either TLS or rate limiting. The ``filter_config``
       can be used to configure the TLS inspection options or the rate limiting parameters.
      
       ``google.protobuf.Struct`` is serialized as JSON before passing it to the module.
       ``google.protobuf.BytesValue`` and ``google.protobuf.StringValue`` are passed directly
       without the wrapper.
      
       .. code-block:: yaml
      
        # Passing a string value
        filter_config:
          "@type": "type.googleapis.com/google.protobuf.StringValue"
          value: hello
      
        # Passing raw bytes
        filter_config:
          "@type": "type.googleapis.com/google.protobuf.BytesValue"
          value: aGVsbG8=  # echo -n "hello" | base64
       
      .google.protobuf.Any filter_config = 3;
      Specified by:
      hasFilterConfig in interface DynamicModuleListenerFilterOrBuilder
      Returns:
      Whether the filterConfig field is set.
    • getFilterConfig

      public com.google.protobuf.Any getFilterConfig()
       The configuration for the filter chosen by ``filter_name``. This is passed to the module's
       listener filter initialization function. Together with the ``filter_name``, the module can
       decide which in-module filter implementation to use and fine-tune the behavior of the filter.
      
       For example, if a module has two filter implementations, one for TLS inspection and one for
       rate limiting, ``filter_name`` is used to choose either TLS or rate limiting. The ``filter_config``
       can be used to configure the TLS inspection options or the rate limiting parameters.
      
       ``google.protobuf.Struct`` is serialized as JSON before passing it to the module.
       ``google.protobuf.BytesValue`` and ``google.protobuf.StringValue`` are passed directly
       without the wrapper.
      
       .. code-block:: yaml
      
        # Passing a string value
        filter_config:
          "@type": "type.googleapis.com/google.protobuf.StringValue"
          value: hello
      
        # Passing raw bytes
        filter_config:
          "@type": "type.googleapis.com/google.protobuf.BytesValue"
          value: aGVsbG8=  # echo -n "hello" | base64
       
      .google.protobuf.Any filter_config = 3;
      Specified by:
      getFilterConfig in interface DynamicModuleListenerFilterOrBuilder
      Returns:
      The filterConfig.
    • getFilterConfigOrBuilder

      public com.google.protobuf.AnyOrBuilder getFilterConfigOrBuilder()
       The configuration for the filter chosen by ``filter_name``. This is passed to the module's
       listener filter initialization function. Together with the ``filter_name``, the module can
       decide which in-module filter implementation to use and fine-tune the behavior of the filter.
      
       For example, if a module has two filter implementations, one for TLS inspection and one for
       rate limiting, ``filter_name`` is used to choose either TLS or rate limiting. The ``filter_config``
       can be used to configure the TLS inspection options or the rate limiting parameters.
      
       ``google.protobuf.Struct`` is serialized as JSON before passing it to the module.
       ``google.protobuf.BytesValue`` and ``google.protobuf.StringValue`` are passed directly
       without the wrapper.
      
       .. code-block:: yaml
      
        # Passing a string value
        filter_config:
          "@type": "type.googleapis.com/google.protobuf.StringValue"
          value: hello
      
        # Passing raw bytes
        filter_config:
          "@type": "type.googleapis.com/google.protobuf.BytesValue"
          value: aGVsbG8=  # echo -n "hello" | base64
       
      .google.protobuf.Any filter_config = 3;
      Specified by:
      getFilterConfigOrBuilder in interface DynamicModuleListenerFilterOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessageV3
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessageV3
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static DynamicModuleListenerFilter parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static DynamicModuleListenerFilter parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static DynamicModuleListenerFilter parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static DynamicModuleListenerFilter parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static DynamicModuleListenerFilter parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static DynamicModuleListenerFilter parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static DynamicModuleListenerFilter parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static DynamicModuleListenerFilter parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static DynamicModuleListenerFilter parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static DynamicModuleListenerFilter parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static DynamicModuleListenerFilter parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static DynamicModuleListenerFilter parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public DynamicModuleListenerFilter.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static DynamicModuleListenerFilter.Builder newBuilder()
    • newBuilder

    • toBuilder

      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected DynamicModuleListenerFilter.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
      Specified by:
      newBuilderForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstance

      public static DynamicModuleListenerFilter getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<DynamicModuleListenerFilter> parser()
    • getParserForType

      public com.google.protobuf.Parser<DynamicModuleListenerFilter> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstanceForType

      public DynamicModuleListenerFilter getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder