1// Copyright 2020 The gRPC Authors 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15// Local copy of Envoy xDS proto file, used for testing only. 16 17syntax = "proto3"; 18 19package envoy.extensions.filters.network.http_connection_manager.v3; 20 21import "google/protobuf/any.proto"; 22 23import "src/proto/grpc/testing/xds/v3/config_source.proto"; 24import "src/proto/grpc/testing/xds/v3/extension.proto"; 25import "src/proto/grpc/testing/xds/v3/protocol.proto"; 26import "src/proto/grpc/testing/xds/v3/route.proto"; 27 28// [#protodoc-title: HTTP connection manager] 29// HTTP connection manager :ref:`configuration overview <config_http_conn_man>`. 30// [#extension: envoy.filters.network.http_connection_manager] 31 32message HttpConnectionManager { 33 oneof route_specifier { 34 // The connection manager’s route table will be dynamically loaded via the RDS API. 35 Rds rds = 3; 36 37 // The route table for the connection manager is static and is specified in this property. 38 config.route.v3.RouteConfiguration route_config = 4; 39 40 // A route table will be dynamically assigned to each request based on request attributes 41 // (e.g., the value of a header). The "routing scopes" (i.e., route tables) and "scope keys" are 42 // specified in this message. 43 ScopedRoutes scoped_routes = 31; 44 } 45 46 // A list of individual HTTP filters that make up the filter chain for 47 // requests made to the connection manager. :ref:`Order matters <arch_overview_http_filters_ordering>` 48 // as the filters are processed sequentially as request events happen. 49 repeated HttpFilter http_filters = 5; 50 51 // Additional settings for HTTP requests handled by the connection manager. These will be 52 // applicable to both HTTP1 and HTTP2 requests. 53 config.core.v3.HttpProtocolOptions common_http_protocol_options = 35; 54 55 // The number of additional ingress proxy hops from the right side of the 56 // :ref:`config_http_conn_man_headers_x-forwarded-for` HTTP header to trust when 57 // determining the origin client's IP address. The default is zero if this option 58 // is not specified. See the documentation for 59 // :ref:`config_http_conn_man_headers_x-forwarded-for` for more information. 60 uint32 xff_num_trusted_hops = 19; 61 62 // The configuration for the original IP detection extensions. 63 // 64 // When configured the extensions will be called along with the request headers 65 // and information about the downstream connection, such as the directly connected address. 66 // Each extension will then use these parameters to decide the request's effective remote address. 67 // If an extension fails to detect the original IP address and isn't configured to reject 68 // the request, the HCM will try the remaining extensions until one succeeds or rejects 69 // the request. If the request isn't rejected nor any extension succeeds, the HCM will 70 // fallback to using the remote address. 71 // 72 // .. WARNING:: 73 // Extensions cannot be used in conjunction with :ref:`use_remote_address 74 // <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.use_remote_address>` 75 // nor :ref:`xff_num_trusted_hops 76 // <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.xff_num_trusted_hops>`. 77 // 78 // [#extension-category: envoy.http.original_ip_detection] 79 repeated config.core.v3.TypedExtensionConfig original_ip_detection_extensions = 46; 80} 81 82message Rds { 83 // Configuration source specifier for RDS. 84 config.core.v3.ConfigSource config_source = 1; 85 86 // The name of the route configuration. This name will be passed to the RDS 87 // API. This allows an Envoy configuration with multiple HTTP listeners (and 88 // associated HTTP connection manager filters) to use different route 89 // configurations. 90 string route_config_name = 2; 91} 92 93message ScopedRoutes { 94} 95 96message HttpFilter { 97 // The name of the filter configuration. The name is used as a fallback to 98 // select an extension if the type of the configuration proto is not 99 // sufficient. It also serves as a resource name in ExtensionConfigDS. 100 string name = 1; 101 102 oneof config_type { 103 // Filter specific configuration which depends on the filter being instantiated. See the supported 104 // filters for further documentation. 105 google.protobuf.Any typed_config = 4; 106 } 107 108 bool is_optional = 6; 109} 110