Announcement: Changes to the default HTTPS client stack #1257
aajtodd
announced in
Announcement
Replies: 1 comment 4 replies
-
Hello, I am currently using |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Changes to default HTTPS stack
An upcoming release of the AWS SDK for Rust changes the default HTTP client and TLS provider (and more generally any client generated by
smithy-rs
).Release Date
March 10, 2025
What's changing
The AWS SDK for Rust currently uses a default HTTPS client based on
hyper-0.14.x
andrustls
(specifically 0.21.x which usesring
as the cryptography provider).The default HTTPS client is being updated to be based on the 1.x version of hyper.
The default TLS provider is still
rustls
but the cryptography provider is now based onaws-lc
instead ofring
. This change also enables support for post-quantum cryptography.FAQ
Why are you making this change?
The 0.14.x version of hyper receives bug fixes still but is not the currently maintained version of hyper. Similarly
rustls
has evolved as well (e.g. it now defaults toaws-lc
instead ofring
in the latest versions). Additionally the future ofring
has recently become a point of concern (see the GitHub discussion). We want the default HTTPS stack to be a well maintained and secure default for all users.What do I need to do?
The SDK ships with a default HTTPS client that works out of the box and this change will be transparent for most users. Certain platforms (e.g. Windows) may have additional build requirements than previously.
If you customize the HTTP client, you can continue to do so. If you utilize the APIs in
aws_smithy_runtime::client::http::hyper_014
you may want to check that you are not relying on feature unification to enable the API(s) you depend on as this could break in the future. This can happen if you are relying on one of the AWS SDK crates to enable theconnector-hyper-0-14-x
feature for example.How do I revert to defaulting to the legacy HTTPS stack?
We introduced a new
BehaviorVersion
that can be used to pin to the old HTTPS stack (for now).For more information in general on behavior versions see the developer guide.
Note
In most cases you should use
BehaviorVersion::latest()
which represents our most up to date recommended settings. We recommend pinning to a specific version only as long as is required.Warning
In a future release we will remove the
rustls
feature (which is what enables the legacy HTTPS stack) from the default features of every SDK crate. This will remove the legacy HTTPS stack from being always compiled by default. In turn this will break behavior versions prior tov2025_01_17
that depend on it for enabling the legacy stack. Users will have to re-enable therustls
feature manually at that time to keep the behavior version working.How do I disable compiling the legacy hyper + rustls crates?
The SDK crates (e.g.
aws-sdk-s3
) all have default features that enable both the legacy and new HTTPS stacks. This makes it easier to pin to the old behavior viaBehaviorVersion
alone at the cost of compiling multiple hyper versions and TLS providers. Users that are sensitive to compile times may wish to disable this.To disable compiling the now legacy HTTPS stack you need to customize the feature set in your
Cargo.toml
Warning
In a future release we will remove the
rustls
feature (which is what enables the legacy HTTPS stack) from the default features of every SDK crate. This will remove the legacy HTTPS stack from being always compiled by default.How do I enable FIPS support?
The
aws-smithy-http-client
crate provides options to enable a FIPS compliant crypto implementation.Note
FIPS support requires additional dependencies in your build environment. See the build instructions for the
aws-lc
crate.How do I override the HyperClientBuilder?
In the legacy HTTPS stack the
aws-smithy-runtime
crate (versions < 1.8) provided a way to override the Hyper clientBuilder
. This allowed customizing the settings used by hyper directly. It also provided a way to build with a custom TCP connector. Users sometimes utilized these APIs to customize specific low level settings for more advanced use cases and deployment scenarios.Support for this functionality has been removed and is not present in the new HTTP client API provided by the
aws-smithy-http-client
crate. These APIs now live in thehyper-util
crate which is not stable and as such we cannot support the functionality in a backwards compatible way today. The new API does expose ways to customize some of the settings (e.g. settingTCP_NODELAY
). We encourage you to open a feature request for any setting you think should be exposed. We will weigh whether or not the setting is both widely applicable AND something we can support in a backwards compatible manner.If you need to customize these settings or build with a custom TCP connector you can either:
aws-smithy-http-client
crate now contains the entirety of the legacy API behind thehyper-014
andlegacy-rustls-ring
feature flags.How do I migrate from
aws-smithy-experimental
?Early support for hyper 1.x was available through the
aws-smithy-experimental
crate (0.1.x versions).This support has been removed starting in
0.2.x
. Users can either remove their code enabling this as the default HTTPSclient is now based on hyper 1.x OR they can migrate to the
aws-smithy-http-client
crate.How do I enable post-quantum cryptography support?
The default TLS provider is based on
rustsl
usingaws-lc-rs
which supportsX25519MLKEM768
post-quantum key exchange algorithm. To makeX25519MLKEM768
the highest priority you need to add therustls
package to your crate and enable theprefer-post-quantum
feature flag. Otherwise, it is available but not the highest priority. See therustls
documentation.Note
This will become the default in a future release.
Beta Was this translation helpful? Give feedback.
All reactions