BREAKING: Streamlined TLS configuration #909
ianbotsf
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
An upcoming release of the AWS SDK for Kotlin includes a redesigned API for TLS configuration of HTTP client engines. This change streamlines how custom TLS settings are configured, which may affect some existing code.
Note: If you don't customize TLS settings for your HTTP client engines, this change should not affect you.
Release date
This feature will ship with the v0.23.0-beta release planned for 05/04/2023.
What's changing
The
HttpClientEngineConfig
class is getting a newtlsContext
member which can be used to configure settings related to TLS and secure connections. Accordingly, the following breaking changes will be made:alpn
setting for controlling which protocols are sent during TLS negotiation is moving fromHttpClientEngineConfig
intotlsContext
. This setting is directly related to TLS and thus will more naturally fit in a TLS-specific config location.tlsContext
member ofCrtClientEngineConfig
is being removed. This will avoid naming/type conflicts with the baseHttpClientEngineConfig
class. At present, an equivalent setting for setting the minimum allowable TLS version is being lifted toHttpClientEngineConfig.tlsContext
. No other settings fromCrtClientEngineConfig
are included at this time but task smithy-kotlin#820 may add additional settings which were previously available in this class.How to migrate
Migration steps depend on current use case.
Migrating
alpn
configurationPreviously, ALPN was configured like this:
After this change, ALPN will be configured like this:
Migrating CRT-specific minimum TLS version configuration
Previously, the CRT engine allowed configuring minimum TLS version like this:
After this change, minimum TLS version configuration will be configured like this:
Note: The
tlsContext.minVersion
setting is no longer CRT-specific. Any engine variant may now be configured by setting this field.Removing CRT-specific TLS configuration (other than minimum TLS version)
Previously, the CRT engine allowed configuring other TLS settings besides minimum version:
Besides minimum TLS version, these settings are no longer available for the CRT engine and must be removed. Task smithy-kotlin#820 may lift some of the settings previously available for the CRT engine into the common
tlsContext
inHttpClientEngineConfig
.Additional resources
If you have any questions concerning this change, please feel free to engage with us in this discussion. If you encounter a bug with these changes, please file an issue.
Beta Was this translation helpful? Give feedback.
All reactions