Class HeaderValidatorConfig

  • All Implemented Interfaces:
    com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, HeaderValidatorConfigOrBuilder, Serializable

    public final class HeaderValidatorConfig
    extends com.google.protobuf.GeneratedMessageV3
    implements HeaderValidatorConfigOrBuilder
     This extension validates that HTTP request and response headers are well formed according to respective RFCs.
     #. HTTP/1 header map validity according to `RFC 7230 section 3.2 <https://datatracker.ietf.org/doc/html/rfc7230#section-3.2>`_
     #. Syntax of HTTP/1 request target URI and response status
     #. HTTP/2 header map validity according to `RFC 7540 section 8.1.2 <https://datatracker.ietf.org/doc/html/rfc7540#section-8.1.2>`_
     #. Syntax of HTTP/2 pseudo headers
     #. HTTP/3 header map validity according to `RFC 9114 section 4.3  <https://www.rfc-editor.org/rfc/rfc9114.html>`_
     #. Syntax of HTTP/3 pseudo headers
     #. Syntax of Content-Length and Transfer-Encoding
     #. Validation of HTTP/1 requests with both ``Content-Length`` and ``Transfer-Encoding`` headers
     #. Normalization of the URI path according to `Normalization and Comparison <https://datatracker.ietf.org/doc/html/rfc3986#section-6>`_
        without `case normalization <https://datatracker.ietf.org/doc/html/rfc3986#section-6.2.2.1>`_
     
    Protobuf type envoy.extensions.http.header_validators.envoy_default.v3.HeaderValidatorConfig
    See Also:
    Serialized Form
    • Field Detail

      • HTTP1_PROTOCOL_OPTIONS_FIELD_NUMBER

        public static final int HTTP1_PROTOCOL_OPTIONS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • URI_PATH_NORMALIZATION_OPTIONS_FIELD_NUMBER

        public static final int URI_PATH_NORMALIZATION_OPTIONS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • RESTRICT_HTTP_METHODS_FIELD_NUMBER

        public static final int RESTRICT_HTTP_METHODS_FIELD_NUMBER
        See Also:
        Constant Field Values
    • Method Detail

      • newInstance

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

        public final com.google.protobuf.UnknownFieldSet getUnknownFields()
        Specified by:
        getUnknownFields in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getUnknownFields 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
      • hasHttp1ProtocolOptions

        public boolean hasHttp1ProtocolOptions()
        .envoy.extensions.http.header_validators.envoy_default.v3.HeaderValidatorConfig.Http1ProtocolOptions http1_protocol_options = 1;
        Specified by:
        hasHttp1ProtocolOptions in interface HeaderValidatorConfigOrBuilder
        Returns:
        Whether the http1ProtocolOptions field is set.
      • hasUriPathNormalizationOptions

        public boolean hasUriPathNormalizationOptions()
         The URI path normalization options.
         By default Envoy normalizes URI path using the default values of the :ref:`UriPathNormalizationOptions
         <envoy_v3_api_msg_extensions.http.header_validators.envoy_default.v3.HeaderValidatorConfig.UriPathNormalizationOptions>`.
         URI path transformations specified by the ``uri_path_normalization_options`` configuration can be applied to a portion
         of requests by setting the ``envoy_default_header_validator.uri_path_transformations`` runtime value.
         Caution: disabling path normalization may lead to path confusion vulnerabilities in access control or incorrect service
         selection.
         
        .envoy.extensions.http.header_validators.envoy_default.v3.HeaderValidatorConfig.UriPathNormalizationOptions uri_path_normalization_options = 2;
        Specified by:
        hasUriPathNormalizationOptions in interface HeaderValidatorConfigOrBuilder
        Returns:
        Whether the uriPathNormalizationOptions field is set.
      • getUriPathNormalizationOptions

        public HeaderValidatorConfig.UriPathNormalizationOptions getUriPathNormalizationOptions()
         The URI path normalization options.
         By default Envoy normalizes URI path using the default values of the :ref:`UriPathNormalizationOptions
         <envoy_v3_api_msg_extensions.http.header_validators.envoy_default.v3.HeaderValidatorConfig.UriPathNormalizationOptions>`.
         URI path transformations specified by the ``uri_path_normalization_options`` configuration can be applied to a portion
         of requests by setting the ``envoy_default_header_validator.uri_path_transformations`` runtime value.
         Caution: disabling path normalization may lead to path confusion vulnerabilities in access control or incorrect service
         selection.
         
        .envoy.extensions.http.header_validators.envoy_default.v3.HeaderValidatorConfig.UriPathNormalizationOptions uri_path_normalization_options = 2;
        Specified by:
        getUriPathNormalizationOptions in interface HeaderValidatorConfigOrBuilder
        Returns:
        The uriPathNormalizationOptions.
      • getUriPathNormalizationOptionsOrBuilder

        public HeaderValidatorConfig.UriPathNormalizationOptionsOrBuilder getUriPathNormalizationOptionsOrBuilder()
         The URI path normalization options.
         By default Envoy normalizes URI path using the default values of the :ref:`UriPathNormalizationOptions
         <envoy_v3_api_msg_extensions.http.header_validators.envoy_default.v3.HeaderValidatorConfig.UriPathNormalizationOptions>`.
         URI path transformations specified by the ``uri_path_normalization_options`` configuration can be applied to a portion
         of requests by setting the ``envoy_default_header_validator.uri_path_transformations`` runtime value.
         Caution: disabling path normalization may lead to path confusion vulnerabilities in access control or incorrect service
         selection.
         
        .envoy.extensions.http.header_validators.envoy_default.v3.HeaderValidatorConfig.UriPathNormalizationOptions uri_path_normalization_options = 2;
        Specified by:
        getUriPathNormalizationOptionsOrBuilder in interface HeaderValidatorConfigOrBuilder
      • getRestrictHttpMethods

        public boolean getRestrictHttpMethods()
         Restrict HTTP methods to these defined in the `RFC 7231 section 4.1 <https://datatracker.ietf.org/doc/html/rfc7231#section-4.1>`_
         Envoy will respond with 400 to requests with disallowed methods.
         By default methods with arbitrary names are accepted.
         
        bool restrict_http_methods = 3;
        Specified by:
        getRestrictHttpMethods in interface HeaderValidatorConfigOrBuilder
        Returns:
        The restrictHttpMethods.
      • 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 HeaderValidatorConfig parseFrom​(ByteBuffer data)
                                               throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

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

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

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

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

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

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

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

        protected HeaderValidatorConfig.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getParserForType

        public com.google.protobuf.Parser<HeaderValidatorConfig> 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 HeaderValidatorConfig getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder