Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(storage): use http instead of encryption connection for S3 #13055

Closed
Closed
Changes from 1 commit
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
11 changes: 3 additions & 8 deletions src/object_store/src/object/s3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -530,12 +530,7 @@ impl S3ObjectStore {

pub fn new_http_connector(config: &S3ObjectStoreConfig) -> impl Into<HttpConnector> {
// Customize http connector to set keepalive.
let native_tls = {
let mut tls = hyper_tls::native_tls::TlsConnector::builder();
let tls = tls
.min_protocol_version(Some(hyper_tls::native_tls::Protocol::Tlsv12))
.build()
.unwrap_or_else(|e| panic!("Error while creating TLS connector: {}", e));
let connector = {
let mut http = hyper::client::HttpConnector::new();

// connection config
Expand All @@ -556,13 +551,13 @@ impl S3ObjectStore {
}

http.enforce_http(false);
hyper_tls::HttpsConnector::from((http, tls.into()))
http
};

aws_smithy_client::hyper_ext::Adapter::builder()
.hyper_builder(hyper::client::Builder::default())
.connector_settings(ConnectorSettings::builder().build())
.build(monitor_connector(native_tls, "S3"))
.build(monitor_connector(connector, "S3"))
}

pub async fn new_with_config(
Expand Down
Loading