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

Regression: 0.48 doesn't allow connecting via HTTP at all #1980

Open
Follpvosten opened this issue May 2, 2022 · 5 comments · May be fixed by #1981
Open

Regression: 0.48 doesn't allow connecting via HTTP at all #1980

Follpvosten opened this issue May 2, 2022 · 5 comments · May be fixed by #1981

Comments

@Follpvosten
Copy link

Context: Our internal testing setup uses a minio instance so we can test against an actual S3 API, verify that signing URLs works as expected etc.

df31792 did not only update hyper-rustls and expose an option to use native or webpki roots, it also hardcoded the configuration to only support HTTPS without offering any way to configure this:

builder.https_only().enable_http2().build()

At least in some cases (like the one I outlined above), I think using .https_or_http() instead would be useful, so I would like to see it either made configurable (at runtime or compile-time), or just as the default to not break my testing setup right now (though that's a bit selfish lol.)

@sergiimk
Copy link

sergiimk commented May 5, 2022

Also encountered this issue. Would definitely like an option to continue using plain HTTP in a testing context.

Release notes should've mentioned this change if this was intentional.

@legokichi legokichi linked a pull request May 10, 2022 that will close this issue
@yaozongyou
Copy link

Caused by:
    Error during dispatch: error trying to connect: Unsupported scheme http

ditto, also encountered this issue.

@mcronce
Copy link

mcronce commented Oct 13, 2022

Same problem here - for internal use only on an already-secure, wired-only network, I would like to continue using cleartext HTTP - can #1981 be merged?

@briancorbin
Copy link

Please dear god fix this so I can connect to localstack containers without generating certs.

@onursatici
Copy link

You can still allow http by using HttpClient::from_builder, here is an example for creating an s3 client that uses http to connect to a localstack container

fn s3_client(local_port: u16) -> S3Client {
    let hyper_builder = Client::builder();
    let http_connector = hyper_rustls::HttpsConnectorBuilder::new()
        .with_native_roots()
        .https_or_http()
        .enable_http1()
        .build();
    let s3_http_client = HttpClient::from_builder(hyper_builder, http_connector);
    let credentials = DefaultCredentialsProvider::new().unwrap();
    S3Client::new_with(
        s3_http_client,
        credentials,
        Region::Custom {
            name: "Localstack".to_string(),
            endpoint: format!("http://localhost:{}", local_port),
        },
    )
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants