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
4 changes: 0 additions & 4 deletions source/common/quic/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ envoy_cc_library(
":quic_io_handle_wrapper_lib",
":quic_transport_socket_factory_lib",
"//include/envoy/ssl:tls_certificate_config_interface",
"//source/extensions/transport_sockets:well_known_names",
"//source/server:connection_handler_lib",
"@com_googlesource_quiche//:quic_core_crypto_certificate_view_lib",
],
Expand Down Expand Up @@ -288,7 +287,6 @@ envoy_cc_library(
":quic_io_handle_wrapper_lib",
":quic_network_connection_lib",
"//source/common/quic:envoy_quic_utils_lib",
"//source/extensions/transport_sockets:well_known_names",
"//source/server:connection_handler_lib",
"@com_googlesource_quiche//:quic_core_connection_lib",
],
Expand Down Expand Up @@ -370,7 +368,6 @@ envoy_cc_library(
"//source/common/network:listen_socket_lib",
"//source/common/network:socket_option_factory_lib",
"//source/common/quic:quic_io_handle_wrapper_lib",
"//source/extensions/transport_sockets:well_known_names",
"@com_googlesource_quiche//:quic_core_config_lib",
"@com_googlesource_quiche//:quic_core_http_header_list_lib",
"@envoy_api//envoy/config/core/v3:pkg_cc_proto",
Expand All @@ -388,7 +385,6 @@ envoy_cc_library(
"//include/envoy/server:transport_socket_config_interface",
"//include/envoy/ssl:context_config_interface",
"//source/common/common:assert_lib",
"//source/extensions/transport_sockets:well_known_names",
"//source/extensions/transport_sockets/tls:context_config_lib",
"//source/extensions/transport_sockets/tls:ssl_socket_lib",
"@envoy_api//envoy/extensions/transport_sockets/quic/v3:pkg_cc_proto",
Expand Down
2 changes: 0 additions & 2 deletions source/common/quic/envoy_quic_client_connection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
#include "common/quic/envoy_quic_packet_writer.h"
#include "common/quic/envoy_quic_utils.h"

#include "extensions/transport_sockets/well_known_names.h"

namespace Envoy {
namespace Quic {

Expand Down
2 changes: 0 additions & 2 deletions source/common/quic/envoy_quic_proof_source.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
#include "common/quic/envoy_quic_utils.h"
#include "common/quic/quic_io_handle_wrapper.h"

#include "extensions/transport_sockets/well_known_names.h"

#include "openssl/bytestring.h"
#include "quiche/quic/core/crypto/certificate_view.h"

Expand Down
2 changes: 0 additions & 2 deletions source/common/quic/envoy_quic_server_connection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
#include "common/quic/envoy_quic_utils.h"
#include "common/quic/quic_io_handle_wrapper.h"

#include "extensions/transport_sockets/well_known_names.h"

namespace Envoy {
namespace Quic {

Expand Down
5 changes: 1 addition & 4 deletions source/common/quic/envoy_quic_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
#include "common/network/socket_option_factory.h"
#include "common/network/utility.h"

#include "extensions/transport_sockets/well_known_names.h"

namespace Envoy {
namespace Quic {

Expand Down Expand Up @@ -237,8 +235,7 @@ createServerConnectionSocket(Network::IoHandle& io_handle,
std::make_unique<QuicIoHandleWrapper>(io_handle),
quicAddressToEnvoyAddressInstance(self_address),
quicAddressToEnvoyAddressInstance(peer_address));
connection_socket->setDetectedTransportProtocol(
Extensions::TransportSockets::TransportProtocolNames::get().Quic);
connection_socket->setDetectedTransportProtocol("quic");
connection_socket->setRequestedServerName(hostname);
connection_socket->setRequestedApplicationProtocols({alpn});
return connection_socket;
Expand Down
5 changes: 1 addition & 4 deletions source/common/quic/quic_transport_socket_factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "common/common/assert.h"

#include "extensions/transport_sockets/tls/ssl_socket.h"
#include "extensions/transport_sockets/well_known_names.h"

namespace Envoy {
namespace Quic {
Expand Down Expand Up @@ -135,9 +134,7 @@ class QuicTransportSocketConfigFactory
: public virtual Server::Configuration::TransportSocketConfigFactory {
public:
// Server::Configuration::TransportSocketConfigFactory
std::string name() const override {
return Extensions::TransportSockets::TransportSocketNames::get().Quic;
}
std::string name() const override { return "envoy.transport_sockets.quic"; }
};

class QuicServerTransportSocketConfigFactory
Expand Down
4 changes: 0 additions & 4 deletions source/common/upstream/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,6 @@ envoy_cc_library(
"//source/common/network:resolver_lib",
"//source/common/protobuf:message_validator_lib",
"//source/common/protobuf:utility_lib",
"//source/extensions/transport_sockets:well_known_names",
"//source/server:transport_socket_config_lib",
"@envoy_api//envoy/config/cluster/v3:pkg_cc_proto",
"@envoy_api//envoy/config/core/v3:pkg_cc_proto",
Expand Down Expand Up @@ -482,7 +481,6 @@ envoy_cc_library(
"//source/common/protobuf:utility_lib",
"//source/common/runtime:runtime_lib",
"//source/extensions/filters/network/common:utility_lib",
"//source/extensions/transport_sockets:well_known_names",
"//source/server:transport_socket_config_lib",
],
)
Expand All @@ -496,7 +494,6 @@ envoy_cc_library(
"//source/common/config:utility_lib",
"//source/common/protobuf",
"//source/common/protobuf:utility_lib",
"//source/extensions/transport_sockets:well_known_names",
"@envoy_api//envoy/config/cluster/v3:pkg_cc_proto",
"@envoy_api//envoy/config/core/v3:pkg_cc_proto",
],
Expand Down Expand Up @@ -593,7 +590,6 @@ envoy_cc_library(
"//source/common/protobuf",
"//source/common/protobuf:utility_lib",
"//source/extensions/clusters:well_known_names",
"//source/extensions/transport_sockets:well_known_names",
"//source/server:transport_socket_config_lib",
"@envoy_api//envoy/config/cluster/v3:pkg_cc_proto",
],
Expand Down
2 changes: 0 additions & 2 deletions source/common/upstream/health_discovery_service.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@

#include "server/transport_socket_config_impl.h"

#include "extensions/transport_sockets/well_known_names.h"

#include "absl/container/flat_hash_map.h"

namespace Envoy {
Expand Down
6 changes: 2 additions & 4 deletions source/common/upstream/upstream_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
#include "server/transport_socket_config_impl.h"

#include "extensions/filters/network/common/utility.h"
#include "extensions/transport_sockets/well_known_names.h"

#include "absl/container/node_hash_set.h"
#include "absl/strings/str_cat.h"
Expand Down Expand Up @@ -898,12 +897,11 @@ Network::TransportSocketFactoryPtr createTransportSocketFactory(
auto transport_socket = config.transport_socket();
if (!config.has_transport_socket()) {
if (config.has_hidden_envoy_deprecated_tls_context()) {
transport_socket.set_name(Extensions::TransportSockets::TransportSocketNames::get().Tls);
transport_socket.set_name("envoy.transport_sockets.tls");
transport_socket.mutable_typed_config()->PackFrom(
config.hidden_envoy_deprecated_tls_context());
} else {
transport_socket.set_name(
Extensions::TransportSockets::TransportSocketNames::get().RawBuffer);
transport_socket.set_name("envoy.transport_sockets.raw_buffer");
}
}

Expand Down
1 change: 0 additions & 1 deletion source/extensions/filters/listener/http_inspector/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ envoy_cc_library(
"//source/common/common:minimal_logger_lib",
"//source/common/http:headers_lib",
"//source/common/http:utility_lib",
"//source/extensions/transport_sockets:well_known_names",
],
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
#include "common/http/headers.h"
#include "common/http/utility.h"

#include "extensions/transport_sockets/well_known_names.h"

#include "absl/strings/match.h"
#include "absl/strings/str_split.h"

Expand Down Expand Up @@ -40,8 +38,7 @@ Network::FilterStatus Filter::onAccept(Network::ListenerFilterCallbacks& cb) {
const Network::ConnectionSocket& socket = cb.socket();

const absl::string_view transport_protocol = socket.detectedTransportProtocol();
if (!transport_protocol.empty() &&
transport_protocol != TransportSockets::TransportProtocolNames::get().RawBuffer) {
if (!transport_protocol.empty() && transport_protocol != "raw_buffer") {
ENVOY_LOG(trace, "http inspector: cannot inspect http protocol with transport socket {}",
transport_protocol);
return Network::FilterStatus::Continue;
Expand Down
1 change: 0 additions & 1 deletion source/extensions/filters/listener/tls_inspector/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ envoy_cc_library(
"//source/common/api:os_sys_calls_lib",
"//source/common/common:assert_lib",
"//source/common/common:minimal_logger_lib",
"//source/extensions/transport_sockets:well_known_names",
],
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
#include "common/api/os_sys_calls_impl.h"
#include "common/common/assert.h"

#include "extensions/transport_sockets/well_known_names.h"

#include "absl/strings/str_join.h"
#include "openssl/ssl.h"

Expand Down Expand Up @@ -227,8 +225,7 @@ ParseState Filter::parseClientHello(const void* data, size_t len) {
} else {
config_->stats().alpn_not_found_.inc();
}
cb_->socket().setDetectedTransportProtocol(
TransportSockets::TransportProtocolNames::get().Tls);
cb_->socket().setDetectedTransportProtocol("tls");
} else {
config_->stats().tls_not_found_.inc();
}
Expand Down
1 change: 0 additions & 1 deletion source/extensions/transport_sockets/alts/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ envoy_cc_extension(
"//include/envoy/registry",
"//include/envoy/server:transport_socket_config_interface",
"//source/common/grpc:google_grpc_context_lib",
"//source/extensions/transport_sockets:well_known_names",
"@envoy_api//envoy/extensions/transport_sockets/alts/v3:pkg_cc_proto",
],
)
Expand Down
4 changes: 1 addition & 3 deletions source/extensions/transport_sockets/alts/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

#include "envoy/server/transport_socket_config.h"

#include "extensions/transport_sockets/well_known_names.h"

namespace Envoy {
namespace Extensions {
namespace TransportSockets {
Expand All @@ -14,7 +12,7 @@ class AltsTransportSocketConfigFactory
: public virtual Server::Configuration::TransportSocketConfigFactory {
public:
ProtobufTypes::MessagePtr createEmptyConfigProto() override;
std::string name() const override { return TransportSocketNames::get().Alts; }
std::string name() const override { return "envoy.transport_sockets.alts"; }
};

class UpstreamAltsTransportSocketConfigFactory
Expand Down
1 change: 0 additions & 1 deletion source/extensions/transport_sockets/proxy_protocol/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ envoy_cc_extension(
"//include/envoy/registry",
"//include/envoy/server:transport_socket_config_interface",
"//source/common/config:utility_lib",
"//source/extensions/transport_sockets:well_known_names",
"@envoy_api//envoy/extensions/transport_sockets/proxy_protocol/v3:pkg_cc_proto",
],
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

#include "envoy/server/transport_socket_config.h"

#include "extensions/transport_sockets/well_known_names.h"

namespace Envoy {
namespace Extensions {
namespace TransportSockets {
Expand All @@ -16,7 +14,7 @@ namespace ProxyProtocol {
class UpstreamProxyProtocolSocketConfigFactory
: public Server::Configuration::UpstreamTransportSocketConfigFactory {
public:
std::string name() const override { return TransportSocketNames::get().UpstreamProxyProtocol; }
std::string name() const override { return "envoy.transport_sockets.upstream_proxy_protocol"; }
ProtobufTypes::MessagePtr createEmptyConfigProto() override;
Network::TransportSocketFactoryPtr createTransportSocketFactory(
const Protobuf::Message& config,
Expand Down
1 change: 0 additions & 1 deletion source/extensions/transport_sockets/raw_buffer/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ envoy_cc_extension(
"//include/envoy/registry",
"//include/envoy/server:transport_socket_config_interface",
"//source/common/network:raw_buffer_socket_lib",
"//source/extensions/transport_sockets:well_known_names",
"@envoy_api//envoy/extensions/transport_sockets/raw_buffer/v3:pkg_cc_proto",
],
)
4 changes: 1 addition & 3 deletions source/extensions/transport_sockets/raw_buffer/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
#include "envoy/registry/registry.h"
#include "envoy/server/transport_socket_config.h"

#include "extensions/transport_sockets/well_known_names.h"

namespace Envoy {
namespace Extensions {
namespace TransportSockets {
Expand All @@ -16,7 +14,7 @@ namespace RawBuffer {
*/
class RawBufferSocketFactory : public virtual Server::Configuration::TransportSocketConfigFactory {
public:
std::string name() const override { return TransportSocketNames::get().RawBuffer; }
std::string name() const override { return "envoy.transport_sockets.raw_buffer"; }
ProtobufTypes::MessagePtr createEmptyConfigProto() override;
};

Expand Down
2 changes: 0 additions & 2 deletions source/extensions/transport_sockets/starttls/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ envoy_cc_extension(
"//include/envoy/registry",
"//include/envoy/server:transport_socket_config_interface",
"//source/common/config:utility_lib",
"//source/extensions/transport_sockets:well_known_names",
"@envoy_api//envoy/extensions/transport_sockets/starttls/v3:pkg_cc_proto",
],
)
Expand All @@ -50,7 +49,6 @@ envoy_cc_library(
"//source/common/common:empty_string",
"//source/common/common:minimal_logger_lib",
"//source/common/common:thread_annotations",
"//source/extensions/transport_sockets:well_known_names",
"@envoy_api//envoy/extensions/transport_sockets/starttls/v3:pkg_cc_proto",
],
)
9 changes: 3 additions & 6 deletions source/extensions/transport_sockets/starttls/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

#include "common/config/utility.h"

#include "extensions/transport_sockets/well_known_names.h"

namespace Envoy {
namespace Extensions {
namespace TransportSockets {
Expand All @@ -16,7 +14,7 @@ namespace StartTls {
template <typename ConfigFactory, typename ConfigMessage>
class BaseStartTlsSocketFactory : public ConfigFactory {
public:
std::string name() const override { return TransportSocketNames::get().StartTls; }
std::string name() const override { return "envoy.transport_sockets.starttls"; }

ProtobufTypes::MessagePtr createEmptyConfigProto() override {
return std::make_unique<ConfigMessage>();
Expand All @@ -25,12 +23,11 @@ class BaseStartTlsSocketFactory : public ConfigFactory {
protected:
ConfigFactory& rawSocketConfigFactory() {
return Config::Utility::getAndCheckFactoryByName<ConfigFactory>(
TransportSocketNames::get().RawBuffer);
"envoy.transport_sockets.raw_buffer");
}

ConfigFactory& tlsSocketConfigFactory() {
return Config::Utility::getAndCheckFactoryByName<ConfigFactory>(
TransportSocketNames::get().Tls);
return Config::Utility::getAndCheckFactoryByName<ConfigFactory>("envoy.transport_sockets.tls");
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
#include "common/buffer/buffer_impl.h"
#include "common/common/logger.h"

#include "extensions/transport_sockets/well_known_names.h"

namespace Envoy {
namespace Extensions {
namespace TransportSockets {
Expand All @@ -28,7 +26,7 @@ class StartTlsSocket : public Network::TransportSocket, Logger::Loggable<Logger:
callbacks_ = &callbacks;
}

std::string protocol() const override { return TransportProtocolNames::get().StartTls; }
std::string protocol() const override { return "starttls"; }

absl::string_view failureReason() const override { return active_socket_->failureReason(); }

Expand Down
1 change: 0 additions & 1 deletion source/extensions/transport_sockets/tap/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ envoy_cc_extension(
"//include/envoy/server:transport_socket_config_interface",
"//source/common/config:utility_lib",
"//source/common/protobuf:utility_lib",
"//source/extensions/transport_sockets:well_known_names",
"@envoy_api//envoy/config/tap/v3:pkg_cc_proto",
"@envoy_api//envoy/extensions/transport_sockets/tap/v3:pkg_cc_proto",
],
Expand Down
4 changes: 1 addition & 3 deletions source/extensions/transport_sockets/tap/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

#include "envoy/server/transport_socket_config.h"

#include "extensions/transport_sockets/well_known_names.h"

namespace Envoy {
namespace Extensions {
namespace TransportSockets {
Expand All @@ -15,7 +13,7 @@ namespace Tap {
*/
class TapSocketConfigFactory : public virtual Server::Configuration::TransportSocketConfigFactory {
public:
std::string name() const override { return TransportSocketNames::get().Tap; }
std::string name() const override { return "envoy.transport_sockets.tap"; }
ProtobufTypes::MessagePtr createEmptyConfigProto() override;
};

Expand Down
1 change: 0 additions & 1 deletion source/extensions/transport_sockets/tls/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ envoy_cc_extension(
"//include/envoy/network:transport_socket_interface",
"//include/envoy/registry",
"//include/envoy/server:transport_socket_config_interface",
"//source/extensions/transport_sockets:well_known_names",
"@envoy_api//envoy/extensions/transport_sockets/tls/v3:pkg_cc_proto",
],
)
Expand Down
Loading