Class HeaderMutationRules
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
io.envoyproxy.envoy.config.common.mutation_rules.v3.HeaderMutationRules
- All Implemented Interfaces:
com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,HeaderMutationRulesOrBuilder,Serializable
public final class HeaderMutationRules
extends com.google.protobuf.GeneratedMessageV3
implements HeaderMutationRulesOrBuilder
The HeaderMutationRules structure specifies what headers may be manipulated by a processing filter. This set of rules makes it possible to control which modifications a filter may make. By default, an external processing server may add, modify, or remove any header except for an "Envoy internal" header (which is typically denoted by an x-envoy prefix) or specific headers that may affect further filter processing: * ``host`` * ``:authority`` * ``:scheme`` * ``:method`` Every attempt to add, change, append, or remove a header will be tested against the rules here. Disallowed header mutations will be ignored unless ``disallow_is_error`` is set to true. Attempts to remove headers are further constrained -- regardless of the settings, system-defined headers (that start with ``:``) and the ``host`` header may never be removed. In addition, a counter will be incremented whenever a mutation is rejected. In the ext_proc filter, that counter is named ``rejected_header_mutations``. [#next-free-field: 8]Protobuf type
envoy.config.common.mutation_rules.v3.HeaderMutationRules- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classThe HeaderMutationRules structure specifies what headers may be manipulated by a processing filter.Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessageV3
alwaysUseFieldBuilders, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleancom.google.protobuf.BoolValueBy default, certain headers that could affect processing of subsequent filters or request routing cannot be modified.com.google.protobuf.BoolValueOrBuilderBy default, certain headers that could affect processing of subsequent filters or request routing cannot be modified.com.google.protobuf.BoolValueIf true, allow modification of envoy internal headers.com.google.protobuf.BoolValueOrBuilderIf true, allow modification of envoy internal headers.If set, specifically allow any header that matches this regular expression.If set, specifically allow any header that matches this regular expression.static HeaderMutationRulesstatic final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.BoolValueIf true, prevent modifications of all header values, regardless of any other settings.com.google.protobuf.BoolValueOrBuilderIf true, prevent modifications of all header values, regardless of any other settings.If set, specifically disallow any header that matches this regular expression regardless of any other settings.If set, specifically disallow any header that matches this regular expression regardless of any other settings.com.google.protobuf.BoolValueIf true, and if the rules in this list cause a header mutation to be disallowed, then the filter using this configuration will terminate the request with a 500 error.com.google.protobuf.BoolValueOrBuilderIf true, and if the rules in this list cause a header mutation to be disallowed, then the filter using this configuration will terminate the request with a 500 error.com.google.protobuf.BoolValueIf true, prevent modification of any system header, defined as a header that starts with a ``:`` character, regardless of any other settings.com.google.protobuf.BoolValueOrBuilderIf true, prevent modification of any system header, defined as a header that starts with a ``:`` character, regardless of any other settings.com.google.protobuf.Parser<HeaderMutationRules>intbooleanBy default, certain headers that could affect processing of subsequent filters or request routing cannot be modified.booleanIf true, allow modification of envoy internal headers.booleanIf set, specifically allow any header that matches this regular expression.booleanIf true, prevent modifications of all header values, regardless of any other settings.booleanIf set, specifically disallow any header that matches this regular expression regardless of any other settings.booleanIf true, and if the rules in this list cause a header mutation to be disallowed, then the filter using this configuration will terminate the request with a 500 error.booleanIf true, prevent modification of any system header, defined as a header that starts with a ``:`` character, regardless of any other settings.inthashCode()protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanstatic HeaderMutationRules.Builderstatic HeaderMutationRules.BuildernewBuilder(HeaderMutationRules prototype) protected HeaderMutationRules.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) static HeaderMutationRulesparseDelimitedFrom(InputStream input) static HeaderMutationRulesparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static HeaderMutationRulesparseFrom(byte[] data) static HeaderMutationRulesparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static HeaderMutationRulesparseFrom(com.google.protobuf.ByteString data) static HeaderMutationRulesparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static HeaderMutationRulesparseFrom(com.google.protobuf.CodedInputStream input) static HeaderMutationRulesparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static HeaderMutationRulesparseFrom(InputStream input) static HeaderMutationRulesparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static HeaderMutationRulesparseFrom(ByteBuffer data) static HeaderMutationRulesparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<HeaderMutationRules>parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
ALLOW_ALL_ROUTING_FIELD_NUMBER
public static final int ALLOW_ALL_ROUTING_FIELD_NUMBER- See Also:
-
ALLOW_ENVOY_FIELD_NUMBER
public static final int ALLOW_ENVOY_FIELD_NUMBER- See Also:
-
DISALLOW_SYSTEM_FIELD_NUMBER
public static final int DISALLOW_SYSTEM_FIELD_NUMBER- See Also:
-
DISALLOW_ALL_FIELD_NUMBER
public static final int DISALLOW_ALL_FIELD_NUMBER- See Also:
-
ALLOW_EXPRESSION_FIELD_NUMBER
public static final int ALLOW_EXPRESSION_FIELD_NUMBER- See Also:
-
DISALLOW_EXPRESSION_FIELD_NUMBER
public static final int DISALLOW_EXPRESSION_FIELD_NUMBER- See Also:
-
DISALLOW_IS_ERROR_FIELD_NUMBER
public static final int DISALLOW_IS_ERROR_FIELD_NUMBER- See Also:
-
-
Method Details
-
newInstance
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
hasAllowAllRouting
public boolean hasAllowAllRouting()By default, certain headers that could affect processing of subsequent filters or request routing cannot be modified. These headers are ``host``, ``:authority``, ``:scheme``, and ``:method``. Setting this parameter to true allows these headers to be modified as well.
.google.protobuf.BoolValue allow_all_routing = 1;- Specified by:
hasAllowAllRoutingin interfaceHeaderMutationRulesOrBuilder- Returns:
- Whether the allowAllRouting field is set.
-
getAllowAllRouting
public com.google.protobuf.BoolValue getAllowAllRouting()By default, certain headers that could affect processing of subsequent filters or request routing cannot be modified. These headers are ``host``, ``:authority``, ``:scheme``, and ``:method``. Setting this parameter to true allows these headers to be modified as well.
.google.protobuf.BoolValue allow_all_routing = 1;- Specified by:
getAllowAllRoutingin interfaceHeaderMutationRulesOrBuilder- Returns:
- The allowAllRouting.
-
getAllowAllRoutingOrBuilder
public com.google.protobuf.BoolValueOrBuilder getAllowAllRoutingOrBuilder()By default, certain headers that could affect processing of subsequent filters or request routing cannot be modified. These headers are ``host``, ``:authority``, ``:scheme``, and ``:method``. Setting this parameter to true allows these headers to be modified as well.
.google.protobuf.BoolValue allow_all_routing = 1;- Specified by:
getAllowAllRoutingOrBuilderin interfaceHeaderMutationRulesOrBuilder
-
hasAllowEnvoy
public boolean hasAllowEnvoy()If true, allow modification of envoy internal headers. By default, these start with ``x-envoy`` but this may be overridden in the ``Bootstrap`` configuration using the :ref:`header_prefix <envoy_v3_api_field_config.bootstrap.v3.Bootstrap.header_prefix>` field. Default is false.
.google.protobuf.BoolValue allow_envoy = 2;- Specified by:
hasAllowEnvoyin interfaceHeaderMutationRulesOrBuilder- Returns:
- Whether the allowEnvoy field is set.
-
getAllowEnvoy
public com.google.protobuf.BoolValue getAllowEnvoy()If true, allow modification of envoy internal headers. By default, these start with ``x-envoy`` but this may be overridden in the ``Bootstrap`` configuration using the :ref:`header_prefix <envoy_v3_api_field_config.bootstrap.v3.Bootstrap.header_prefix>` field. Default is false.
.google.protobuf.BoolValue allow_envoy = 2;- Specified by:
getAllowEnvoyin interfaceHeaderMutationRulesOrBuilder- Returns:
- The allowEnvoy.
-
getAllowEnvoyOrBuilder
public com.google.protobuf.BoolValueOrBuilder getAllowEnvoyOrBuilder()If true, allow modification of envoy internal headers. By default, these start with ``x-envoy`` but this may be overridden in the ``Bootstrap`` configuration using the :ref:`header_prefix <envoy_v3_api_field_config.bootstrap.v3.Bootstrap.header_prefix>` field. Default is false.
.google.protobuf.BoolValue allow_envoy = 2;- Specified by:
getAllowEnvoyOrBuilderin interfaceHeaderMutationRulesOrBuilder
-
hasDisallowSystem
public boolean hasDisallowSystem()If true, prevent modification of any system header, defined as a header that starts with a ``:`` character, regardless of any other settings. A processing server may still override the ``:status`` of an HTTP response using an ``ImmediateResponse`` message. Default is false.
.google.protobuf.BoolValue disallow_system = 3;- Specified by:
hasDisallowSystemin interfaceHeaderMutationRulesOrBuilder- Returns:
- Whether the disallowSystem field is set.
-
getDisallowSystem
public com.google.protobuf.BoolValue getDisallowSystem()If true, prevent modification of any system header, defined as a header that starts with a ``:`` character, regardless of any other settings. A processing server may still override the ``:status`` of an HTTP response using an ``ImmediateResponse`` message. Default is false.
.google.protobuf.BoolValue disallow_system = 3;- Specified by:
getDisallowSystemin interfaceHeaderMutationRulesOrBuilder- Returns:
- The disallowSystem.
-
getDisallowSystemOrBuilder
public com.google.protobuf.BoolValueOrBuilder getDisallowSystemOrBuilder()If true, prevent modification of any system header, defined as a header that starts with a ``:`` character, regardless of any other settings. A processing server may still override the ``:status`` of an HTTP response using an ``ImmediateResponse`` message. Default is false.
.google.protobuf.BoolValue disallow_system = 3;- Specified by:
getDisallowSystemOrBuilderin interfaceHeaderMutationRulesOrBuilder
-
hasDisallowAll
public boolean hasDisallowAll()If true, prevent modifications of all header values, regardless of any other settings. A processing server may still override the ``:status`` of an HTTP response using an ``ImmediateResponse`` message. Default is false.
.google.protobuf.BoolValue disallow_all = 4;- Specified by:
hasDisallowAllin interfaceHeaderMutationRulesOrBuilder- Returns:
- Whether the disallowAll field is set.
-
getDisallowAll
public com.google.protobuf.BoolValue getDisallowAll()If true, prevent modifications of all header values, regardless of any other settings. A processing server may still override the ``:status`` of an HTTP response using an ``ImmediateResponse`` message. Default is false.
.google.protobuf.BoolValue disallow_all = 4;- Specified by:
getDisallowAllin interfaceHeaderMutationRulesOrBuilder- Returns:
- The disallowAll.
-
getDisallowAllOrBuilder
public com.google.protobuf.BoolValueOrBuilder getDisallowAllOrBuilder()If true, prevent modifications of all header values, regardless of any other settings. A processing server may still override the ``:status`` of an HTTP response using an ``ImmediateResponse`` message. Default is false.
.google.protobuf.BoolValue disallow_all = 4;- Specified by:
getDisallowAllOrBuilderin interfaceHeaderMutationRulesOrBuilder
-
hasAllowExpression
public boolean hasAllowExpression()If set, specifically allow any header that matches this regular expression. This overrides all other settings except for ``disallow_expression``.
.envoy.type.matcher.v3.RegexMatcher allow_expression = 5;- Specified by:
hasAllowExpressionin interfaceHeaderMutationRulesOrBuilder- Returns:
- Whether the allowExpression field is set.
-
getAllowExpression
If set, specifically allow any header that matches this regular expression. This overrides all other settings except for ``disallow_expression``.
.envoy.type.matcher.v3.RegexMatcher allow_expression = 5;- Specified by:
getAllowExpressionin interfaceHeaderMutationRulesOrBuilder- Returns:
- The allowExpression.
-
getAllowExpressionOrBuilder
If set, specifically allow any header that matches this regular expression. This overrides all other settings except for ``disallow_expression``.
.envoy.type.matcher.v3.RegexMatcher allow_expression = 5;- Specified by:
getAllowExpressionOrBuilderin interfaceHeaderMutationRulesOrBuilder
-
hasDisallowExpression
public boolean hasDisallowExpression()If set, specifically disallow any header that matches this regular expression regardless of any other settings.
.envoy.type.matcher.v3.RegexMatcher disallow_expression = 6;- Specified by:
hasDisallowExpressionin interfaceHeaderMutationRulesOrBuilder- Returns:
- Whether the disallowExpression field is set.
-
getDisallowExpression
If set, specifically disallow any header that matches this regular expression regardless of any other settings.
.envoy.type.matcher.v3.RegexMatcher disallow_expression = 6;- Specified by:
getDisallowExpressionin interfaceHeaderMutationRulesOrBuilder- Returns:
- The disallowExpression.
-
getDisallowExpressionOrBuilder
If set, specifically disallow any header that matches this regular expression regardless of any other settings.
.envoy.type.matcher.v3.RegexMatcher disallow_expression = 6;- Specified by:
getDisallowExpressionOrBuilderin interfaceHeaderMutationRulesOrBuilder
-
hasDisallowIsError
public boolean hasDisallowIsError()If true, and if the rules in this list cause a header mutation to be disallowed, then the filter using this configuration will terminate the request with a 500 error. In addition, regardless of the setting of this parameter, any attempt to set, add, or modify a disallowed header will cause the ``rejected_header_mutations`` counter to be incremented. Default is false.
.google.protobuf.BoolValue disallow_is_error = 7;- Specified by:
hasDisallowIsErrorin interfaceHeaderMutationRulesOrBuilder- Returns:
- Whether the disallowIsError field is set.
-
getDisallowIsError
public com.google.protobuf.BoolValue getDisallowIsError()If true, and if the rules in this list cause a header mutation to be disallowed, then the filter using this configuration will terminate the request with a 500 error. In addition, regardless of the setting of this parameter, any attempt to set, add, or modify a disallowed header will cause the ``rejected_header_mutations`` counter to be incremented. Default is false.
.google.protobuf.BoolValue disallow_is_error = 7;- Specified by:
getDisallowIsErrorin interfaceHeaderMutationRulesOrBuilder- Returns:
- The disallowIsError.
-
getDisallowIsErrorOrBuilder
public com.google.protobuf.BoolValueOrBuilder getDisallowIsErrorOrBuilder()If true, and if the rules in this list cause a header mutation to be disallowed, then the filter using this configuration will terminate the request with a 500 error. In addition, regardless of the setting of this parameter, any attempt to set, add, or modify a disallowed header will cause the ``rejected_header_mutations`` counter to be incremented. Default is false.
.google.protobuf.BoolValue disallow_is_error = 7;- Specified by:
getDisallowIsErrorOrBuilderin interfaceHeaderMutationRulesOrBuilder
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static HeaderMutationRules parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static HeaderMutationRules parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static HeaderMutationRules parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static HeaderMutationRules parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static HeaderMutationRules parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static HeaderMutationRules parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static HeaderMutationRules parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static HeaderMutationRules parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static HeaderMutationRules parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static HeaderMutationRules parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected HeaderMutationRules.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) - Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-