Skip to content

Commit

Permalink
extensions: Consolidate extension metadata (#16496)
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Northey <[email protected]>
  • Loading branch information
phlax authored May 28, 2021
1 parent a659068 commit 57976d1
Show file tree
Hide file tree
Showing 142 changed files with 32 additions and 450 deletions.
5 changes: 0 additions & 5 deletions bazel/envoy_library.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,6 @@ def envoy_basic_cc_library(name, deps = [], external_deps = [], **kargs):

def envoy_cc_extension(
name,
security_posture,
category = None,
# Only set this for internal, undocumented extensions.
undocumented = False,
status = "stable",
tags = [],
extra_visibility = [],
visibility = EXTENSION_CONFIG_VISIBILITY,
Expand Down
3 changes: 3 additions & 0 deletions ci/format_pre.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ bazel run "${BAZEL_BUILD_OPTIONS[@]}" //configs:example_configs_validation
CURRENT=python
bazel run "${BAZEL_BUILD_OPTIONS[@]}" //tools/code_format:python_check -- --diff-file="$DIFF_OUTPUT" --fix "$(pwd)"

CURRENT=extensions
bazel run "${BAZEL_BUILD_OPTIONS[@]}" //tools/extensions:validate_extensions

if [[ "${#FAILED[@]}" -ne "0" ]]; then
echo "TESTS FAILED:" >&2
for failed in "${FAILED[@]}"; do
Expand Down
9 changes: 1 addition & 8 deletions docs/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,22 +63,15 @@ pip3 install --require-hashes -r "${SCRIPT_DIR}"/requirements.txt
# files still.
rm -rf bazel-bin/external/envoy_api_canonical

EXTENSION_DB_PATH="$(realpath "${BUILD_DIR}/extension_db.json")"
rm -rf "${EXTENSION_DB_PATH}"
GENERATED_RST_DIR="$(realpath "${GENERATED_RST_DIR}")"
export EXTENSION_DB_PATH
export GENERATED_RST_DIR

# This is for local RBE setup, should be no-op for builds without RBE setting in bazelrc files.
IFS=" " read -ra BAZEL_BUILD_OPTIONS <<< "${BAZEL_BUILD_OPTIONS:-}"
BAZEL_BUILD_OPTIONS+=(
"--remote_download_outputs=all"
"--strategy=protodoc=sandboxed,local"
"--action_env=ENVOY_BLOB_SHA"
"--action_env=EXTENSION_DB_PATH")

# TODO(phlax): move this to format_pre checks
bazel run "${BAZEL_BUILD_OPTIONS[@]}" //tools/extensions:validate_extensions
"--action_env=ENVOY_BLOB_SHA")

# Generate RST for the lists of trusted/untrusted extensions in
# intro/arch_overview/security docs.
Expand Down
1 change: 1 addition & 0 deletions source/extensions/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ licenses(["notice"]) # Apache 2

exports_files([
"extensions_metadata.yaml",
"extensions_build_config.bzl",
])
2 changes: 0 additions & 2 deletions source/extensions/access_loggers/file/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,10 @@ envoy_cc_extension(
name = "config",
srcs = ["config.cc"],
hdrs = ["config.h"],
category = "envoy.access_loggers",
# TODO(#9953) determine if this is core or should be cleaned up.
extra_visibility = [
"//test:__subpackages__",
],
security_posture = "robust_to_untrusted_downstream",
deps = [
"//include/envoy/registry",
"//source/common/config:config_provider_lib",
Expand Down
4 changes: 0 additions & 4 deletions source/extensions/access_loggers/grpc/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,11 @@ envoy_cc_extension(
name = "http_config",
srcs = ["http_config.cc"],
hdrs = ["http_config.h"],
category = "envoy.access_loggers",
# TODO(#9953) clean up.
extra_visibility = [
"//test/common/access_log:__subpackages__",
"//test/integration:__subpackages__",
],
security_posture = "robust_to_untrusted_downstream",
deps = [
":config_utils",
"//include/envoy/server:access_log_config_interface",
Expand All @@ -121,13 +119,11 @@ envoy_cc_extension(
name = "tcp_config",
srcs = ["tcp_config.cc"],
hdrs = ["tcp_config.h"],
category = "envoy.access_loggers",
# TODO(#9953) clean up.
extra_visibility = [
"//test/common/access_log:__subpackages__",
"//test/integration:__subpackages__",
],
security_posture = "robust_to_untrusted_downstream",
deps = [
":config_utils",
"//include/envoy/server:access_log_config_interface",
Expand Down
2 changes: 0 additions & 2 deletions source/extensions/access_loggers/open_telemetry/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,11 @@ envoy_cc_extension(
name = "config",
srcs = ["config.cc"],
hdrs = ["config.h"],
category = "envoy.access_loggers",
# TODO(#9953) clean up.
extra_visibility = [
"//test/common/access_log:__subpackages__",
"//test/integration:__subpackages__",
],
security_posture = "robust_to_untrusted_downstream",
deps = [
"//include/envoy/server:access_log_config_interface",
"//source/common/common:assert_lib",
Expand Down
2 changes: 0 additions & 2 deletions source/extensions/access_loggers/stream/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@ envoy_cc_extension(
name = "config",
srcs = ["config.cc"],
hdrs = ["config.h"],
category = "envoy.access_loggers",
extra_visibility = [
"//test:__subpackages__",
],
security_posture = "robust_to_untrusted_downstream",
deps = [
"//include/envoy/registry",
"//source/common/config:config_provider_lib",
Expand Down
3 changes: 0 additions & 3 deletions source/extensions/access_loggers/wasm/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ envoy_cc_extension(
name = "config",
srcs = ["config.cc"],
hdrs = ["config.h"],
category = "envoy.access_loggers",
security_posture = "unknown",
status = "alpha",
deps = [
":wasm_access_log_lib",
"//include/envoy/registry",
Expand Down
3 changes: 0 additions & 3 deletions source/extensions/bootstrap/wasm/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ envoy_cc_extension(
hdrs = [
"config.h",
],
category = "envoy.bootstrap",
security_posture = "unknown",
status = "alpha",
deps = [
"//include/envoy/registry",
"//include/envoy/server:bootstrap_extension_config_interface",
Expand Down
2 changes: 0 additions & 2 deletions source/extensions/clusters/aggregate/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ envoy_cc_extension(
"cluster.h",
"lb_context.h",
],
category = "envoy.clusters",
security_posture = "requires_trusted_downstream_and_upstream",
deps = [
"//source/common/upstream:cluster_factory_lib",
"//source/common/upstream:upstream_includes",
Expand Down
2 changes: 0 additions & 2 deletions source/extensions/clusters/dynamic_forward_proxy/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ envoy_cc_extension(
name = "cluster",
srcs = ["cluster.cc"],
hdrs = ["cluster.h"],
category = "envoy.clusters",
security_posture = "robust_to_untrusted_downstream",
deps = [
"//source/common/network:transport_socket_options_lib",
"//source/common/upstream:cluster_factory_lib",
Expand Down
2 changes: 0 additions & 2 deletions source/extensions/clusters/redis/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ envoy_cc_extension(
"redis_cluster.cc",
"redis_cluster.h",
],
category = "envoy.clusters",
security_posture = "requires_trusted_downstream_and_upstream",
deps = [
"redis_cluster_lb",
"//include/envoy/api:api_interface",
Expand Down
3 changes: 0 additions & 3 deletions source/extensions/common/crypto/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ envoy_cc_extension(
"crypto_impl.h",
"utility_impl.h",
],
category = "DELIBERATELY_OMITTED",
external_deps = [
"ssl",
],
Expand All @@ -27,8 +26,6 @@ envoy_cc_extension(
"//test/common/config:__subpackages__",
"//test/common/crypto:__subpackages__",
],
security_posture = "unknown",
undocumented = True,
deps = [
"//include/envoy/buffer:buffer_interface",
"//source/common/common:assert_lib",
Expand Down
2 changes: 0 additions & 2 deletions source/extensions/compression/brotli/compressor/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ envoy_cc_extension(
name = "config",
srcs = ["config.cc"],
hdrs = ["config.h"],
category = "envoy.compression.compressor",
security_posture = "robust_to_untrusted_downstream",
deps = [
":compressor_lib",
"//source/common/http:headers_lib",
Expand Down
2 changes: 0 additions & 2 deletions source/extensions/compression/brotli/decompressor/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ envoy_cc_extension(
name = "config",
srcs = ["config.cc"],
hdrs = ["config.h"],
category = "envoy.compression.decompressor",
security_posture = "robust_to_untrusted_downstream",
deps = [
":decompressor_lib",
"//source/common/http:headers_lib",
Expand Down
2 changes: 0 additions & 2 deletions source/extensions/compression/gzip/compressor/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ envoy_cc_extension(
name = "config",
srcs = ["config.cc"],
hdrs = ["config.h"],
category = "envoy.compression.compressor",
security_posture = "robust_to_untrusted_downstream",
deps = [
":compressor_lib",
"//source/common/http:headers_lib",
Expand Down
2 changes: 0 additions & 2 deletions source/extensions/compression/gzip/decompressor/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ envoy_cc_extension(
name = "config",
srcs = ["config.cc"],
hdrs = ["config.h"],
category = "envoy.compression.decompressor",
security_posture = "robust_to_untrusted_downstream",
deps = [
":zlib_decompressor_impl_lib",
"//source/common/http:headers_lib",
Expand Down
3 changes: 0 additions & 3 deletions source/extensions/filters/http/adaptive_concurrency/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ envoy_cc_extension(
name = "config",
srcs = ["config.cc"],
hdrs = ["config.h"],
category = "envoy.filters.http",
security_posture = "unknown",
status = "alpha",
deps = [
"//include/envoy/registry",
"//source/extensions/filters/http:well_known_names",
Expand Down
8 changes: 2 additions & 6 deletions source/extensions/filters/http/admission_control/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
load(
"//bazel:envoy_build_system.bzl",
"envoy_cc_extension",
"envoy_cc_library",
"envoy_extension_package",
)

Expand All @@ -11,7 +12,7 @@ licenses(["notice"]) # Apache 2

envoy_extension_package()

envoy_cc_extension(
envoy_cc_library(
name = "admission_control_filter_lib",
srcs = [
"admission_control.cc",
Expand All @@ -21,8 +22,6 @@ envoy_cc_extension(
"admission_control.h",
"thread_local_controller.h",
],
category = "envoy.filters.http",
security_posture = "unknown",
deps = [
"//include/envoy/http:filter_interface",
"//include/envoy/runtime:runtime_interface",
Expand All @@ -41,9 +40,6 @@ envoy_cc_extension(
name = "config",
srcs = ["config.cc"],
hdrs = ["config.h"],
category = "envoy.filters.http",
security_posture = "unknown",
status = "alpha",
deps = [
"//include/envoy/registry",
"//source/common/common:enum_to_int",
Expand Down
3 changes: 0 additions & 3 deletions source/extensions/filters/http/aws_lambda/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ envoy_cc_extension(
name = "config",
srcs = ["config.cc"],
hdrs = ["config.h"],
category = "envoy.filters.http",
security_posture = "requires_trusted_downstream_and_upstream",
status = "alpha",
deps = [
":aws_lambda_filter_lib",
"//include/envoy/registry",
Expand Down
3 changes: 0 additions & 3 deletions source/extensions/filters/http/aws_request_signing/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ envoy_cc_extension(
name = "config",
srcs = ["config.cc"],
hdrs = ["config.h"],
category = "envoy.filters.http",
security_posture = "requires_trusted_downstream_and_upstream",
status = "alpha",
deps = [
":aws_request_signing_filter_lib",
"//include/envoy/registry",
Expand Down
2 changes: 0 additions & 2 deletions source/extensions/filters/http/bandwidth_limit/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ envoy_cc_extension(
name = "config",
srcs = ["config.cc"],
hdrs = ["config.h"],
category = "envoy.filters.http",
security_posture = "unknown",
deps = [
":bandwidth_limit_lib",
"//include/envoy/http:filter_interface",
Expand Down
2 changes: 0 additions & 2 deletions source/extensions/filters/http/buffer/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ envoy_cc_extension(
name = "config",
srcs = ["config.cc"],
hdrs = ["config.h"],
category = "envoy.filters.http",
security_posture = "robust_to_untrusted_downstream",
# Legacy test use. TODO(#9953) clean up.
visibility = ["//visibility:public"],
deps = [
Expand Down
3 changes: 0 additions & 3 deletions source/extensions/filters/http/cache/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,6 @@ envoy_cc_extension(
name = "config",
srcs = ["config.cc"],
hdrs = ["config.h"],
category = "envoy.filters.http",
security_posture = "robust_to_untrusted_downstream_and_upstream",
status = "wip",
deps = [
":cache_filter_lib",
"//source/extensions/filters/http:well_known_names",
Expand Down
3 changes: 0 additions & 3 deletions source/extensions/filters/http/cache/simple_http_cache/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ envoy_cc_extension(
name = "config",
srcs = ["simple_http_cache.cc"],
hdrs = ["simple_http_cache.h"],
category = "envoy.filters.http.cache",
security_posture = "robust_to_untrusted_downstream_and_upstream",
status = "wip",
deps = [
"//include/envoy/registry",
"//include/envoy/runtime:runtime_interface",
Expand Down
3 changes: 0 additions & 3 deletions source/extensions/filters/http/cdn_loop/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ envoy_cc_extension(
name = "config",
srcs = ["config.cc"],
hdrs = ["config.h"],
category = "envoy.filters.http",
security_posture = "unknown",
status = "alpha",
deps = [
":filter_lib",
":parser_lib",
Expand Down
2 changes: 0 additions & 2 deletions source/extensions/filters/http/composite/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ envoy_cc_extension(
name = "config",
srcs = ["config.cc"],
hdrs = ["config.h"],
category = "envoy.filters.http",
security_posture = "unknown",
deps = [
"//include/envoy/registry",
"//include/envoy/server:filter_config_interface",
Expand Down
2 changes: 0 additions & 2 deletions source/extensions/filters/http/compressor/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ envoy_cc_extension(
name = "config",
srcs = ["config.cc"],
hdrs = ["config.h"],
category = "envoy.filters.http",
security_posture = "robust_to_untrusted_downstream",
deps = [
":compressor_filter_lib",
"//include/envoy/compression/compressor:compressor_config_interface",
Expand Down
2 changes: 0 additions & 2 deletions source/extensions/filters/http/cors/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,10 @@ envoy_cc_extension(
name = "config",
srcs = ["config.cc"],
hdrs = ["config.h"],
category = "envoy.filters.http",
# TODO(#9953) clean up.
extra_visibility = [
"//test/integration:__subpackages__",
],
security_posture = "robust_to_untrusted_downstream",
deps = [
"//include/envoy/registry",
"//include/envoy/server:filter_config_interface",
Expand Down
2 changes: 0 additions & 2 deletions source/extensions/filters/http/csrf/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ envoy_cc_extension(
name = "config",
srcs = ["config.cc"],
hdrs = ["config.h"],
category = "envoy.filters.http",
security_posture = "robust_to_untrusted_downstream",
deps = [
"//include/envoy/registry",
"//source/extensions/filters/http:well_known_names",
Expand Down
2 changes: 0 additions & 2 deletions source/extensions/filters/http/decompressor/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ envoy_cc_extension(
name = "config",
srcs = ["config.cc"],
hdrs = ["config.h"],
category = "envoy.filters.http",
security_posture = "robust_to_untrusted_downstream_and_upstream",
deps = [
":decompressor_filter_lib",
"//include/envoy/compression/decompressor:decompressor_config_interface",
Expand Down
2 changes: 0 additions & 2 deletions source/extensions/filters/http/dynamic_forward_proxy/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ envoy_cc_extension(
name = "config",
srcs = ["config.cc"],
hdrs = ["config.h"],
category = "envoy.filters.http",
security_posture = "robust_to_untrusted_downstream",
deps = [
"//include/envoy/registry",
"//include/envoy/server:filter_config_interface",
Expand Down
2 changes: 0 additions & 2 deletions source/extensions/filters/http/dynamo/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ envoy_cc_extension(
name = "config",
srcs = ["config.cc"],
hdrs = ["config.h"],
category = "envoy.filters.http",
security_posture = "requires_trusted_downstream_and_upstream",
deps = [
":dynamo_filter_lib",
"//include/envoy/registry",
Expand Down
Loading

0 comments on commit 57976d1

Please sign in to comment.