Class CustomHeaderConfig.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<CustomHeaderConfig.Builder>
io.envoyproxy.envoy.extensions.http.original_ip_detection.custom_header.v3.CustomHeaderConfig.Builder
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,CustomHeaderConfigOrBuilder,Cloneable
- Enclosing class:
- CustomHeaderConfig
public static final class CustomHeaderConfig.Builder
extends com.google.protobuf.GeneratedMessageV3.Builder<CustomHeaderConfig.Builder>
implements CustomHeaderConfigOrBuilder
This extension allows for the original downstream remote IP to be detected by reading the value from a configured header name. If the value is successfully parsed as an IP, it'll be treated as the effective downstream remote address and seen as such by all filters. See :ref:`original_ip_detection_extensions <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.original_ip_detection_extensions>` for an overview of how extensions operate and what happens when an extension fails to detect the remote IP. [#extension: envoy.http.original_ip_detection.custom_header]Protobuf type
envoy.extensions.http.original_ip_detection.custom_header.v3.CustomHeaderConfig-
Method Summary
Modifier and TypeMethodDescriptionaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) build()clear()If set to true, the extension could decide that the detected address should be treated as trusted by the HCM.clearField(com.google.protobuf.Descriptors.FieldDescriptor field) The header name containing the original downstream remote address, if present.clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) If this is set, the request will be rejected when detection fails using it as the HTTP response status. .. note:: If this is set to < 400 or > 511, the default status 403 will be used instead.clone()booleanIf set to true, the extension could decide that the detected address should be treated as trusted by the HCM.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorThe header name containing the original downstream remote address, if present.com.google.protobuf.ByteStringThe header name containing the original downstream remote address, if present.If this is set, the request will be rejected when detection fails using it as the HTTP response status. .. note:: If this is set to < 400 or > 511, the default status 403 will be used instead.If this is set, the request will be rejected when detection fails using it as the HTTP response status. .. note:: If this is set to < 400 or > 511, the default status 403 will be used instead.If this is set, the request will be rejected when detection fails using it as the HTTP response status. .. note:: If this is set to < 400 or > 511, the default status 403 will be used instead.booleanIf this is set, the request will be rejected when detection fails using it as the HTTP response status. .. note:: If this is set to < 400 or > 511, the default status 403 will be used instead.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeFrom(CustomHeaderConfig other) mergeRejectWithStatus(HttpStatus value) If this is set, the request will be rejected when detection fails using it as the HTTP response status. .. note:: If this is set to < 400 or > 511, the default status 403 will be used instead.mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) setAllowExtensionToSetAddressAsTrusted(boolean value) If set to true, the extension could decide that the detected address should be treated as trusted by the HCM.setHeaderName(String value) The header name containing the original downstream remote address, if present.setHeaderNameBytes(com.google.protobuf.ByteString value) The header name containing the original downstream remote address, if present.setRejectWithStatus(HttpStatus value) If this is set, the request will be rejected when detection fails using it as the HTTP response status. .. note:: If this is set to < 400 or > 511, the default status 403 will be used instead.setRejectWithStatus(HttpStatus.Builder builderForValue) If this is set, the request will be rejected when detection fails using it as the HTTP response status. .. note:: If this is set to < 400 or > 511, the default status 403 will be used instead.setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
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.Builder<CustomHeaderConfig.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<CustomHeaderConfig.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<CustomHeaderConfig.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<CustomHeaderConfig.Builder>
-
setField
public CustomHeaderConfig.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<CustomHeaderConfig.Builder>
-
clearField
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<CustomHeaderConfig.Builder>
-
clearOneof
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<CustomHeaderConfig.Builder>
-
setRepeatedField
public CustomHeaderConfig.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) - Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<CustomHeaderConfig.Builder>
-
addRepeatedField
public CustomHeaderConfig.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<CustomHeaderConfig.Builder>
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<CustomHeaderConfig.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<CustomHeaderConfig.Builder>
-
mergeFrom
public CustomHeaderConfig.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<CustomHeaderConfig.Builder>- Throws:
IOException
-
getHeaderName
The header name containing the original downstream remote address, if present. Note: in the case of a multi-valued header, only the first value is tried and the rest are ignored.
string header_name = 1 [(.validate.rules) = { ... }- Specified by:
getHeaderNamein interfaceCustomHeaderConfigOrBuilder- Returns:
- The headerName.
-
getHeaderNameBytes
public com.google.protobuf.ByteString getHeaderNameBytes()The header name containing the original downstream remote address, if present. Note: in the case of a multi-valued header, only the first value is tried and the rest are ignored.
string header_name = 1 [(.validate.rules) = { ... }- Specified by:
getHeaderNameBytesin interfaceCustomHeaderConfigOrBuilder- Returns:
- The bytes for headerName.
-
setHeaderName
The header name containing the original downstream remote address, if present. Note: in the case of a multi-valued header, only the first value is tried and the rest are ignored.
string header_name = 1 [(.validate.rules) = { ... }- Parameters:
value- The headerName to set.- Returns:
- This builder for chaining.
-
clearHeaderName
The header name containing the original downstream remote address, if present. Note: in the case of a multi-valued header, only the first value is tried and the rest are ignored.
string header_name = 1 [(.validate.rules) = { ... }- Returns:
- This builder for chaining.
-
setHeaderNameBytes
The header name containing the original downstream remote address, if present. Note: in the case of a multi-valued header, only the first value is tried and the rest are ignored.
string header_name = 1 [(.validate.rules) = { ... }- Parameters:
value- The bytes for headerName to set.- Returns:
- This builder for chaining.
-
getAllowExtensionToSetAddressAsTrusted
public boolean getAllowExtensionToSetAddressAsTrusted()If set to true, the extension could decide that the detected address should be treated as trusted by the HCM. If the address is considered :ref:`trusted<config_http_conn_man_headers_x-forwarded-for_trusted_client_address>`, it might be used as input to determine if the request is internal (among other things).
bool allow_extension_to_set_address_as_trusted = 2;- Specified by:
getAllowExtensionToSetAddressAsTrustedin interfaceCustomHeaderConfigOrBuilder- Returns:
- The allowExtensionToSetAddressAsTrusted.
-
setAllowExtensionToSetAddressAsTrusted
If set to true, the extension could decide that the detected address should be treated as trusted by the HCM. If the address is considered :ref:`trusted<config_http_conn_man_headers_x-forwarded-for_trusted_client_address>`, it might be used as input to determine if the request is internal (among other things).
bool allow_extension_to_set_address_as_trusted = 2;- Parameters:
value- The allowExtensionToSetAddressAsTrusted to set.- Returns:
- This builder for chaining.
-
clearAllowExtensionToSetAddressAsTrusted
If set to true, the extension could decide that the detected address should be treated as trusted by the HCM. If the address is considered :ref:`trusted<config_http_conn_man_headers_x-forwarded-for_trusted_client_address>`, it might be used as input to determine if the request is internal (among other things).
bool allow_extension_to_set_address_as_trusted = 2;- Returns:
- This builder for chaining.
-
hasRejectWithStatus
public boolean hasRejectWithStatus()If this is set, the request will be rejected when detection fails using it as the HTTP response status. .. note:: If this is set to < 400 or > 511, the default status 403 will be used instead.
.envoy.type.v3.HttpStatus reject_with_status = 3;- Specified by:
hasRejectWithStatusin interfaceCustomHeaderConfigOrBuilder- Returns:
- Whether the rejectWithStatus field is set.
-
getRejectWithStatus
If this is set, the request will be rejected when detection fails using it as the HTTP response status. .. note:: If this is set to < 400 or > 511, the default status 403 will be used instead.
.envoy.type.v3.HttpStatus reject_with_status = 3;- Specified by:
getRejectWithStatusin interfaceCustomHeaderConfigOrBuilder- Returns:
- The rejectWithStatus.
-
setRejectWithStatus
If this is set, the request will be rejected when detection fails using it as the HTTP response status. .. note:: If this is set to < 400 or > 511, the default status 403 will be used instead.
.envoy.type.v3.HttpStatus reject_with_status = 3; -
setRejectWithStatus
If this is set, the request will be rejected when detection fails using it as the HTTP response status. .. note:: If this is set to < 400 or > 511, the default status 403 will be used instead.
.envoy.type.v3.HttpStatus reject_with_status = 3; -
mergeRejectWithStatus
If this is set, the request will be rejected when detection fails using it as the HTTP response status. .. note:: If this is set to < 400 or > 511, the default status 403 will be used instead.
.envoy.type.v3.HttpStatus reject_with_status = 3; -
clearRejectWithStatus
If this is set, the request will be rejected when detection fails using it as the HTTP response status. .. note:: If this is set to < 400 or > 511, the default status 403 will be used instead.
.envoy.type.v3.HttpStatus reject_with_status = 3; -
getRejectWithStatusBuilder
If this is set, the request will be rejected when detection fails using it as the HTTP response status. .. note:: If this is set to < 400 or > 511, the default status 403 will be used instead.
.envoy.type.v3.HttpStatus reject_with_status = 3; -
getRejectWithStatusOrBuilder
If this is set, the request will be rejected when detection fails using it as the HTTP response status. .. note:: If this is set to < 400 or > 511, the default status 403 will be used instead.
.envoy.type.v3.HttpStatus reject_with_status = 3;- Specified by:
getRejectWithStatusOrBuilderin interfaceCustomHeaderConfigOrBuilder
-
setUnknownFields
public final CustomHeaderConfig.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<CustomHeaderConfig.Builder>
-
mergeUnknownFields
public final CustomHeaderConfig.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<CustomHeaderConfig.Builder>
-