diff --git a/bazel/envoy_examples.patch b/bazel/envoy_examples.patch deleted file mode 100644 index 5e4a66a9654d..000000000000 --- a/bazel/envoy_examples.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff --git a/single-page-app/verify.sh b/single-page-app/verify.sh -index 6e188e6..819661e 100755 ---- a/single-page-app/verify.sh -+++ b/single-page-app/verify.sh -@@ -149,7 +149,10 @@ test_auth () { - "${proxy_scheme}://localhost:${proxy_port}/login" \ - "${curl_args[@]}" - -- encoded_state=$(echo -n "{\"url\":\"${proxy_scheme}://localhost:${proxy_port}/login\",\"nonce\":\"12345678\"}" | basenc --base64url --wrap=0 | sed 's/=//g') -+ random=$(head /dev/urandom | xxd -p | head -c 16) -+ hmac=$(echo -n "${random}" | openssl dgst -sha256 -hmac "${HMAC_SECRET}" -binary|base64) -+ csrf_token=${random}.${hmac} -+ encoded_state=$(echo -n "{\"url\":\"${proxy_scheme}://localhost:${proxy_port}/login\",\"csrf_token\":\"${csrf_token}\"}" | basenc --base64url --wrap=0 | sed 's/=//g') - - run_log "Fetch the myhub authorization page" - if [[ "$STATE_BASE64URL_ENCODE" == "true" ]]; then -@@ -175,10 +178,10 @@ test_auth () { - run_log "Return to the app and receive creds" - if [[ "$STATE_BASE64URL_ENCODE" == "true" ]]; then - CODE=$(_curl "${curl_args[@]}" --head "http://localhost:${PORT_MYHUB}/authorize?client_id=0123456789&redirect_uri=${proxy_scheme}%3A%2F%2Flocalhost%3A${proxy_port}%2Fauthorize&response_type=code&scope=user%3Aemail&state=${encoded_state}" | grep Location | cut -d= -f2 | cut -d\& -f1) -- RESPONSE=$(_curl "${curl_args[@]}" --cookie "OauthNonce=12345678" --head "${proxy_scheme}://localhost:${proxy_port}/authorize?code=$CODE&state=${encoded_state}") -+ RESPONSE=$(_curl "${curl_args[@]}" --cookie "OauthNonce=${csrf_token}" --head "${proxy_scheme}://localhost:${proxy_port}/authorize?code=$CODE&state=${encoded_state}") - else - CODE=$(_curl "${curl_args[@]}" --head "http://localhost:${PORT_MYHUB}/authorize?client_id=0123456789&redirect_uri=${proxy_scheme}%3A%2F%2Flocalhost%3A${proxy_port}%2Fauthorize&response_type=code&scope=user%3Aemail&state=url%3D${proxy_scheme}%253A%252F%252Flocalhost%253A${proxy_port}%252Flogin%26nonce%3D12345678" | grep Location | cut -d= -f2 | cut -d\& -f1) -- RESPONSE=$(_curl "${curl_args[@]}" --cookie "OauthNonce=12345678" --head "${proxy_scheme}://localhost:${proxy_port}/authorize?code=$CODE&state=url%3D${proxy_scheme}%253A%252F%252Flocalhost%253A${proxy_port}%252Flogin%26nonce%3D12345678") -+ RESPONSE=$(_curl "${curl_args[@]}" --cookie "OauthNonce=${csrf_token}" --head "${proxy_scheme}://localhost:${proxy_port}/authorize?code=$CODE&state=url%3D${proxy_scheme}%253A%252F%252Flocalhost%253A${proxy_port}%252Flogin%26nonce%3D12345678") - fi - echo "$RESPONSE" | grep "HTTP/1.1 302 Found" - echo "$RESPONSE" | grep "location: ${proxy_scheme}://localhost:${proxy_port}/login" diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl index cabd51ea8dfc..cd15ec36f45f 100644 --- a/bazel/repositories.bzl +++ b/bazel/repositories.bzl @@ -219,11 +219,7 @@ def envoy_dependencies(skip_targets = []): external_http_archive("bazel_features") external_http_archive("bazel_toolchains") external_http_archive("bazel_compdb") - external_http_archive( - name = "envoy_examples", - patch_args = ["-p1"], - patches = ["@envoy//bazel:envoy_examples.patch"], - ) + external_http_archive("envoy_examples") _com_github_maxmind_libmaxminddb() diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl index 4b9164f030ae..f9b4e1a3ff40 100644 --- a/bazel/repository_locations.bzl +++ b/bazel/repository_locations.bzl @@ -96,12 +96,12 @@ REPOSITORY_LOCATIONS_SPEC = dict( project_name = "envoy_examples", project_desc = "Envoy proxy examples", project_url = "https://github.com/envoyproxy/examples", - version = "0.0.9", - sha256 = "c3b4acdebf3d3b31e9ce8cdf658bfb4dbe87a6314bf83a5ba10e8eabc69a478b", + version = "0.0.10", + sha256 = "a7b089e71228e781e566ff6f02c3acc2299eba1ad465d7878a7351bc52e7397b", strip_prefix = "examples-{version}", urls = ["https://github.com/envoyproxy/examples/archive/v{version}.tar.gz"], use_category = ["test_only"], - release_date = "2024-12-06", + release_date = "2025-01-08", cpe = "N/A", license = "Apache-2.0", license_url = "https://github.com/envoyproxy/examples/blob/v{version}/LICENSE",