Skip to content

Commit

Permalink
Add bazel option for enabling Universal Header Validator (envoyproxy#…
Browse files Browse the repository at this point in the history
…20845)

Signed-off-by: Yan Avlasov <yavlasov@google.com>
Signed-off-by: Andre Vehreschild <vehre@x41-dsec.de>
  • Loading branch information
yanavlasov authored and vehre-x41 committed Apr 19, 2022
1 parent 368cdec commit f0ceff0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
10 changes: 10 additions & 0 deletions bazel/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,16 @@ config_setting(
values = {"define": "wasm=disabled"},
)

# This config setting enables Universal Header Validator and disables
# HTTP header compliance checks in codecs.
# This setting is temporary to transition header validation into UHV without
# impacting production builds of Envoy.
# This setting is enabled for the bazel.compile_time_options CI target.
config_setting(
name = "uhv_enabled",
values = {"define": "uhv=enabled"},
)

# Alias pointing to the selected version of BoringSSL:
# - BoringSSL FIPS from @boringssl_fips//:ssl,
# - non-FIPS BoringSSL from @boringssl//:ssl.
Expand Down
3 changes: 3 additions & 0 deletions bazel/envoy_internal.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ def envoy_copts(repository, test = False):
# APPLE_USE_RFC_3542 is needed to support IPV6_PKTINFO in MAC OS.
repository + "//bazel:apple": ["-D__APPLE_USE_RFC_3542"],
"//conditions:default": [],
}) + select({
repository + "//bazel:uhv_enabled": ["-DENVOY_ENABLE_UHV"],
"//conditions:default": [],
}) + envoy_select_hot_restart(["-DENVOY_HOT_RESTART"], repository) + \
envoy_select_enable_http3(["-DENVOY_ENABLE_QUIC"], repository) + \
_envoy_select_perf_annotation(["-DENVOY_PERF_ANNOTATION"]) + \
Expand Down
1 change: 1 addition & 0 deletions ci/do_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ elif [[ "$CI_TARGET" == "bazel.compile_time_options" ]]; then
"--define" "deprecated_features=disabled"
"--define" "tcmalloc=gperftools"
"--define" "zlib=ng"
"--define" "uhv=enabled"
"--@envoy//bazel:http3=False"
"--@envoy//source/extensions/filters/http/kill_request:enabled"
"--test_env=ENVOY_HAS_EXTRA_EXTENSIONS=true")
Expand Down

0 comments on commit f0ceff0

Please sign in to comment.