From f8dec1bed7cbf0559be0f457fcdf870b55a347db Mon Sep 17 00:00:00 2001 From: Ryan Northey Date: Wed, 19 May 2021 09:23:43 +0100 Subject: [PATCH 1/2] envoy: Update submodule 46b646cbfa87 -> 84138f7 Signed-off-by: Ryan Northey --- bazel/envoy_mobile_repositories.bzl | 6 +++--- bazel/protobuf.patch | 14 ++++++++------ envoy | 2 +- envoy_build_config/extensions_build_config.bzl | 1 + 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/bazel/envoy_mobile_repositories.bzl b/bazel/envoy_mobile_repositories.bzl index 0a608ad799..19dcea8efb 100644 --- a/bazel/envoy_mobile_repositories.bzl +++ b/bazel/envoy_mobile_repositories.bzl @@ -28,9 +28,9 @@ def upstream_envoy_overrides(): "@envoy//bazel:protobuf.patch", "@envoy_mobile//bazel:protobuf.patch", ], - sha256 = "6dd0f6b20094910fbb7f1f7908688df01af2d4f6c5c21331b9f636048674aebf", - strip_prefix = "protobuf-3.14.0", - urls = ["https://github.com/protocolbuffers/protobuf/releases/download/v3.14.0/protobuf-all-3.14.0.tar.gz"], + sha256 = "d7371dc2d46fddac1af8cb27c0394554b068768fc79ecaf5be1a1863e8ff3392", + strip_prefix = "protobuf-3.16.0", + urls = ["https://github.com/protocolbuffers/protobuf/releases/download/v3.16.0/protobuf-all-3.16.0.tar.gz"], ) # Workaround old NDK version breakages https://github.com/lyft/envoy-mobile/issues/934 diff --git a/bazel/protobuf.patch b/bazel/protobuf.patch index 384713b39d..e9f34fa5ec 100644 --- a/bazel/protobuf.patch +++ b/bazel/protobuf.patch @@ -1,8 +1,8 @@ diff --git a/BUILD b/BUILD -index 112432160..5d4c9de35 100644 +index 07ee629..09541cf 100644 --- a/BUILD +++ b/BUILD -@@ -292,36 +292,37 @@ cc_library( +@@ -260,36 +260,38 @@ cc_library( # Map of all well known protos. # name => (include path, imports) WELL_KNOWN_PROTO_MAP = { @@ -46,14 +46,15 @@ index 112432160..5d4c9de35 100644 - "wrappers": ("src/google/protobuf/wrappers.proto", []), + "wrappers": ("google/protobuf/wrappers.proto", []), } -+RELATIVE_WELL_KNOWN_PROTOS = [proto[1][0] for proto in WELL_KNOWN_PROTO_MAP.items()] -WELL_KNOWN_PROTOS = [value[0] for value in WELL_KNOWN_PROTO_MAP.values()] ++RELATIVE_WELL_KNOWN_PROTOS = [proto[1][0] for proto in WELL_KNOWN_PROTO_MAP.items()] ++ +WELL_KNOWN_PROTOS = ["src/" + s for s in RELATIVE_WELL_KNOWN_PROTOS] filegroup( name = "well_known_protos", -@@ -353,10 +354,17 @@ cc_library( +@@ -321,10 +323,17 @@ cc_library( # ) ################################################################################ @@ -72,16 +73,17 @@ index 112432160..5d4c9de35 100644 visibility = ["//visibility:public"], deps = [dep + "_proto" for dep in proto[1][1]], ) for proto in WELL_KNOWN_PROTO_MAP.items()] -@@ -850,7 +858,7 @@ internal_copied_filegroup( +@@ -824,7 +833,8 @@ internal_copied_filegroup( # TODO(dzc): Remove this once py_proto_library can have labels in srcs, in # which case we can simply add :protos_python in srcs. -COPIED_WELL_KNOWN_PROTOS = ["python/" + s[4:] for s in WELL_KNOWN_PROTOS] ++ +COPIED_WELL_KNOWN_PROTOS = ["python/" + s for s in RELATIVE_WELL_KNOWN_PROTOS] py_proto_library( name = "protobuf_python", -@@ -968,7 +976,7 @@ cc_library( +@@ -942,7 +952,7 @@ cc_library( proto_lang_toolchain( name = "cc_toolchain", diff --git a/envoy b/envoy index 46b646cbfa..84138f7b75 160000 --- a/envoy +++ b/envoy @@ -1 +1 @@ -Subproject commit 46b646cbfa87c274700174b142be4525c46bb0d0 +Subproject commit 84138f7b75325d6b1e0f2a208ccc934fef137a69 diff --git a/envoy_build_config/extensions_build_config.bzl b/envoy_build_config/extensions_build_config.bzl index 4a8d83df4b..efd73baef7 100644 --- a/envoy_build_config/extensions_build_config.bzl +++ b/envoy_build_config/extensions_build_config.bzl @@ -7,6 +7,7 @@ EXTENSIONS = { "envoy.filters.http.buffer": "//source/extensions/filters/http/buffer:config", "envoy.filters.http.dynamic_forward_proxy": "//source/extensions/filters/http/dynamic_forward_proxy:config", "envoy.filters.http.local_error": "@envoy_mobile//library/common/extensions/filters/http/local_error:config", + "envoy.http.original_ip_detection.xff": "//source/extensions/http/original_ip_detection/xff:config", "envoy.filters.http.platform_bridge": "@envoy_mobile//library/common/extensions/filters/http/platform_bridge:config", "envoy.filters.http.route_cache_reset": "@envoy_mobile//library/common/extensions/filters/http/route_cache_reset:config", "envoy.filters.http.router": "//source/extensions/filters/http/router:config", From e78bafcd78a176225c28bad03a9a427e06d0ab99 Mon Sep 17 00:00:00 2001 From: Ryan Northey Date: Wed, 19 May 2021 15:18:24 +0100 Subject: [PATCH 2/2] extensions: Update config Signed-off-by: Ryan Northey --- .gitmodules | 3 ++- envoy | 2 +- library/common/extensions/filters/http/assertion/BUILD | 4 ---- library/common/extensions/filters/http/local_error/BUILD | 4 ---- library/common/extensions/filters/http/platform_bridge/BUILD | 4 ---- .../common/extensions/filters/http/route_cache_reset/BUILD | 4 ---- library/common/extensions/filters/http/test_accessor/BUILD | 4 ---- library/common/extensions/stat_sinks/metrics_service/BUILD | 4 ---- 8 files changed, 3 insertions(+), 26 deletions(-) diff --git a/.gitmodules b/.gitmodules index c8cc91d777..31b0c1edae 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,4 @@ [submodule "envoy"] path = envoy - url = https://github.com/envoyproxy/envoy.git + url = https://github.com/phlax/envoy + branch = extensions-config diff --git a/envoy b/envoy index 84138f7b75..3487cf0adf 160000 --- a/envoy +++ b/envoy @@ -1 +1 @@ -Subproject commit 84138f7b75325d6b1e0f2a208ccc934fef137a69 +Subproject commit 3487cf0adf8efa1b6ac05fcd6505d887a4009cc0 diff --git a/library/common/extensions/filters/http/assertion/BUILD b/library/common/extensions/filters/http/assertion/BUILD index c97aa2e933..220d3558d6 100644 --- a/library/common/extensions/filters/http/assertion/BUILD +++ b/library/common/extensions/filters/http/assertion/BUILD @@ -21,9 +21,7 @@ envoy_cc_extension( name = "assertion_filter_lib", srcs = ["filter.cc"], hdrs = ["filter.h"], - category = "envoy.filters.http", repository = "@envoy", - security_posture = "requires_trusted_downstream_and_upstream", deps = [ "filter_cc_proto", "@envoy//include/envoy/http:codes_interface", @@ -38,9 +36,7 @@ envoy_cc_extension( name = "config", srcs = ["config.cc"], hdrs = ["config.h"], - category = "envoy.filters.http", repository = "@envoy", - security_posture = "requires_trusted_downstream_and_upstream", deps = [ ":assertion_filter_lib", "@envoy//source/extensions/filters/http/common:factory_base_lib", diff --git a/library/common/extensions/filters/http/local_error/BUILD b/library/common/extensions/filters/http/local_error/BUILD index 09a8870401..f6e9b3f66d 100644 --- a/library/common/extensions/filters/http/local_error/BUILD +++ b/library/common/extensions/filters/http/local_error/BUILD @@ -18,9 +18,7 @@ envoy_cc_extension( name = "local_error_filter_lib", srcs = ["filter.cc"], hdrs = ["filter.h"], - category = "envoy.filters.http", repository = "@envoy", - security_posture = "requires_trusted_downstream_and_upstream", deps = [ ":filter_cc_proto", "//library/common/http:internal_headers_lib", @@ -41,9 +39,7 @@ envoy_cc_extension( name = "config", srcs = ["config.cc"], hdrs = ["config.h"], - category = "envoy.filters.http", repository = "@envoy", - security_posture = "requires_trusted_downstream_and_upstream", deps = [ ":local_error_filter_lib", "@envoy//source/extensions/filters/http/common:factory_base_lib", diff --git a/library/common/extensions/filters/http/platform_bridge/BUILD b/library/common/extensions/filters/http/platform_bridge/BUILD index c1f3677eb2..efe2c5bb44 100644 --- a/library/common/extensions/filters/http/platform_bridge/BUILD +++ b/library/common/extensions/filters/http/platform_bridge/BUILD @@ -24,9 +24,7 @@ envoy_cc_extension( "c_types.h", "filter.h", ], - category = "envoy.filters.http", repository = "@envoy", - security_posture = "requires_trusted_downstream_and_upstream", deps = [ ":filter_cc_proto", "//library/common/api:external_api_lib", @@ -44,9 +42,7 @@ envoy_cc_extension( name = "config", srcs = ["config.cc"], hdrs = ["config.h"], - category = "envoy.filters.http", repository = "@envoy", - security_posture = "requires_trusted_downstream_and_upstream", deps = [ ":platform_bridge_filter_lib", "@envoy//source/extensions/filters/http/common:factory_base_lib", diff --git a/library/common/extensions/filters/http/route_cache_reset/BUILD b/library/common/extensions/filters/http/route_cache_reset/BUILD index 75dafd5e50..3d39e5b752 100644 --- a/library/common/extensions/filters/http/route_cache_reset/BUILD +++ b/library/common/extensions/filters/http/route_cache_reset/BUILD @@ -18,9 +18,7 @@ envoy_cc_extension( name = "route_cache_reset_filter_lib", srcs = ["filter.cc"], hdrs = ["filter.h"], - category = "envoy.filters.http", repository = "@envoy", - security_posture = "requires_trusted_downstream_and_upstream", deps = [ ":filter_cc_proto", "@envoy//include/envoy/http:filter_interface", @@ -34,9 +32,7 @@ envoy_cc_extension( name = "config", srcs = ["config.cc"], hdrs = ["config.h"], - category = "envoy.filters.http", repository = "@envoy", - security_posture = "requires_trusted_downstream_and_upstream", deps = [ ":route_cache_reset_filter_lib", "@envoy//source/extensions/filters/http/common:factory_base_lib", diff --git a/library/common/extensions/filters/http/test_accessor/BUILD b/library/common/extensions/filters/http/test_accessor/BUILD index 11bb8683c2..977df4ab67 100644 --- a/library/common/extensions/filters/http/test_accessor/BUILD +++ b/library/common/extensions/filters/http/test_accessor/BUILD @@ -21,9 +21,7 @@ envoy_cc_extension( name = "test_accessor_filter_lib", srcs = ["filter.cc"], hdrs = ["filter.h"], - category = "envoy.filters.http", repository = "@envoy", - security_posture = "robust_to_untrusted_downstream_and_upstream", deps = [ "filter_cc_proto", "//library/common/api:c_types", @@ -38,9 +36,7 @@ envoy_cc_extension( name = "config", srcs = ["config.cc"], hdrs = ["config.h"], - category = "envoy.filters.http", repository = "@envoy", - security_posture = "robust_to_untrusted_downstream_and_upstream", deps = [ ":test_accessor_filter_lib", "@envoy//source/extensions/filters/http/common:factory_base_lib", diff --git a/library/common/extensions/stat_sinks/metrics_service/BUILD b/library/common/extensions/stat_sinks/metrics_service/BUILD index 32fafccb2d..89ee2c75c9 100644 --- a/library/common/extensions/stat_sinks/metrics_service/BUILD +++ b/library/common/extensions/stat_sinks/metrics_service/BUILD @@ -32,9 +32,7 @@ envoy_cc_extension( name = "mobile_grpc_streamer", srcs = ["mobile_grpc_streamer.cc"], hdrs = ["mobile_grpc_streamer.h"], - category = "envoy.filters.http", repository = "@envoy", - security_posture = "requires_trusted_downstream_and_upstream", deps = [ ":service_cc_proto", "@envoy//source/common/common:minimal_logger_lib", @@ -46,9 +44,7 @@ envoy_cc_extension( name = "config", srcs = ["config.cc"], hdrs = ["config.h"], - category = "envoy.filters.http", repository = "@envoy", - security_posture = "requires_trusted_downstream_and_upstream", deps = [ ":config_proto_cc_proto", ":mobile_grpc_streamer",