extensions: strongly prefer type URL lookup (#20397)

Use type_url to look up extensions. This prevents the undesirable practice of putting invalid protobufs to avoid a type lookup or duplicating the type URL.
Risk Level: medium, affects extensions with duplicated type URLs or no configuration
Testing: yes
Docs Changes: yes, this has been the recommendation for awhile.
Release Notes: yes
Runtime Guard: envoy.reloadable_features.no_extension_lookup_by_name

Signed-off-by: Kuat Yessenov <kuat@google.com>

Mirrored from https://github.com/envoyproxy/envoy @ 8cb6862fe6099cd8583a64ff037ecdeaf0e939fa
pull/626/head
data-plane-api(Azure Pipelines) 3 years ago
parent 8832dd9c53
commit eacc8a085f
  1. 4
      envoy/config/accesslog/v3/accesslog.proto
  2. 6
      envoy/config/cluster/v3/filter.proto
  3. 6
      envoy/config/listener/v3/listener_components.proto
  4. 4
      envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto

@ -30,9 +30,7 @@ message AccessLog {
reserved "config"; reserved "config";
// The name of the access log extension to instantiate. // The name of the access log extension configuration.
// The name must match one of the compiled in loggers.
// See the :ref:`extensions listed in typed_config below <extension_category_envoy.access_loggers>` for the default list of available loggers.
string name = 1; string name = 1;
// Filter which is used to determine if the access log needs to be written. // Filter which is used to determine if the access log needs to be written.

@ -20,12 +20,12 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE;
message Filter { message Filter {
option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.cluster.Filter"; option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.cluster.Filter";
// The name of the filter to instantiate. The name must match a // The name of the filter configuration.
// supported upstream filter. Note that Envoy's :ref:`downstream network
// filters <config_network_filters>` are not valid upstream filters.
string name = 1 [(validate.rules).string = {min_len: 1}]; string name = 1 [(validate.rules).string = {min_len: 1}];
// Filter specific configuration which depends on the filter being // Filter specific configuration which depends on the filter being
// instantiated. See the supported filters for further documentation. // instantiated. See the supported filters for further documentation.
// Note that Envoy's :ref:`downstream network
// filters <config_network_filters>` are not valid upstream filters.
google.protobuf.Any typed_config = 2; google.protobuf.Any typed_config = 2;
} }

@ -33,8 +33,7 @@ message Filter {
reserved "config"; reserved "config";
// The name of the filter to instantiate. The name must match a // The name of the filter configuration.
// :ref:`supported filter <config_network_filters>`.
string name = 1 [(validate.rules).string = {min_len: 1}]; string name = 1 [(validate.rules).string = {min_len: 1}];
oneof config_type { oneof config_type {
@ -343,8 +342,7 @@ message ListenerFilter {
reserved "config"; reserved "config";
// The name of the filter to instantiate. The name must match a // The name of the filter configuration.
// :ref:`supported filter <config_listener_filters>`.
string name = 1 [(validate.rules).string = {min_len: 1}]; string name = 1 [(validate.rules).string = {min_len: 1}];
oneof config_type { oneof config_type {

@ -1013,9 +1013,7 @@ message HttpFilter {
reserved "config"; reserved "config";
// The name of the filter configuration. The name is used as a fallback to // The name of the filter configuration. It also serves as a resource name in ExtensionConfigDS.
// select an extension if the type of the configuration proto is not
// sufficient. It also serves as a resource name in ExtensionConfigDS.
string name = 1 [(validate.rules).string = {min_len: 1}]; string name = 1 [(validate.rules).string = {min_len: 1}];
oneof config_type { oneof config_type {

Loading…
Cancel
Save