Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ bind(
)

# When updating envoy sha manually please update the sha in istio.deps file also
ENVOY_SHA = "280baee6dc45e48a4bf38ac03d32711fe5eaeee1"
ENVOY_SHA = "346059548e135199eb0b7f0006f3ef19e173bf79"

http_archive(
name = "envoy",
Expand Down
2 changes: 1 addition & 1 deletion istio.deps
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"name": "ENVOY_SHA",
"repoName": "envoyproxy/envoy",
"file": "WORKSPACE",
"lastStableSHA": "280baee6dc45e48a4bf38ac03d32711fe5eaeee1"
"lastStableSHA": "346059548e135199eb0b7f0006f3ef19e173bf79"
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,11 @@ class JwtVerificationFilterIntegrationTest
// Empty issuer_response_body indicates issuer will not be called.
// Mock a response from an issuer server.
if (!issuer_response_body.empty()) {
fake_upstream_connection_issuer =
fake_upstreams_[1]->waitForHttpConnection(*dispatcher_);
request_stream_issuer =
fake_upstream_connection_issuer->waitForNewStream(*dispatcher_);
request_stream_issuer->waitForEndStream(*dispatcher_);
ASSERT_TRUE(fake_upstreams_[1]->waitForHttpConnection(
*dispatcher_, fake_upstream_connection_issuer));
ASSERT_TRUE(fake_upstream_connection_issuer->waitForNewStream(
*dispatcher_, request_stream_issuer));
ASSERT_TRUE(request_stream_issuer->waitForEndStream(*dispatcher_));

request_stream_issuer->encodeHeaders(issuer_response_headers, false);
Buffer::OwnedImpl body(issuer_response_body);
Expand All @@ -150,12 +150,11 @@ class JwtVerificationFilterIntegrationTest
// Valid JWT case.
// Check if the request sent to the backend includes the expected one.
if (verification_success) {
fake_upstream_connection_backend =
fake_upstreams_[0]->waitForHttpConnection(*dispatcher_);
request_stream_backend =
fake_upstream_connection_backend->waitForNewStream(*dispatcher_);
request_stream_backend->waitForEndStream(*dispatcher_);

ASSERT_TRUE(fake_upstreams_[0]->waitForHttpConnection(
*dispatcher_, fake_upstream_connection_backend));
ASSERT_TRUE(fake_upstream_connection_backend->waitForNewStream(
*dispatcher_, request_stream_backend));
ASSERT_TRUE(request_stream_backend->waitForEndStream(*dispatcher_));
EXPECT_TRUE(request_stream_backend->complete());

ExpectHeaderIncluded(expected_headers, request_stream_backend->headers());
Expand All @@ -180,12 +179,12 @@ class JwtVerificationFilterIntegrationTest

codec_client->close();
if (!issuer_response_body.empty()) {
fake_upstream_connection_issuer->close();
fake_upstream_connection_issuer->waitForDisconnect();
ASSERT_TRUE(fake_upstream_connection_issuer->close());
ASSERT_TRUE(fake_upstream_connection_issuer->waitForDisconnect());
}
if (verification_success) {
fake_upstream_connection_backend->close();
fake_upstream_connection_backend->waitForDisconnect();
ASSERT_TRUE(fake_upstream_connection_backend->close());
ASSERT_TRUE(fake_upstream_connection_backend->waitForDisconnect());
}
}

Expand Down Expand Up @@ -373,11 +372,11 @@ TEST_P(JwtVerificationFilterIntegrationTestWithInjectedJwtResult,
codec_client = makeHttpConnection(lookupPort("http"));
// Send a request to Envoy.
response = codec_client->makeHeaderOnlyRequest(headers);
fake_upstream_connection_backend =
fake_upstreams_[0]->waitForHttpConnection(*dispatcher_);
request_stream_backend =
fake_upstream_connection_backend->waitForNewStream(*dispatcher_);
request_stream_backend->waitForEndStream(*dispatcher_);
ASSERT_TRUE(fake_upstreams_[0]->waitForHttpConnection(
*dispatcher_, fake_upstream_connection_backend));
ASSERT_TRUE(fake_upstream_connection_backend->waitForNewStream(
*dispatcher_, request_stream_backend));
ASSERT_TRUE(request_stream_backend->waitForEndStream(*dispatcher_));
EXPECT_TRUE(request_stream_backend->complete());

// With sanitization, the headers received by the backend should not
Expand All @@ -387,8 +386,8 @@ TEST_P(JwtVerificationFilterIntegrationTestWithInjectedJwtResult,

response->waitForEndStream();
codec_client->close();
fake_upstream_connection_backend->close();
fake_upstream_connection_backend->waitForDisconnect();
ASSERT_TRUE(fake_upstream_connection_backend->close());
ASSERT_TRUE(fake_upstream_connection_backend->waitForDisconnect());
}

} // namespace Envoy