-
Notifications
You must be signed in to change notification settings - Fork 44
Allow selecting AWS SDK TLS features #197
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
base: main
Are you sure you want to change the base?
Changes from all commits
0196549
5a23064
3934127
8ea33e4
c1a8d01
7b96434
9b40629
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,11 +9,20 @@ repository = "https://github.com/aws/aws-workload-credentials-provider" | |
| readme = "README.md" | ||
|
|
||
| [features] | ||
| default = ["rustls", "default-https-client", "rt-tokio", "credentials-process", "sso"] | ||
| credentials-process = ["aws-config/credentials-process"] | ||
| default-https-client = [ | ||
| "aws-config/default-https-client", | ||
| "aws-sdk-secretsmanager/default-https-client", | ||
| ] | ||
| rt-tokio = ["aws-config/rt-tokio", "aws-sdk-secretsmanager/rt-tokio"] | ||
| rustls = ["aws-sdk-secretsmanager/rustls"] | ||
| sso = ["aws-config/sso"] | ||
| fips = ["rustls/fips"] | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Before this PR, So a downstream build like: aws_secretsmanager_caching = { version = "2", default-features = false, features = ["fips"] }compiles but has no SDK HTTP client and will fail at runtime when it tries to make a call. Two questions worth confirming:
|
||
| test-util = [] | ||
|
|
||
| [dependencies] | ||
| aws-sdk-secretsmanager = "1" | ||
| aws-sdk-secretsmanager = { version = "1", default-features = false } | ||
| aws-smithy-runtime-api = "1" | ||
| aws-smithy-types = "1" | ||
| serde_json = "1" | ||
|
|
@@ -22,14 +31,18 @@ serde = { version = "1", features = ["derive"] } | |
| thiserror = "2" | ||
| tokio = { version = "1", features = ["rt-multi-thread", "sync"] } | ||
| linked-hash-map = "0.5.6" | ||
| aws-config = "1" | ||
| aws-config = { version = "1", default-features = false } | ||
| rustls = "0.23" | ||
| log = "0.4.29" | ||
|
|
||
| [dev-dependencies] | ||
| aws-smithy-mocks = "0.2" | ||
| aws-smithy-runtime = { version = "1", features = ["test-util", "wire-mock"] } | ||
| aws-sdk-secretsmanager = { version = "1", features = ["test-util"] } | ||
| aws-sdk-secretsmanager = { version = "1", default-features = false, features = [ | ||
| "test-util", | ||
| "default-https-client", | ||
| "rt-tokio", | ||
| ] } | ||
| tokio = { version = "1", features = ["macros", "rt-multi-thread", "sync", "test-util"] } | ||
| http = "0" | ||
| tokio-test = "0.4.4" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,6 +25,19 @@ cargo add tokio -F rt-multi-thread,net,macros | |
| cargo add aws_secretsmanager_caching | ||
| ``` | ||
|
|
||
| By default, this crate enables the same AWS SDK features as the AWS SDK service client defaults. | ||
| Applications that want to select the SDK HTTP client explicitly can disable default features and | ||
| enable the required AWS SDK features: | ||
|
|
||
| ```toml | ||
| aws_secretsmanager_caching = { version = "2", default-features = false, features = [ | ||
| "default-https-client", | ||
| "rt-tokio", | ||
| "credentials-process", | ||
| "sso", | ||
| ] } | ||
|
Comment on lines
+31
to
+38
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The documented opt-out example uses Also, |
||
| ``` | ||
|
|
||
| ```rust | ||
| use aws_secretsmanager_caching::SecretsManagerCachingClient; | ||
| use std::num::NonZeroUsize; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Naming nit: this feature (
rustls) shares its name with the non-optionalrustlscrate dependency below (rustls = "0.23"). Cargo tolerates this, but it makesfips = ["rustls/fips"](which targets the crate) andrustls = ["aws-sdk-secretsmanager/rustls"](the feature) read as if they're related when they're not. A distinct name such assdk-rustlsorlegacy-tlswould make intent clearer and avoid the collision. Non-blocking.