LCOV - code coverage report
Current view: top level - source/server/admin - admin.h (source / functions) Hit Total Coverage
Test: coverage.dat Lines: 133 179 74.3 %
Date: 2024-01-05 06:35:25 Functions: 84 120 70.0 %

          Line data    Source code
       1             : #pragma once
       2             : 
       3             : #include <chrono>
       4             : #include <functional>
       5             : #include <list>
       6             : #include <string>
       7             : #include <utility>
       8             : #include <vector>
       9             : 
      10             : #include "envoy/http/filter.h"
      11             : #include "envoy/http/request_id_extension.h"
      12             : #include "envoy/network/filter.h"
      13             : #include "envoy/network/listen_socket.h"
      14             : #include "envoy/server/admin.h"
      15             : #include "envoy/server/instance.h"
      16             : #include "envoy/server/listener_manager.h"
      17             : #include "envoy/upstream/outlier_detection.h"
      18             : #include "envoy/upstream/resource_manager.h"
      19             : 
      20             : #include "source/common/common/assert.h"
      21             : #include "source/common/common/basic_resource_impl.h"
      22             : #include "source/common/common/empty_string.h"
      23             : #include "source/common/common/logger.h"
      24             : #include "source/common/common/macros.h"
      25             : #include "source/common/http/conn_manager_config.h"
      26             : #include "source/common/http/conn_manager_impl.h"
      27             : #include "source/common/http/date_provider_impl.h"
      28             : #include "source/common/http/default_server_string.h"
      29             : #include "source/common/http/http1/codec_stats.h"
      30             : #include "source/common/http/http2/codec_stats.h"
      31             : #include "source/common/http/request_id_extension_impl.h"
      32             : #include "source/common/http/utility.h"
      33             : #include "source/common/network/connection_balancer_impl.h"
      34             : #include "source/common/network/raw_buffer_socket.h"
      35             : #include "source/common/router/scoped_config_impl.h"
      36             : #include "source/common/stats/isolated_store_impl.h"
      37             : #include "source/extensions/filters/http/common/pass_through_filter.h"
      38             : #include "source/server/admin/admin_factory_context.h"
      39             : #include "source/server/admin/admin_filter.h"
      40             : #include "source/server/admin/clusters_handler.h"
      41             : #include "source/server/admin/config_dump_handler.h"
      42             : #include "source/server/admin/config_tracker_impl.h"
      43             : #include "source/server/admin/init_dump_handler.h"
      44             : #include "source/server/admin/listeners_handler.h"
      45             : #include "source/server/admin/logs_handler.h"
      46             : #include "source/server/admin/profiling_handler.h"
      47             : #include "source/server/admin/runtime_handler.h"
      48             : #include "source/server/admin/server_cmd_handler.h"
      49             : #include "source/server/admin/server_info_handler.h"
      50             : #include "source/server/admin/stats_handler.h"
      51             : #include "source/server/null_overload_manager.h"
      52             : 
      53             : #include "absl/strings/string_view.h"
      54             : 
      55             : namespace Envoy {
      56             : namespace Server {
      57             : 
      58             : class AdminInternalAddressConfig : public Http::InternalAddressConfig {
      59          98 :   bool isInternalAddress(const Network::Address::Instance&) const override { return false; }
      60             : };
      61             : 
      62             : /**
      63             :  * Implementation of Server::Admin.
      64             :  */
      65             : class AdminImpl : public Admin,
      66             :                   public Network::FilterChainManager,
      67             :                   public Network::FilterChainFactory,
      68             :                   public Http::FilterChainFactory,
      69             :                   public Http::ConnectionManagerConfig,
      70             :                   Logger::Loggable<Logger::Id::admin> {
      71             : public:
      72             :   AdminImpl(const std::string& profile_path, Server::Instance& server,
      73             :             bool ignore_global_conn_limit);
      74             : 
      75             :   Http::Code runCallback(Http::ResponseHeaderMap& response_headers, Buffer::Instance& response,
      76             :                          AdminStream& admin_stream);
      77         168 :   const Network::Socket& socket() override { return *socket_; }
      78           0 :   Network::Socket& mutableSocket() { return *socket_; }
      79             : 
      80          98 :   Configuration::FactoryContext& factoryContext() { return factory_context_; }
      81             : 
      82             :   // Server::Admin
      83             :   // TODO(jsedgwick) These can be managed with a generic version of ConfigTracker.
      84             :   // Wins would be no manual removeHandler() and code reuse.
      85             :   //
      86             :   // The prefix must start with "/" and contain at least one additional character.
      87             :   bool addHandler(const std::string& prefix, const std::string& help_text, HandlerCb callback,
      88             :                   bool removable, bool mutates_server_state,
      89             :                   const ParamDescriptorVec& params = {}) override;
      90             :   bool addStreamingHandler(const std::string& prefix, const std::string& help_text,
      91             :                            GenRequestFn callback, bool removable, bool mutates_server_state,
      92             :                            const ParamDescriptorVec& params = {}) override;
      93             :   bool removeHandler(const std::string& prefix) override;
      94             :   ConfigTracker& getConfigTracker() override;
      95             : 
      96             :   void startHttpListener(std::list<AccessLog::InstanceSharedPtr> access_logs,
      97             :                          Network::Address::InstanceConstSharedPtr address,
      98             :                          Network::Socket::OptionsSharedPtr socket_options) override;
      99           0 :   uint32_t concurrency() const override { return server_.options().concurrency(); }
     100             : 
     101             :   // Network::FilterChainManager
     102             :   const Network::FilterChain* findFilterChain(const Network::ConnectionSocket&,
     103          98 :                                               const StreamInfo::StreamInfo&) const override {
     104          98 :     return admin_filter_chain_.get();
     105          98 :   }
     106             : 
     107             :   // Network::FilterChainFactory
     108             :   bool
     109             :   createNetworkFilterChain(Network::Connection& connection,
     110             :                            const Filter::NetworkFilterFactoriesList& filter_factories) override;
     111          98 :   bool createListenerFilterChain(Network::ListenerFilterManager&) override { return true; }
     112             :   void createUdpListenerFilterChain(Network::UdpListenerFilterManager&,
     113           0 :                                     Network::UdpReadFilterCallbacks&) override {}
     114           0 :   bool createQuicListenerFilterChain(Network::QuicListenerFilterManager&) override { return true; }
     115             : 
     116             :   // Http::FilterChainFactory
     117             :   bool createFilterChain(Http::FilterChainManager& manager, bool,
     118             :                          const Http::FilterChainOptions&) const override;
     119             :   bool createUpgradeFilterChain(absl::string_view, const Http::FilterChainFactory::UpgradeMap*,
     120           0 :                                 Http::FilterChainManager&) const override {
     121           0 :     return false;
     122           0 :   }
     123             : 
     124             :   // Http::ConnectionManagerConfig
     125           0 :   const Http::RequestIDExtensionSharedPtr& requestIDExtension() override {
     126           0 :     return request_id_extension_;
     127           0 :   }
     128          98 :   const std::list<AccessLog::InstanceSharedPtr>& accessLogs() override { return access_logs_; }
     129          98 :   bool flushAccessLogOnNewRequest() override { return flush_access_log_on_new_request_; }
     130           0 :   bool flushAccessLogOnTunnelSuccessfullyEstablished() const override { return false; }
     131          98 :   const absl::optional<std::chrono::milliseconds>& accessLogFlushInterval() override {
     132          98 :     return null_access_log_flush_interval_;
     133          98 :   }
     134             :   Http::ServerConnectionPtr createCodec(Network::Connection& connection,
     135             :                                         const Buffer::Instance& data,
     136             :                                         Http::ServerConnectionCallbacks& callbacks,
     137             :                                         Server::OverloadManager& overload_manager) override;
     138          98 :   Http::DateProvider& dateProvider() override { return date_provider_; }
     139           0 :   std::chrono::milliseconds drainTimeout() const override { return std::chrono::milliseconds(100); }
     140          98 :   Http::FilterChainFactory& filterFactory() override { return *this; }
     141          98 :   bool generateRequestId() const override { return false; }
     142           0 :   bool preserveExternalRequestId() const override { return false; }
     143          98 :   bool alwaysSetRequestIdInResponse() const override { return false; }
     144          98 :   absl::optional<std::chrono::milliseconds> idleTimeout() const override { return idle_timeout_; }
     145         392 :   bool isRoutable() const override { return false; }
     146          98 :   absl::optional<std::chrono::milliseconds> maxConnectionDuration() const override {
     147          98 :     return max_connection_duration_;
     148          98 :   }
     149          98 :   uint32_t maxRequestHeadersKb() const override { return max_request_headers_kb_; }
     150          98 :   uint32_t maxRequestHeadersCount() const override { return max_request_headers_count_; }
     151          98 :   std::chrono::milliseconds streamIdleTimeout() const override { return {}; }
     152          98 :   std::chrono::milliseconds requestTimeout() const override { return {}; }
     153          98 :   std::chrono::milliseconds requestHeadersTimeout() const override { return {}; }
     154          98 :   std::chrono::milliseconds delayedCloseTimeout() const override { return {}; }
     155          98 :   absl::optional<std::chrono::milliseconds> maxStreamDuration() const override {
     156          98 :     return max_stream_duration_;
     157          98 :   }
     158          98 :   Router::RouteConfigProvider* routeConfigProvider() override { return &route_config_provider_; }
     159           0 :   Config::ConfigProvider* scopedRouteConfigProvider() override {
     160           0 :     return &scoped_route_config_provider_;
     161           0 :   }
     162           0 :   OptRef<const Router::ScopeKeyBuilder> scopeKeyBuilder() override { return scope_key_builder_; }
     163         196 :   const std::string& serverName() const override { return Http::DefaultServerString::get(); }
     164          98 :   const absl::optional<std::string>& schemeToSet() const override { return scheme_; }
     165             :   HttpConnectionManagerProto::ServerHeaderTransformation
     166          98 :   serverHeaderTransformation() const override {
     167          98 :     return HttpConnectionManagerProto::OVERWRITE;
     168          98 :   }
     169          98 :   Http::ConnectionManagerStats& stats() override { return stats_; }
     170           0 :   Http::ConnectionManagerTracingStats& tracingStats() override { return tracing_stats_; }
     171         196 :   bool useRemoteAddress() const override { return true; }
     172          98 :   const Http::InternalAddressConfig& internalAddressConfig() const override {
     173          98 :     return internal_address_config_;
     174          98 :   }
     175          98 :   uint32_t xffNumTrustedHops() const override { return 0; }
     176          98 :   bool skipXffAppend() const override { return false; }
     177         196 :   const std::string& via() const override { return EMPTY_STRING; }
     178         196 :   Http::ForwardClientCertType forwardClientCert() const override {
     179         196 :     return Http::ForwardClientCertType::Sanitize;
     180         196 :   }
     181           0 :   const std::vector<Http::ClientCertDetailsType>& setCurrentClientCertDetails() const override {
     182           0 :     return set_current_client_cert_details_;
     183           0 :   }
     184             :   const Network::Address::Instance& localAddress() override;
     185          98 :   const absl::optional<std::string>& userAgent() override { return user_agent_; }
     186           0 :   Tracing::TracerSharedPtr tracer() override { return nullptr; }
     187         196 :   const Http::TracingConnectionManagerConfig* tracingConfig() override { return nullptr; }
     188          98 :   Http::ConnectionManagerListenerStats& listenerStats() override { return listener_->stats_; }
     189         196 :   bool proxy100Continue() const override { return false; }
     190           0 :   bool streamErrorOnInvalidHttpMessaging() const override { return false; }
     191           0 :   const Http::Http1Settings& http1Settings() const override { return http1_settings_; }
     192          98 :   bool shouldNormalizePath() const override { return true; }
     193          98 :   bool shouldMergeSlashes() const override { return true; }
     194          98 :   bool shouldStripTrailingHostDot() const override { return false; }
     195         196 :   Http::StripPortType stripPortType() const override { return Http::StripPortType::None; }
     196             :   envoy::config::core::v3::HttpProtocolOptions::HeadersWithUnderscoresAction
     197          98 :   headersWithUnderscoresAction() const override {
     198          98 :     return envoy::config::core::v3::HttpProtocolOptions::ALLOW;
     199          98 :   }
     200          98 :   const LocalReply::LocalReply& localReply() const override { return *local_reply_; }
     201             :   envoy::extensions::filters::network::http_connection_manager::v3::HttpConnectionManager::
     202             :       PathWithEscapedSlashesAction
     203          98 :       pathWithEscapedSlashesAction() const override {
     204          98 :     return envoy::extensions::filters::network::http_connection_manager::v3::HttpConnectionManager::
     205          98 :         KEEP_UNCHANGED;
     206          98 :   }
     207             :   const std::vector<Http::OriginalIPDetectionSharedPtr>&
     208           0 :   originalIpDetectionExtensions() const override {
     209           0 :     return detection_extensions_;
     210           0 :   }
     211          98 :   const std::vector<Http::EarlyHeaderMutationPtr>& earlyHeaderMutationExtensions() const override {
     212          98 :     return early_header_mutations_;
     213          98 :   }
     214             :   Http::Code request(absl::string_view path_and_query, absl::string_view method,
     215             :                      Http::ResponseHeaderMap& response_headers, std::string& body) override;
     216             :   void closeSocket() override;
     217             :   void addListenerToHandler(Network::ConnectionHandler* handler) override;
     218             : 
     219          98 :   GenRequestFn createRequestFunction() const {
     220          98 :     return [this](AdminStream& admin_stream) -> RequestPtr { return makeRequest(admin_stream); };
     221          98 :   }
     222          98 :   uint64_t maxRequestsPerConnection() const override { return 0; }
     223         196 :   const HttpConnectionManagerProto::ProxyStatusConfig* proxyStatusConfig() const override {
     224         196 :     return proxy_status_config_.get();
     225         196 :   }
     226             :   Http::ServerHeaderValidatorPtr
     227          98 :   makeHeaderValidator([[maybe_unused]] Http::Protocol protocol) override {
     228             : #ifdef ENVOY_ENABLE_UHV
     229             :     ENVOY_BUG(header_validator_factory_ != nullptr,
     230             :               "Admin HCM config can not have null UHV factory.");
     231             :     return header_validator_factory_ ? header_validator_factory_->createServerHeaderValidator(
     232             :                                            protocol, getHeaderValidatorStats(protocol))
     233             :                                      : nullptr;
     234             : #else
     235          98 :     return nullptr;
     236          98 : #endif
     237          98 :   }
     238         196 :   bool appendXForwardedPort() const override { return false; }
     239          98 :   bool addProxyProtocolConnectionState() const override { return true; }
     240             : 
     241             : private:
     242             :   friend class AdminTestingPeer;
     243             : 
     244             : #ifdef ENVOY_ENABLE_UHV
     245             :   ::Envoy::Http::HeaderValidatorStats& getHeaderValidatorStats(Http::Protocol protocol);
     246             : #endif
     247             : 
     248             :   /**
     249             :    * Creates a Request from the request in the admin stream.
     250             :    */
     251             :   RequestPtr makeRequest(AdminStream& admin_stream) const;
     252             : 
     253             :   /**
     254             :    * Creates a UrlHandler structure from a non-chunked callback.
     255             :    */
     256             :   UrlHandler makeHandler(const std::string& prefix, const std::string& help_text,
     257             :                          HandlerCb callback, bool removable, bool mutates_state,
     258             :                          const ParamDescriptorVec& params = {});
     259             : 
     260             :   /**
     261             :    * Creates a URL prefix bound to chunked handler. Handler is expected to
     262             :    * supply a method makeRequest(AdminStream&).
     263             :    *
     264             :    * @param prefix the prefix to register
     265             :    * @param help_text a help text ot display in a table in the admin home page
     266             :    * @param handler the Handler object for the admin subsystem, supplying makeContext().
     267             :    * @param removeable indicates whether the handler can be removed after being added
     268             :    * @param mutates_state indicates whether the handler will mutate state and therefore
     269             :    *                      must be accessed via HTTP POST rather than GET.
     270             :    * @return the UrlHandler.
     271             :    */
     272             :   template <class Handler>
     273             :   UrlHandler makeStreamingHandler(const std::string& prefix, const std::string& help_text,
     274             :                                   Handler& handler, bool removable, bool mutates_state) {
     275             :     return {prefix, help_text,
     276             :             [&handler](AdminStream& admin_stream) -> Admin::RequestPtr {
     277             :               return handler.makeRequest(admin_stream);
     278             :             },
     279             :             removable, mutates_state};
     280             :   }
     281             : 
     282             :   /**
     283             :    * Implementation of RouteConfigProvider that returns a static null route config.
     284             :    */
     285             :   struct NullRouteConfigProvider : public Router::RouteConfigProvider {
     286             :     NullRouteConfigProvider(TimeSource& time_source);
     287             : 
     288             :     // Router::RouteConfigProvider
     289           0 :     Rds::ConfigConstSharedPtr config() const override { return config_; }
     290           0 :     const absl::optional<ConfigInfo>& configInfo() const override { return config_info_; }
     291           0 :     SystemTime lastUpdated() const override { return time_source_.systemTime(); }
     292           0 :     absl::Status onConfigUpdate() override { return absl::OkStatus(); }
     293          98 :     Router::ConfigConstSharedPtr configCast() const override { return config_; }
     294             :     void requestVirtualHostsUpdate(const std::string&, Event::Dispatcher&,
     295           0 :                                    std::weak_ptr<Http::RouteConfigUpdatedCallback>) override {}
     296             : 
     297             :     Router::ConfigConstSharedPtr config_;
     298             :     absl::optional<ConfigInfo> config_info_;
     299             :     TimeSource& time_source_;
     300             :   };
     301             : 
     302             :   /**
     303             :    * Implementation of ScopedRouteConfigProvider that returns a null scoped route config.
     304             :    */
     305             :   struct NullScopedRouteConfigProvider : public Config::ConfigProvider {
     306             :     NullScopedRouteConfigProvider(TimeSource& time_source)
     307             :         : config_(std::make_shared<const Router::NullScopedConfigImpl>()),
     308         134 :           time_source_(time_source) {}
     309             : 
     310         134 :     ~NullScopedRouteConfigProvider() override = default;
     311             : 
     312             :     // Config::ConfigProvider
     313           0 :     SystemTime lastUpdated() const override { return time_source_.systemTime(); }
     314           0 :     const Protobuf::Message* getConfigProto() const override { return nullptr; }
     315           0 :     std::string getConfigVersion() const override { return ""; }
     316           0 :     ConfigConstSharedPtr getConfig() const override { return config_; }
     317           0 :     ApiType apiType() const override { return ApiType::Full; }
     318           0 :     ConfigProtoVector getConfigProtos() const override { return {}; }
     319             : 
     320             :     Router::ScopedConfigConstSharedPtr config_;
     321             :     TimeSource& time_source_;
     322             :   };
     323             : 
     324             :   /**
     325             :    * Implementation of ScopeKeyBuilder that returns a null scope key.
     326             :    */
     327             :   struct NullScopeKeyBuilder : public Router::ScopeKeyBuilder {
     328         134 :     NullScopeKeyBuilder() = default;
     329         134 :     ~NullScopeKeyBuilder() override = default;
     330             : 
     331           0 :     Router::ScopeKeyPtr computeScopeKey(const Http::HeaderMap&) const override { return nullptr; };
     332             :   };
     333             : 
     334             :   std::vector<const UrlHandler*> sortedHandlers() const;
     335             :   envoy::admin::v3::ServerInfo::State serverState();
     336             : 
     337             :   /**
     338             :    * URL handlers.
     339             :    */
     340             :   Http::Code handlerAdminHome(Http::ResponseHeaderMap& response_headers, Buffer::Instance& response,
     341             :                               AdminStream&);
     342             : 
     343             :   Http::Code handlerHelp(Http::ResponseHeaderMap& response_headers, Buffer::Instance& response,
     344             :                          AdminStream&);
     345             :   void getHelp(Buffer::Instance& response) const;
     346             : 
     347             :   class AdminListenSocketFactory : public Network::ListenSocketFactory {
     348             :   public:
     349          98 :     AdminListenSocketFactory(Network::SocketSharedPtr socket) : socket_(socket) {}
     350             : 
     351             :     // Network::ListenSocketFactory
     352          98 :     Network::Socket::Type socketType() const override { return socket_->socketType(); }
     353          98 :     const Network::Address::InstanceConstSharedPtr& localAddress() const override {
     354          98 :       return socket_->connectionInfoProvider().localAddress();
     355          98 :     }
     356          98 :     Network::SocketSharedPtr getListenSocket(uint32_t) override {
     357             :       // This is only supposed to be called once.
     358          98 :       RELEASE_ASSERT(!socket_create_, "AdminListener's socket shouldn't be shared.");
     359          98 :       socket_create_ = true;
     360          98 :       return socket_;
     361          98 :     }
     362           0 :     Network::ListenSocketFactoryPtr clone() const override { return nullptr; }
     363           0 :     void closeAllSockets() override {}
     364           0 :     void doFinalPreWorkerInit() override {}
     365             : 
     366             :   private:
     367             :     Network::SocketSharedPtr socket_;
     368             :     bool socket_create_{false};
     369             :   };
     370             : 
     371             :   class AdminListener : public Network::ListenerConfig {
     372             :   public:
     373             :     AdminListener(AdminImpl& parent, Stats::Scope& listener_scope)
     374             :         : parent_(parent), name_("admin"), scope_(listener_scope),
     375             :           stats_(Http::ConnectionManagerImpl::generateListenerStats("http.admin.", scope_)),
     376          98 :           init_manager_(nullptr), ignore_global_conn_limit_(parent.ignore_global_conn_limit_) {}
     377             : 
     378             :     // Network::ListenerConfig
     379          98 :     Network::FilterChainManager& filterChainManager() override { return parent_; }
     380         196 :     Network::FilterChainFactory& filterChainFactory() override { return parent_; }
     381         196 :     std::vector<Network::ListenSocketFactoryPtr>& listenSocketFactories() override {
     382         196 :       return parent_.socket_factories_;
     383         196 :     }
     384          98 :     bool bindToPort() const override { return true; }
     385          98 :     bool handOffRestoredDestinationConnections() const override { return false; }
     386          98 :     uint32_t perConnectionBufferLimitBytes() const override { return 0; }
     387          98 :     std::chrono::milliseconds listenerFiltersTimeout() const override { return {}; }
     388          98 :     bool continueOnListenerFiltersTimeout() const override { return false; }
     389        1568 :     Stats::Scope& listenerScope() override { return scope_; }
     390         196 :     uint64_t listenerTag() const override { return 0; }
     391           0 :     const std::string& name() const override { return name_; }
     392          98 :     const Network::ListenerInfoConstSharedPtr& listenerInfo() const override {
     393          98 :       return parent_.listener_info_;
     394          98 :     }
     395           0 :     Network::UdpListenerConfigOptRef udpListenerConfig() override { return {}; }
     396          98 :     Network::InternalListenerConfigOptRef internalListenerConfig() override { return {}; }
     397          98 :     Network::ConnectionBalancer& connectionBalancer(const Network::Address::Instance&) override {
     398          98 :       return connection_balancer_;
     399          98 :     }
     400         294 :     ResourceLimit& openConnections() override { return open_connections_; }
     401          98 :     const std::vector<AccessLog::InstanceSharedPtr>& accessLogs() const override {
     402          98 :       return empty_access_logs_;
     403          98 :     }
     404           0 :     uint32_t tcpBacklogSize() const override { return ENVOY_TCP_BACKLOG_SIZE; }
     405          98 :     uint32_t maxConnectionsToAcceptPerSocketEvent() const override {
     406          98 :       return Network::DefaultMaxConnectionsToAcceptPerSocketEvent;
     407          98 :     }
     408           0 :     Init::Manager& initManager() override { return *init_manager_; }
     409          98 :     bool ignoreGlobalConnLimit() const override { return ignore_global_conn_limit_; }
     410             : 
     411             :     AdminImpl& parent_;
     412             :     const std::string name_;
     413             :     Stats::Scope& scope_;
     414             :     Http::ConnectionManagerListenerStats stats_;
     415             :     Network::NopConnectionBalancerImpl connection_balancer_;
     416             :     BasicResourceLimitImpl open_connections_;
     417             : 
     418             :   private:
     419             :     const std::vector<AccessLog::InstanceSharedPtr> empty_access_logs_;
     420             :     std::unique_ptr<Init::Manager> init_manager_;
     421             :     const bool ignore_global_conn_limit_;
     422             :   };
     423             :   using AdminListenerPtr = std::unique_ptr<AdminListener>;
     424             : 
     425             :   class AdminFilterChain : public Network::FilterChain {
     426             :   public:
     427             :     // We can't use the default constructor because transport_socket_factory_ doesn't have a
     428             :     // default constructor.
     429         134 :     AdminFilterChain() {} // NOLINT(modernize-use-equals-default)
     430             : 
     431             :     // Network::FilterChain
     432          98 :     const Network::DownstreamTransportSocketFactory& transportSocketFactory() const override {
     433          98 :       return transport_socket_factory_;
     434          98 :     }
     435             : 
     436          98 :     std::chrono::milliseconds transportSocketConnectTimeout() const override {
     437          98 :       return std::chrono::milliseconds::zero();
     438          98 :     }
     439             : 
     440          98 :     const Filter::NetworkFilterFactoriesList& networkFilterFactories() const override {
     441          98 :       return empty_network_filter_factory_;
     442          98 :     }
     443             : 
     444          98 :     absl::string_view name() const override { return "admin"; }
     445             : 
     446             :   private:
     447             :     const Network::RawBufferSocketFactory transport_socket_factory_;
     448             :     const Filter::NetworkFilterFactoriesList empty_network_filter_factory_;
     449             :   };
     450             : 
     451             :   Server::Instance& server_;
     452             :   const Network::ListenerInfoConstSharedPtr listener_info_;
     453             :   AdminFactoryContext factory_context_;
     454             :   Http::RequestIDExtensionSharedPtr request_id_extension_;
     455             :   std::list<AccessLog::InstanceSharedPtr> access_logs_;
     456             :   const bool flush_access_log_on_new_request_ = false;
     457             :   const absl::optional<std::chrono::milliseconds> null_access_log_flush_interval_;
     458             :   const std::string profile_path_;
     459             :   Http::ConnectionManagerStats stats_;
     460             :   NullOverloadManager null_overload_manager_;
     461             :   // Note: this is here to essentially blackhole the tracing stats since they aren't used in the
     462             :   // Admin case.
     463             :   Stats::IsolatedStoreImpl no_op_store_;
     464             :   Http::ConnectionManagerTracingStats tracing_stats_;
     465             :   NullRouteConfigProvider route_config_provider_;
     466             :   NullScopedRouteConfigProvider scoped_route_config_provider_;
     467             :   NullScopeKeyBuilder scope_key_builder_;
     468             :   Server::ClustersHandler clusters_handler_;
     469             :   Server::ConfigDumpHandler config_dump_handler_;
     470             :   Server::InitDumpHandler init_dump_handler_;
     471             :   Server::StatsHandler stats_handler_;
     472             :   Server::LogsHandler logs_handler_;
     473             :   Server::ProfilingHandler profiling_handler_;
     474             :   Server::TcmallocProfilingHandler tcmalloc_profiling_handler_;
     475             :   Server::RuntimeHandler runtime_handler_;
     476             :   Server::ListenersHandler listeners_handler_;
     477             :   Server::ServerCmdHandler server_cmd_handler_;
     478             :   Server::ServerInfoHandler server_info_handler_;
     479             :   std::list<UrlHandler> handlers_;
     480             :   const uint32_t max_request_headers_kb_{Http::DEFAULT_MAX_REQUEST_HEADERS_KB};
     481             :   const uint32_t max_request_headers_count_{Http::DEFAULT_MAX_HEADERS_COUNT};
     482             :   absl::optional<std::chrono::milliseconds> idle_timeout_;
     483             :   absl::optional<std::chrono::milliseconds> max_connection_duration_;
     484             :   absl::optional<std::chrono::milliseconds> max_stream_duration_;
     485             :   absl::optional<std::string> user_agent_;
     486             :   Http::SlowDateProviderImpl date_provider_;
     487             :   std::vector<Http::ClientCertDetailsType> set_current_client_cert_details_;
     488             :   Http::Http1Settings http1_settings_;
     489             :   Http::Http1::CodecStats::AtomicPtr http1_codec_stats_;
     490             :   Http::Http2::CodecStats::AtomicPtr http2_codec_stats_;
     491             :   ConfigTrackerImpl config_tracker_;
     492             :   const Network::FilterChainSharedPtr admin_filter_chain_;
     493             :   Network::SocketSharedPtr socket_;
     494             :   std::vector<Network::ListenSocketFactoryPtr> socket_factories_;
     495             :   AdminListenerPtr listener_;
     496             :   const AdminInternalAddressConfig internal_address_config_;
     497             :   const LocalReply::LocalReplyPtr local_reply_;
     498             :   const std::vector<Http::OriginalIPDetectionSharedPtr> detection_extensions_{};
     499             :   const std::vector<Http::EarlyHeaderMutationPtr> early_header_mutations_{};
     500             :   const absl::optional<std::string> scheme_{};
     501             :   const bool ignore_global_conn_limit_;
     502             :   std::unique_ptr<HttpConnectionManagerProto::ProxyStatusConfig> proxy_status_config_;
     503             :   const Http::HeaderValidatorFactoryPtr header_validator_factory_;
     504             : };
     505             : 
     506             : } // namespace Server
     507             : } // namespace Envoy

Generated by: LCOV version 1.15