Class Validation
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
io.envoyproxy.envoy.extensions.filters.network.reverse_tunnel.v3.Validation
- All Implemented Interfaces:
com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,ValidationOrBuilder,Serializable
public final class Validation
extends com.google.protobuf.GeneratedMessageV3
implements ValidationOrBuilder
Validation configuration for reverse tunnel identifiers. Validates the node ID and cluster ID extracted from reverse tunnel handshake headers against expected values specified using format strings.Protobuf type
envoy.extensions.filters.network.reverse_tunnel.v3.Validation- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classValidation configuration for reverse tunnel identifiers.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 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 TypeMethodDescriptionbooleanFormat string to extract the expected cluster identifier for validation.com.google.protobuf.ByteStringFormat string to extract the expected cluster identifier for validation.static Validationstatic final com.google.protobuf.Descriptors.DescriptorNamespace for emitted dynamic metadata when ``emit_dynamic_metadata`` is ``true``.com.google.protobuf.ByteStringNamespace for emitted dynamic metadata when ``emit_dynamic_metadata`` is ``true``.booleanWhether to emit validation results as dynamic metadata.Format string to extract the expected node identifier for validation.com.google.protobuf.ByteStringFormat string to extract the expected node identifier for validation.com.google.protobuf.Parser<Validation>intinthashCode()protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanstatic Validation.Builderstatic Validation.BuildernewBuilder(Validation prototype) protected Validation.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) static ValidationparseDelimitedFrom(InputStream input) static ValidationparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ValidationparseFrom(byte[] data) static ValidationparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ValidationparseFrom(com.google.protobuf.ByteString data) static ValidationparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ValidationparseFrom(com.google.protobuf.CodedInputStream input) static ValidationparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ValidationparseFrom(InputStream input) static ValidationparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ValidationparseFrom(ByteBuffer data) static ValidationparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<Validation>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
-
NODE_ID_FORMAT_FIELD_NUMBER
public static final int NODE_ID_FORMAT_FIELD_NUMBER- See Also:
-
CLUSTER_ID_FORMAT_FIELD_NUMBER
public static final int CLUSTER_ID_FORMAT_FIELD_NUMBER- See Also:
-
EMIT_DYNAMIC_METADATA_FIELD_NUMBER
public static final int EMIT_DYNAMIC_METADATA_FIELD_NUMBER- See Also:
-
DYNAMIC_METADATA_NAMESPACE_FIELD_NUMBER
public static final int DYNAMIC_METADATA_NAMESPACE_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
-
getNodeIdFormat
Format string to extract the expected node identifier for validation. The formatted value is compared against the ``x-envoy-reverse-tunnel-node-id`` header from the incoming handshake request. If they do not match, the connection is rejected with HTTP ``403 Forbidden``. Supports Envoy's :ref:`command operators <config_access_log_command_operators>`: * ``%DYNAMIC_METADATA(namespace:key)%``: Extract expected value from dynamic metadata. * ``%FILTER_STATE(key)%``: Extract expected value from filter state. * ``%DOWNSTREAM_REMOTE_ADDRESS%``: Use downstream connection IP address. * Plain strings: Use a static expected value. If empty, node ID validation is skipped. Example using dynamic metadata allowlist: .. code-block:: yaml node_id_format: "%DYNAMIC_METADATA(envoy.reverse_tunnel.allowlist:expected_node_id)%"string node_id_format = 1 [(.validate.rules) = { ... }- Specified by:
getNodeIdFormatin interfaceValidationOrBuilder- Returns:
- The nodeIdFormat.
-
getNodeIdFormatBytes
public com.google.protobuf.ByteString getNodeIdFormatBytes()Format string to extract the expected node identifier for validation. The formatted value is compared against the ``x-envoy-reverse-tunnel-node-id`` header from the incoming handshake request. If they do not match, the connection is rejected with HTTP ``403 Forbidden``. Supports Envoy's :ref:`command operators <config_access_log_command_operators>`: * ``%DYNAMIC_METADATA(namespace:key)%``: Extract expected value from dynamic metadata. * ``%FILTER_STATE(key)%``: Extract expected value from filter state. * ``%DOWNSTREAM_REMOTE_ADDRESS%``: Use downstream connection IP address. * Plain strings: Use a static expected value. If empty, node ID validation is skipped. Example using dynamic metadata allowlist: .. code-block:: yaml node_id_format: "%DYNAMIC_METADATA(envoy.reverse_tunnel.allowlist:expected_node_id)%"string node_id_format = 1 [(.validate.rules) = { ... }- Specified by:
getNodeIdFormatBytesin interfaceValidationOrBuilder- Returns:
- The bytes for nodeIdFormat.
-
getClusterIdFormat
Format string to extract the expected cluster identifier for validation. The formatted value is compared against the ``x-envoy-reverse-tunnel-cluster-id`` header from the incoming handshake request. If they do not match, the connection is rejected with HTTP ``403 Forbidden``. Supports the same :ref:`command operators <config_access_log_command_operators>` as ``node_id_format``. If empty, cluster ID validation is skipped. Example using filter state: .. code-block:: yaml cluster_id_format: "%FILTER_STATE(expected_cluster_id)%"string cluster_id_format = 2 [(.validate.rules) = { ... }- Specified by:
getClusterIdFormatin interfaceValidationOrBuilder- Returns:
- The clusterIdFormat.
-
getClusterIdFormatBytes
public com.google.protobuf.ByteString getClusterIdFormatBytes()Format string to extract the expected cluster identifier for validation. The formatted value is compared against the ``x-envoy-reverse-tunnel-cluster-id`` header from the incoming handshake request. If they do not match, the connection is rejected with HTTP ``403 Forbidden``. Supports the same :ref:`command operators <config_access_log_command_operators>` as ``node_id_format``. If empty, cluster ID validation is skipped. Example using filter state: .. code-block:: yaml cluster_id_format: "%FILTER_STATE(expected_cluster_id)%"string cluster_id_format = 2 [(.validate.rules) = { ... }- Specified by:
getClusterIdFormatBytesin interfaceValidationOrBuilder- Returns:
- The bytes for clusterIdFormat.
-
getEmitDynamicMetadata
public boolean getEmitDynamicMetadata()Whether to emit validation results as dynamic metadata. When enabled, the filter emits metadata under the namespace specified by ``dynamic_metadata_namespace`` containing: * ``node_id``: The actual node ID from the handshake request. * ``cluster_id``: The actual cluster ID from the handshake request. * ``validation_result``: Either ``allowed`` or ``denied``. This metadata can be used by subsequent filters or for access logging. Defaults to ``false``.
bool emit_dynamic_metadata = 3;- Specified by:
getEmitDynamicMetadatain interfaceValidationOrBuilder- Returns:
- The emitDynamicMetadata.
-
getDynamicMetadataNamespace
Namespace for emitted dynamic metadata when ``emit_dynamic_metadata`` is ``true``. If not specified, defaults to ``envoy.filters.network.reverse_tunnel``.
string dynamic_metadata_namespace = 4 [(.validate.rules) = { ... }- Specified by:
getDynamicMetadataNamespacein interfaceValidationOrBuilder- Returns:
- The dynamicMetadataNamespace.
-
getDynamicMetadataNamespaceBytes
public com.google.protobuf.ByteString getDynamicMetadataNamespaceBytes()Namespace for emitted dynamic metadata when ``emit_dynamic_metadata`` is ``true``. If not specified, defaults to ``envoy.filters.network.reverse_tunnel``.
string dynamic_metadata_namespace = 4 [(.validate.rules) = { ... }- Specified by:
getDynamicMetadataNamespaceBytesin interfaceValidationOrBuilder- Returns:
- The bytes for dynamicMetadataNamespace.
-
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 Validation parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Validation parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Validation parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Validation parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Validation parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Validation parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static Validation parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static Validation parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static Validation 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 Validation.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
-