diff --git a/source/common/filter/auth/client_ssl.cc b/source/common/filter/auth/client_ssl.cc index edce72ad5fcfc..0497f1f2a73cc 100644 --- a/source/common/filter/auth/client_ssl.cc +++ b/source/common/filter/auth/client_ssl.cc @@ -13,13 +13,12 @@ namespace Auth { namespace ClientSsl { Config::Config(const Json::Object& config, ThreadLocal::Instance& tls, Upstream::ClusterManager& cm, - Event::Dispatcher& dispatcher, Stats::Store& stats_store, Runtime::Loader& runtime, - const std::string& local_address) + Event::Dispatcher& dispatcher, Stats::Store& stats_store, Runtime::Loader& runtime) : tls_(tls), tls_slot_(tls.allocateSlot()), cm_(cm), auth_api_cluster_(config.getString("auth_api_cluster")), interval_timer_(dispatcher.createTimer([this]() -> void { refreshPrincipals(); })), ip_white_list_(config), stats_(generateStats(stats_store, config.getString("stat_prefix"))), - runtime_(runtime), local_address_(local_address) { + runtime_(runtime) { if (!cm_.get(auth_api_cluster_)) { throw EnvoyException( @@ -88,7 +87,6 @@ void Config::refreshPrincipals() { message->headers().addViaMoveValue(Http::Headers::get().Method, "GET"); message->headers().addViaMoveValue(Http::Headers::get().Path, "/v1/certs/list/approved"); message->headers().addViaCopy(Http::Headers::get().Host, auth_api_cluster_); - message->headers().addViaCopy(Http::Headers::get().ForwardedFor, local_address_); cm_.httpAsyncClientForCluster(auth_api_cluster_) .send(std::move(message), *this, Optional()); } diff --git a/source/common/filter/auth/client_ssl.h b/source/common/filter/auth/client_ssl.h index 5d83558ab85c8..52b95ec602456 100644 --- a/source/common/filter/auth/client_ssl.h +++ b/source/common/filter/auth/client_ssl.h @@ -66,8 +66,7 @@ typedef std::shared_ptr AllowedPrincipalsPtr; class Config : public Http::AsyncClient::Callbacks { public: Config(const Json::Object& config, ThreadLocal::Instance& tls, Upstream::ClusterManager& cm, - Event::Dispatcher& dispatcher, Stats::Store& stats_store, Runtime::Loader& runtime, - const std::string& local_address); + Event::Dispatcher& dispatcher, Stats::Store& stats_store, Runtime::Loader& runtime); const AllowedPrincipals& allowedPrincipals(); const Network::IpWhiteList& ipWhiteList() { return ip_white_list_; } @@ -91,7 +90,6 @@ class Config : public Http::AsyncClient::Callbacks { Network::IpWhiteList ip_white_list_; GlobalStats stats_; Runtime::Loader& runtime_; - const std::string local_address_; }; typedef std::shared_ptr ConfigPtr; diff --git a/source/common/http/async_client_impl.cc b/source/common/http/async_client_impl.cc index eb3d49d4ce71e..896f1288d3a4f 100644 --- a/source/common/http/async_client_impl.cc +++ b/source/common/http/async_client_impl.cc @@ -1,4 +1,5 @@ #include "async_client_impl.h" +#include "headers.h" namespace Http { @@ -10,10 +11,11 @@ AsyncClientImpl::AsyncClientImpl(const Upstream::Cluster& cluster, Stats::Store& Event::Dispatcher& dispatcher, const std::string& local_zone_name, Upstream::ClusterManager& cm, Runtime::Loader& runtime, Runtime::RandomGenerator& random, - Router::ShadowWriterPtr&& shadow_writer) + Router::ShadowWriterPtr&& shadow_writer, + const std::string& local_address) : cluster_(cluster), config_("http.async-client.", local_zone_name, stats_store, cm, runtime, random, std::move(shadow_writer)), - dispatcher_(dispatcher) {} + dispatcher_(dispatcher), local_address_(local_address) {} AsyncClientImpl::~AsyncClientImpl() { ASSERT(active_requests_.empty()); } @@ -39,6 +41,8 @@ AsyncRequestImpl::AsyncRequestImpl(MessagePtr&& request, AsyncClientImpl& parent request_info_(EMPTY_STRING), route_(parent_.cluster_.name(), timeout) { router_.setDecoderFilterCallbacks(*this); + request_->headers().addViaMoveValue(Headers::get().EnvoyInternalRequest, "true"); + request_->headers().addViaCopy(Headers::get().ForwardedFor, parent_.local_address_); router_.decodeHeaders(request_->headers(), !request_->body()); if (!complete_ && request_->body()) { router_.decodeData(*request_->body(), true); diff --git a/source/common/http/async_client_impl.h b/source/common/http/async_client_impl.h index bb9d5ff247c79..d13dff99ae579 100644 --- a/source/common/http/async_client_impl.h +++ b/source/common/http/async_client_impl.h @@ -24,7 +24,8 @@ class AsyncClientImpl final : public AsyncClient { AsyncClientImpl(const Upstream::Cluster& cluster, Stats::Store& stats_store, Event::Dispatcher& dispatcher, const std::string& local_zone_name, Upstream::ClusterManager& cm, Runtime::Loader& runtime, - Runtime::RandomGenerator& random, Router::ShadowWriterPtr&& shadow_writer); + Runtime::RandomGenerator& random, Router::ShadowWriterPtr&& shadow_writer, + const std::string& local_address); ~AsyncClientImpl(); // Http::AsyncClient @@ -36,6 +37,7 @@ class AsyncClientImpl final : public AsyncClient { Router::FilterConfig config_; Event::Dispatcher& dispatcher_; std::list> active_requests_; + const std::string local_address_; friend class AsyncRequestImpl; }; diff --git a/source/common/upstream/cluster_manager_impl.cc b/source/common/upstream/cluster_manager_impl.cc index 9dabc7f04dfdf..ac5c866b406de 100644 --- a/source/common/upstream/cluster_manager_impl.cc +++ b/source/common/upstream/cluster_manager_impl.cc @@ -20,7 +20,8 @@ ClusterManagerImpl::ClusterManagerImpl(const Json::Object& config, Stats::Store& Network::DnsResolver& dns_resolver, Ssl::ContextManager& ssl_context_manager, Runtime::Loader& runtime, Runtime::RandomGenerator& random, - const std::string& local_zone_name) + const std::string& local_zone_name, + const std::string& local_address) : runtime_(runtime), tls_(tls), stats_(stats), thread_local_slot_(tls.allocateSlot()) { std::vector clusters = config.getObjectArray("clusters"); @@ -43,11 +44,11 @@ ClusterManagerImpl::ClusterManagerImpl(const Json::Object& config, Stats::Store& } tls.set(thread_local_slot_, - [this, &stats, &runtime, &random, local_zone_name](Event::Dispatcher& dispatcher) - -> ThreadLocal::ThreadLocalObjectPtr { - return ThreadLocal::ThreadLocalObjectPtr{new ThreadLocalClusterManagerImpl( - *this, dispatcher, runtime, random, local_zone_name)}; - }); + [this, &stats, &runtime, &random, local_zone_name, local_address]( + Event::Dispatcher& dispatcher) -> ThreadLocal::ThreadLocalObjectPtr { + return ThreadLocal::ThreadLocalObjectPtr{new ThreadLocalClusterManagerImpl( + *this, dispatcher, runtime, random, local_zone_name, local_address)}; + }); // To avoid threading issues, for those clusters that start with hosts already in them (like // the static cluster), we need to post an update onto each thread to notify them of the update. @@ -204,11 +205,13 @@ Http::AsyncClient& ClusterManagerImpl::httpAsyncClientForCluster(const std::stri ClusterManagerImpl::ThreadLocalClusterManagerImpl::ThreadLocalClusterManagerImpl( ClusterManagerImpl& parent, Event::Dispatcher& dispatcher, Runtime::Loader& runtime, - Runtime::RandomGenerator& random, const std::string& local_zone_name) + Runtime::RandomGenerator& random, const std::string& local_zone_name, + const std::string& local_address) : parent_(parent), dispatcher_(dispatcher) { for (auto& cluster : parent.primary_clusters_) { - thread_local_clusters_[cluster.first].reset(new ClusterEntry( - *this, *cluster.second, runtime, random, parent.stats_, dispatcher, local_zone_name)); + thread_local_clusters_[cluster.first].reset(new ClusterEntry(*this, *cluster.second, runtime, + random, parent.stats_, dispatcher, + local_zone_name, local_address)); } for (auto& cluster : thread_local_clusters_) { @@ -275,11 +278,11 @@ void ClusterManagerImpl::ThreadLocalClusterManagerImpl::shutdown() { ClusterManagerImpl::ThreadLocalClusterManagerImpl::ClusterEntry::ClusterEntry( ThreadLocalClusterManagerImpl& parent, const Cluster& cluster, Runtime::Loader& runtime, Runtime::RandomGenerator& random, Stats::Store& stats_store, Event::Dispatcher& dispatcher, - const std::string& local_zone_name) + const std::string& local_zone_name, const std::string& local_address) : parent_(parent), primary_cluster_(cluster), - http_async_client_(cluster, stats_store, dispatcher, local_zone_name, parent.parent_, runtime, - random, - Router::ShadowWriterPtr{new Router::ShadowWriterImpl(parent.parent_)}) { + http_async_client_( + cluster, stats_store, dispatcher, local_zone_name, parent.parent_, runtime, random, + Router::ShadowWriterPtr{new Router::ShadowWriterImpl(parent.parent_)}, local_address) { switch (cluster.lbType()) { case LoadBalancerType::LeastRequest: { diff --git a/source/common/upstream/cluster_manager_impl.h b/source/common/upstream/cluster_manager_impl.h index c834b27341f7f..1f54f7aa89b9b 100644 --- a/source/common/upstream/cluster_manager_impl.h +++ b/source/common/upstream/cluster_manager_impl.h @@ -21,7 +21,7 @@ class ClusterManagerImpl : public ClusterManager { ClusterManagerImpl(const Json::Object& config, Stats::Store& stats, ThreadLocal::Instance& tls, Network::DnsResolver& dns_resolver, Ssl::ContextManager& ssl_context_manager, Runtime::Loader& runtime, Runtime::RandomGenerator& random, - const std::string& local_zone_name); + const std::string& local_zone_name, const std::string& local_address); // Upstream::ClusterManager void setInitializedCb(std::function callback) override { @@ -74,7 +74,7 @@ class ClusterManagerImpl : public ClusterManager { ClusterEntry(ThreadLocalClusterManagerImpl& parent, const Cluster& cluster, Runtime::Loader& runtime, Runtime::RandomGenerator& random, Stats::Store& stats_store, Event::Dispatcher& dispatcher, - const std::string& local_zone_name); + const std::string& local_zone_name, const std::string& local_address); Http::ConnectionPool::Instance* connPool(ResourcePriority priority); @@ -89,7 +89,8 @@ class ClusterManagerImpl : public ClusterManager { ThreadLocalClusterManagerImpl(ClusterManagerImpl& parent, Event::Dispatcher& dispatcher, Runtime::Loader& runtime, Runtime::RandomGenerator& random, - const std::string& local_zone_name); + const std::string& local_zone_name, + const std::string& local_address); void drainConnPools(HostPtr old_host, ConnPoolsContainer& container); static void updateClusterMembership(const std::string& name, ConstHostVectorPtr hosts, ConstHostVectorPtr healthy_hosts, diff --git a/source/server/config/network/client_ssl_auth.cc b/source/server/config/network/client_ssl_auth.cc index 0e287a9ba836f..9a2957c3a0a39 100644 --- a/source/server/config/network/client_ssl_auth.cc +++ b/source/server/config/network/client_ssl_auth.cc @@ -22,7 +22,7 @@ class ClientSslAuthConfigFactory : public NetworkFilterConfigFactory { Filter::Auth::ClientSsl::ConfigPtr config(new Filter::Auth::ClientSsl::Config( json_config, server.threadLocal(), server.clusterManager(), server.dispatcher(), - server.stats(), server.runtime(), server.getLocalAddress())); + server.stats(), server.runtime())); return [config](Network::Connection& connection) -> void { connection.addReadFilter( Network::ReadFilterPtr{new Filter::Auth::ClientSsl::Instance(config)}); diff --git a/source/server/configuration_impl.cc b/source/server/configuration_impl.cc index 76bda817e681e..c6ac349919d4e 100644 --- a/source/server/configuration_impl.cc +++ b/source/server/configuration_impl.cc @@ -21,7 +21,7 @@ void MainImpl::initialize(const std::string& file_path) { cluster_manager_.reset(new Upstream::ProdClusterManagerImpl( loader.getObject("cluster_manager"), server_.stats(), server_.threadLocal(), server_.dnsResolver(), server_.sslContextManager(), server_.runtime(), server_.random(), - server_.options().serviceZone())); + server_.options().serviceZone(), server_.getLocalAddress())); std::vector listeners = loader.getObjectArray("listeners"); log().notice("loading {} listener(s)", listeners.size()); diff --git a/test/common/filter/auth/client_ssl_test.cc b/test/common/filter/auth/client_ssl_test.cc index 8ab94f0c5646c..fd635eaf3ea5f 100644 --- a/test/common/filter/auth/client_ssl_test.cc +++ b/test/common/filter/auth/client_ssl_test.cc @@ -42,7 +42,7 @@ class ClientSslAuthFilterTest : public testing::Test { Json::StringLoader loader(json); EXPECT_CALL(cm_, get("vpn")); setupRequest(); - config_.reset(new Config(loader, tls_, cm_, dispatcher_, stats_store_, runtime_, "127.0.0.1")); + config_.reset(new Config(loader, tls_, cm_, dispatcher_, stats_store_, runtime_)); createAuthFilter(); } @@ -56,9 +56,8 @@ class ClientSslAuthFilterTest : public testing::Test { EXPECT_CALL(cm_, httpAsyncClientForCluster("vpn")).WillOnce(ReturnRef(cm_.async_client_)); EXPECT_CALL(cm_.async_client_, send_(_, _, _)) .WillOnce( - Invoke([this](Http::MessagePtr& request, Http::AsyncClient::Callbacks& callbacks, + Invoke([this](Http::MessagePtr&, Http::AsyncClient::Callbacks& callbacks, Optional) -> Http::AsyncClient::Request* { - EXPECT_EQ("127.0.0.1", request->headers().get("x-forwarded-for")); callbacks_ = &callbacks; return &request_; })); @@ -88,8 +87,7 @@ TEST_F(ClientSslAuthFilterTest, NoCluster) { Json::StringLoader loader(json); EXPECT_CALL(cm_, get("bad_cluster")).WillOnce(Return(nullptr)); - EXPECT_THROW(new Config(loader, tls_, cm_, dispatcher_, stats_store_, runtime_, "127.0.0.1"), - EnvoyException); + EXPECT_THROW(new Config(loader, tls_, cm_, dispatcher_, stats_store_, runtime_), EnvoyException); } TEST_F(ClientSslAuthFilterTest, Basic) { diff --git a/test/common/http/async_client_impl_test.cc b/test/common/http/async_client_impl_test.cc index 21c076b92f88a..c8ad3ef1237c9 100644 --- a/test/common/http/async_client_impl_test.cc +++ b/test/common/http/async_client_impl_test.cc @@ -24,7 +24,10 @@ namespace Http { class AsyncClientImplTest : public testing::Test { public: - AsyncClientImplTest() { + AsyncClientImplTest() + : client_(cm_.cluster_, stats_store_, dispatcher_, "from_az", cm_, runtime_, random_, + Router::ShadowWriterPtr{new NiceMock()}, + "local_address") { HttpTestUtility::addDefaultHeaders(message_->headers()); ON_CALL(*cm_.conn_pool_.host_, zone()).WillByDefault(ReturnRef(upstream_zone_)); ON_CALL(cm_.cluster_, altStatName()).WillByDefault(ReturnRef(EMPTY_STRING)); @@ -48,6 +51,7 @@ class AsyncClientImplTest : public testing::Test { NiceMock runtime_; NiceMock random_; Stats::IsolatedStoreImpl stats_store_; + AsyncClientImpl client_; }; TEST_F(AsyncClientImplTest, Basic) { @@ -62,19 +66,22 @@ TEST_F(AsyncClientImplTest, Basic) { return nullptr; })); - EXPECT_CALL(stream_encoder_, encodeHeaders(HeaderMapEqualRef(ByRef(message_->headers())), false)); + HeaderMapImpl copy(message_->headers()); + copy.addViaCopy("x-envoy-internal", "true"); + copy.addViaCopy("x-forwarded-for", "local_address"); + + EXPECT_CALL(stream_encoder_, encodeHeaders(HeaderMapEqualRef(ByRef(copy)), false)); EXPECT_CALL(stream_encoder_, encodeData(BufferEqual(&data), true)); expectSuccess(200); - AsyncClientImpl client(cm_.cluster_, stats_store_, dispatcher_, "from_az", cm_, runtime_, random_, - Router::ShadowWriterPtr{new NiceMock()}); - client.send(std::move(message_), callbacks_, Optional()); + client_.send(std::move(message_), callbacks_, Optional()); HeaderMapPtr response_headers(new HeaderMapImpl{{":status", "200"}}); response_decoder_->decodeHeaders(std::move(response_headers), false); response_decoder_->decodeData(data, true); EXPECT_EQ(1UL, stats_store_.counter("cluster.fake_cluster.upstream_rq_200").value()); + EXPECT_EQ(1UL, stats_store_.counter("cluster.fake_cluster.internal.upstream_rq_200").value()); } TEST_F(AsyncClientImplTest, Retry) { @@ -96,11 +103,9 @@ TEST_F(AsyncClientImplTest, Retry) { EXPECT_CALL(stream_encoder_, encodeHeaders(HeaderMapEqualRef(ByRef(message_->headers())), false)); EXPECT_CALL(stream_encoder_, encodeData(BufferEqual(&data), true)); - AsyncClientImpl client(cm_.cluster_, stats_store_, dispatcher_, "from_az", cm_, runtime_, random_, - Router::ShadowWriterPtr{new NiceMock()}); message_->headers().addViaCopy(Headers::get().EnvoyRetryOn, Headers::get().EnvoyRetryOnValues._5xx); - client.send(std::move(message_), callbacks_, Optional()); + client_.send(std::move(message_), callbacks_, Optional()); // Expect retry and retry timer create. timer_ = new NiceMock(&dispatcher_); @@ -143,9 +148,7 @@ TEST_F(AsyncClientImplTest, MultipleRequests) { EXPECT_CALL(stream_encoder_, encodeHeaders(HeaderMapEqualRef(ByRef(message_->headers())), false)); EXPECT_CALL(stream_encoder_, encodeData(BufferEqual(&data), true)); - AsyncClientImpl client(cm_.cluster_, stats_store_, dispatcher_, "from_az", cm_, runtime_, random_, - Router::ShadowWriterPtr{new NiceMock()}); - client.send(std::move(message_), callbacks_, Optional()); + client_.send(std::move(message_), callbacks_, Optional()); // Send request 2. MessagePtr message2{new RequestMessageImpl()}; @@ -161,7 +164,7 @@ TEST_F(AsyncClientImplTest, MultipleRequests) { return nullptr; })); EXPECT_CALL(stream_encoder2, encodeHeaders(HeaderMapEqualRef(ByRef(message2->headers())), true)); - client.send(std::move(message2), callbacks2, Optional()); + client_.send(std::move(message2), callbacks2, Optional()); // Finish request 2. HeaderMapPtr response_headers2(new HeaderMapImpl{{":status", "503"}}); @@ -191,9 +194,7 @@ TEST_F(AsyncClientImplTest, Trailers) { EXPECT_CALL(stream_encoder_, encodeData(BufferEqual(&data), true)); expectSuccess(200); - AsyncClientImpl client(cm_.cluster_, stats_store_, dispatcher_, "from_az", cm_, runtime_, random_, - Router::ShadowWriterPtr{new NiceMock()}); - client.send(std::move(message_), callbacks_, Optional()); + client_.send(std::move(message_), callbacks_, Optional()); HeaderMapPtr response_headers(new HeaderMapImpl{{":status", "200"}}); response_decoder_->decodeHeaders(std::move(response_headers), false); response_decoder_->decodeData(data, false); @@ -211,9 +212,7 @@ TEST_F(AsyncClientImplTest, ImmediateReset) { EXPECT_CALL(stream_encoder_, encodeHeaders(HeaderMapEqualRef(ByRef(message_->headers())), true)); expectSuccess(503); - AsyncClientImpl client(cm_.cluster_, stats_store_, dispatcher_, "from_az", cm_, runtime_, random_, - Router::ShadowWriterPtr{new NiceMock()}); - client.send(std::move(message_), callbacks_, Optional()); + client_.send(std::move(message_), callbacks_, Optional()); stream_encoder_.getStream().resetStream(StreamResetReason::RemoteReset); EXPECT_EQ(1UL, stats_store_.counter("cluster.fake_cluster.upstream_rq_503").value()); @@ -231,9 +230,7 @@ TEST_F(AsyncClientImplTest, ResetAfterResponseStart) { EXPECT_CALL(stream_encoder_, encodeHeaders(HeaderMapEqualRef(ByRef(message_->headers())), true)); EXPECT_CALL(callbacks_, onFailure(_)); - AsyncClientImpl client(cm_.cluster_, stats_store_, dispatcher_, "from_az", cm_, runtime_, random_, - Router::ShadowWriterPtr{new NiceMock()}); - client.send(std::move(message_), callbacks_, Optional()); + client_.send(std::move(message_), callbacks_, Optional()); HeaderMapPtr response_headers(new HeaderMapImpl{{":status", "200"}}); response_decoder_->decodeHeaders(std::move(response_headers), false); stream_encoder_.getStream().resetStream(StreamResetReason::RemoteReset); @@ -250,10 +247,8 @@ TEST_F(AsyncClientImplTest, CancelRequest) { EXPECT_CALL(stream_encoder_, encodeHeaders(HeaderMapEqualRef(ByRef(message_->headers())), true)); EXPECT_CALL(stream_encoder_.stream_, resetStream(_)); - AsyncClientImpl client(cm_.cluster_, stats_store_, dispatcher_, "from_az", cm_, runtime_, random_, - Router::ShadowWriterPtr{new NiceMock()}); AsyncClient::Request* request = - client.send(std::move(message_), callbacks_, Optional()); + client_.send(std::move(message_), callbacks_, Optional()); request->cancel(); } @@ -267,10 +262,8 @@ TEST_F(AsyncClientImplTest, PoolFailure) { })); expectSuccess(503); - AsyncClientImpl client(cm_.cluster_, stats_store_, dispatcher_, "from_az", cm_, runtime_, random_, - Router::ShadowWriterPtr{new NiceMock()}); EXPECT_EQ(nullptr, - client.send(std::move(message_), callbacks_, Optional())); + client_.send(std::move(message_), callbacks_, Optional())); EXPECT_EQ(1UL, stats_store_.counter("cluster.fake_cluster.upstream_rq_503").value()); } @@ -288,9 +281,7 @@ TEST_F(AsyncClientImplTest, RequestTimeout) { timer_ = new NiceMock(&dispatcher_); EXPECT_CALL(*timer_, enableTimer(std::chrono::milliseconds(40))); EXPECT_CALL(stream_encoder_.stream_, resetStream(_)); - AsyncClientImpl client(cm_.cluster_, stats_store_, dispatcher_, "from_az", cm_, runtime_, random_, - Router::ShadowWriterPtr{new NiceMock()}); - client.send(std::move(message_), callbacks_, std::chrono::milliseconds(40)); + client_.send(std::move(message_), callbacks_, std::chrono::milliseconds(40)); timer_->callback_(); EXPECT_EQ(1UL, @@ -311,10 +302,8 @@ TEST_F(AsyncClientImplTest, DisableTimer) { EXPECT_CALL(*timer_, enableTimer(std::chrono::milliseconds(200))); EXPECT_CALL(*timer_, disableTimer()); EXPECT_CALL(stream_encoder_.stream_, resetStream(_)); - AsyncClientImpl client(cm_.cluster_, stats_store_, dispatcher_, "from_az", cm_, runtime_, random_, - Router::ShadowWriterPtr{new NiceMock()}); AsyncClient::Request* request = - client.send(std::move(message_), callbacks_, std::chrono::milliseconds(200)); + client_.send(std::move(message_), callbacks_, std::chrono::milliseconds(200)); request->cancel(); } diff --git a/test/common/upstream/cluster_manager_impl_test.cc b/test/common/upstream/cluster_manager_impl_test.cc index df6cfd9d920d7..c8c009007bac7 100644 --- a/test/common/upstream/cluster_manager_impl_test.cc +++ b/test/common/upstream/cluster_manager_impl_test.cc @@ -34,7 +34,7 @@ class ClusterManagerImplTest : public testing::Test { void create(const Json::Object& config) { cluster_manager_.reset(new ClusterManagerImplForTest(config, stats_, tls_, dns_resolver_, ssl_context_manager_, runtime_, random_, - "us-east-1d")); + "us-east-1d", "local_address")); } Stats::IsolatedStoreImpl stats_;