Unverified Commit bdec1a23 authored by Aaron Todd's avatar Aaron Todd Committed by GitHub
Browse files

change default HTTPS client to hyper1 (#4040)

## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here -->
* https://github.com/smithy-lang/smithy-rs/issues/3710
* https://github.com/smithy-lang/smithy-rs/issues/1925
* https://github.com/awslabs/aws-sdk-rust/issues/977


## Description
Updates the default HTTPS client to be based off hyper 1.x, rustls, and
aws-lc. See the GitHub discussion:
https://github.com/awslabs/aws-sdk-rust/discussions/1257

This PR is a rollup of previously reviewed PRs:

* Refactor the runtime structure and consolidate HTTP client
implementation(s):
[smithy-rs#3866](https://github.com/smithy-lang/smithy-rs/pull/3866)
* Migrate HTTP test utils:
[smithy-rs#3888](https://github.com/smithy-lang/smithy-rs/pull/3888)
* Update runtime to use new test utils:
[smithy-rs#3898](https://github.com/smithy-lang/smithy-rs/pull/3898)
* Backport connection poisoning:
[smithy-rs#3795](https://github.com/smithy-lang/smithy-rs/pull/3795)
* Deprecate HTTP 02x presign APIs:
[smithy-rs#3823](https://github.com/smithy-lang/smithy-rs/pull/3823)
* Enable hyper1 as default client: [smithy-rs#]()
* Enable hyper1 behind
BMV:[smithy-rs#3973](https://github.com/smithy-lang/smithy-rs/pull/3973)
* s2n-tls provider (by Sam):
[smithy-rs#3965](https://github.com/smithy-lang/smithy-rs/pull/3965)
* custom TLS config:
[smithy-rs#4032](https://github.com/smithy-lang/smithy-rs/pull/4032

)

## Testing
<!--- Please describe in detail how you tested your changes -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->

## Checklist
<!--- If a checkbox below is not applicable, then please DELETE it
rather than leaving it unchecked -->
- [x] For changes to the smithy-rs codegen or runtime crates, I have
created a changelog entry Markdown file in the `.changelog` directory,
specifying "client," "server," or both in the `applies_to` key.
- [x] For changes to the AWS SDK, generated SDK code, or SDK runtime
crates, I have created a changelog entry Markdown file in the
`.changelog` directory, specifying "aws-sdk-rust" in the `applies_to`
key.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._

---------

Co-authored-by: default avatarSam Clark <3758302+goatgoose@users.noreply.github.com>
Co-authored-by: default avatarLandon James <lnj@amazon.com>
parent b3425061
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
---
applies_to:
- aws-sdk-rust
- client
authors:
- aajtodd
references:
- aws-sdk-rust#977
- smithy-rs#1925
- smithy-rs#3710
breaking: false
new_feature: false
bug_fix: false
---
Updates the default HTTP client to be based on the 1.x version of hyper and updates the default TLS provider to [rustls](https://github.com/rustls/rustls) with [aws-lc](https://github.com/aws/aws-lc-rs). For more information see the GitHub [discussion](https://github.com/awslabs/aws-sdk-rust/discussions/1257).
+10 −10
Original line number Diff line number Diff line
@@ -241,35 +241,35 @@ jobs:
    name: Exotic platform support
    runs-on: ubuntu-latest
    timeout-minutes: 10
    env:
      CROSS_CONFIG: Cross.toml
    strategy:
      fail-fast: false
      # We always exclude `aws-smithy-http-server-python`, `aws-smithy-http-server-typescript`, and `aws-smithy-experimental` since they are experimental.
      # We exclude `aws-smithy-http-client` due to FIPS related feature flags and aws-lc-fips target support
      matrix:
        include:
        # We always exclude `aws-smithy-http-server-python` and
        # `aws-smithy-http-server-typescript` since they are experimental.
        - target: i686-unknown-linux-gnu
          build_smithy_rs_features: --all-features
          build_aws_exclude: ''
          build_smithy_rs_exclude: --exclude aws-smithy-http-server-python --exclude aws-smithy-http-server-typescript --exclude aws-smithy-experimental
          build_smithy_rs_exclude: --exclude aws-smithy-http-server-python --exclude aws-smithy-http-server-typescript --exclude aws-smithy-experimental --exclude aws-smithy-http-client
          test_smithy_rs_features: --all-features
          test_aws_exclude: ''
          test_smithy_rs_exclude: --exclude aws-smithy-http-server-python --exclude aws-smithy-http-server-typescript --exclude aws-smithy-experimental
          test_smithy_rs_exclude: --exclude aws-smithy-http-server-python --exclude aws-smithy-http-server-typescript --exclude aws-smithy-experimental --exclude aws-smithy-http-client
        - target: powerpc-unknown-linux-gnu
          build_smithy_rs_features: ''
          build_aws_exclude: --exclude aws-inlineable
          build_smithy_rs_exclude: --exclude aws-smithy-http-server-python --exclude aws-smithy-http-server-typescript --exclude aws-smithy-experimental
          build_smithy_rs_exclude: --exclude aws-smithy-http-server-python --exclude aws-smithy-http-server-typescript --exclude aws-smithy-experimental --exclude aws-smithy-http-client
          test_smithy_rs_features: ''
          test_aws_exclude: --exclude aws-inlineable
          test_smithy_rs_exclude: --exclude aws-smithy-http-server-python --exclude aws-smithy-http-server-typescript
          test_smithy_rs_exclude: --exclude aws-smithy-http-server-python --exclude aws-smithy-http-server-typescript --exclude aws-smithy-experimental --exclude aws-smithy-http-client
        - target: powerpc64-unknown-linux-gnu
          build_smithy_rs_features: ''
          build_aws_exclude: --exclude aws-inlineable
          build_smithy_rs_exclude: --exclude aws-smithy-http-server-python --exclude aws-smithy-http-server-typescript --exclude aws-smithy-experimental
          build_smithy_rs_exclude: --exclude aws-smithy-http-server-python --exclude aws-smithy-http-server-typescript --exclude aws-smithy-experimental --exclude aws-smithy-http-client
          test_smithy_rs_features: ''
          test_aws_exclude: --exclude aws-inlineable
          test_smithy_rs_exclude: --exclude aws-smithy-http-server-python --exclude aws-smithy-http-server-typescript --exclude aws-smithy-experimental
    env:
      CROSS_CONFIG: Cross.toml
          test_smithy_rs_exclude: --exclude aws-smithy-http-server-python --exclude aws-smithy-http-server-typescript --exclude aws-smithy-experimental --exclude aws-smithy-http-client
    steps:
    - name: Checkout
      uses: actions/checkout@v4
+150 −109

File changed.

Preview size limit exceeded, changes collapsed.

+427 −140

File changed.

Preview size limit exceeded, changes collapsed.

+17 −11
Original line number Diff line number Diff line
[package]
name = "aws-config"
version = "1.5.18"
version = "1.6.0"
authors = [
    "AWS Rust SDK Team <aws-sdk-rust@amazon.com>",
    "Russell Cohen <rcoh@amazon.com>",
@@ -13,11 +13,16 @@ repository = "https://github.com/smithy-lang/smithy-rs"

[features]
behavior-version-latest = []
client-hyper = ["aws-smithy-runtime/connector-hyper-0-14-x"]
credentials-process = ["tokio/process"]
default = ["client-hyper", "rustls", "rt-tokio", "credentials-process", "sso"]
default = ["default-https-client", "rt-tokio", "credentials-process", "sso"]
rt-tokio = ["aws-smithy-async/rt-tokio", "aws-smithy-runtime/rt-tokio", "tokio/rt"]
rustls = ["aws-smithy-runtime/tls-rustls", "client-hyper"]
# NOTE: `client-hyper` and `rustls` were proxies for enabling the default HTTP client plugin of `aws-smithy-runtime`
# there is no direct usage otherwise on hyper or rustls in this crate. These are superceded by the more appropriately
# named `default-https-client` feature and `client-hyper` and `rustls` are now synonyms for the same
# TODO(hyper1) - deprecate legacy `client-hyper` and `rustls` features when available in cargo: https://github.com/rust-lang/cargo/issues/7130
client-hyper = ["aws-smithy-runtime/default-https-client"]
rustls = ["client-hyper"]
default-https-client = ["aws-smithy-runtime/default-https-client"]
sso = ["dep:aws-sdk-sso", "dep:aws-sdk-ssooidc", "dep:ring", "dep:hex", "dep:zeroize", "aws-smithy-runtime-api/http-auth"]
test-util = ["aws-runtime/test-util"]

@@ -36,7 +41,7 @@ aws-smithy-runtime-api = { path = "../../sdk/build/aws-sdk/sdk/aws-smithy-runtim
aws-smithy-types = { path = "../../sdk/build/aws-sdk/sdk/aws-smithy-types" }
aws-types = { path = "../../sdk/build/aws-sdk/sdk/aws-types" }
bytes = "1.1.0"
http = "0.2.4"
http = "1"
time = { version = "0.3.4", features = ["parsing"] }
tokio = { version = "1.13.1", features = ["sync"] }
tracing = { version = "0.1" }
@@ -55,7 +60,9 @@ zeroize = { version = "1", optional = true }
aws-sdk-ssooidc = { path = "../../sdk/build/aws-sdk/sdk/ssooidc", default-features = false, optional = true }

[dev-dependencies]
aws-smithy-runtime = { path = "../../sdk/build/aws-sdk/sdk/aws-smithy-runtime", features = ["client", "connector-hyper-0-14-x", "test-util"] }
aws-smithy-async = { path = "../../sdk/build/aws-sdk/sdk/aws-smithy-async", features = ["rt-tokio", "test-util"] }
aws-smithy-runtime = { path = "../../sdk/build/aws-sdk/sdk/aws-smithy-runtime", features = ["client", "test-util"] }
aws-smithy-http-client = { path = "../../sdk/build/aws-sdk/sdk/aws-smithy-http-client", features = ["default-client", "test-util"] }
aws-smithy-runtime-api = { path = "../../sdk/build/aws-sdk/sdk/aws-smithy-runtime-api", features = ["test-util"] }
futures-util = { version = "0.3.29", default-features = false }
tracing-test = "0.2.4"
@@ -66,11 +73,6 @@ tokio = { version = "1.23.1", features = ["full", "test-util"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"

# used for a usage example
hyper-rustls = { version = "0.24", features = ["webpki-tokio", "http2", "http1"] }
aws-smithy-async = { path = "../../sdk/build/aws-sdk/sdk/aws-smithy-async", features = ["rt-tokio", "test-util"] }


[package.metadata.docs.rs]
all-features = true
targets = ["x86_64-unknown-linux-gnu"]
@@ -83,3 +85,7 @@ rustdoc-args = ["--cfg", "docsrs"]
#  Crate("aws-config", STABLE_VERSION_PROP_NAME),
[package.metadata.smithy-rs-release-tooling]
stable = true

# FIXME - workaround minimal-versions check issue with proc-macro < 1.0.60
[package.metadata.cargo-udeps.ignore]
normal = ["proc-macro2"]
Loading