Commit 3af73a40 authored by AWS SDK Rust Bot's avatar AWS SDK Rust Bot
Browse files

[smithy-rs] Rollup of 2 commits



Includes commits:
  39af70fe Backport 0.56.x to main (#3069)
  068ad039 Implement `SsoTokenProvider` (#2917)

Co-authored-by: default avatarAWS SDK Rust Bot <97246200+aws-sdk-rust-ci@users.noreply.github.com>
Co-authored-by: default avatarJohn DiSanti <jdisanti@amazon.com>
parent 280e400a
Loading
Loading
Loading
Loading
+18 −7
Original line number Diff line number Diff line
@@ -18,8 +18,8 @@ client-hyper = ["aws-smithy-runtime/connector-hyper-0-14-x"]
rustls = ["aws-smithy-runtime/tls-rustls", "client-hyper"]
allow-compilation = []
rt-tokio = ["aws-smithy-async/rt-tokio", "aws-smithy-runtime/rt-tokio", "tokio/rt"]
credentials-sso = ["dep:aws-sdk-sso", "dep:ring", "dep:hex", "dep:zeroize"]
default = ["client-hyper", "rustls", "rt-tokio", "credentials-sso"]
sso = ["dep:aws-sdk-sso", "dep:aws-sdk-ssooidc", "dep:ring", "dep:hex", "dep:zeroize", "aws-smithy-runtime-api/http-auth"]
default = ["client-hyper", "rustls", "rt-tokio"]

[dependencies]
fastrand = "2.0.0"
@@ -106,16 +106,32 @@ optional = true
version = "1"
optional = true

[dependencies.aws-sdk-ssooidc]
path = "../ssooidc"
default-features = false
optional = true
version = "0.35.0"

[dev-dependencies]
tracing-test = "0.2.1"
arbitrary = "1.3"
serde_json = "1"

[dev-dependencies.aws-credential-types]
path = "../aws-credential-types"
features = ["test-util"]
version = "0.56.1"

[dev-dependencies.aws-smithy-runtime]
path = "../aws-smithy-runtime"
features = ["client", "connector-hyper-0-14-x", "test-util"]
version = "0.56.1"

[dev-dependencies.aws-smithy-runtime-api]
path = "../aws-smithy-runtime-api"
features = ["test-util"]
version = "0.56.1"

[dev-dependencies.futures-util]
version = "0.3.16"
default-features = false
@@ -132,11 +148,6 @@ features = ["full", "test-util"]
version = "1"
features = ["derive"]

[dev-dependencies.aws-credential-types]
path = "../aws-credential-types"
features = ["test-util"]
version = "0.56.1"

[dev-dependencies.hyper-rustls]
version = "0.24"
features = ["webpki-tokio", "http2", "http1"]
+1 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ allowed_external_types = [
   "aws_smithy_runtime_api::client::dns::SharedDnsResolver",
   "aws_smithy_runtime_api::client::http::HttpClient",
   "aws_smithy_runtime_api::client::http::SharedHttpClient",
   "aws_smithy_runtime_api::client::identity::ResolveIdentity",
   "aws_smithy_types::retry",
   "aws_smithy_types::retry::*",
   "aws_smithy_types::timeout",
+6 −6
Original line number Diff line number Diff line
@@ -295,15 +295,15 @@ mod test {
    make_test!(ecs_credentials);
    make_test!(ecs_credentials_invalid_profile);

    #[cfg(not(feature = "credentials-sso"))]
    make_test!(sso_assume_role #[should_panic(expected = "This behavior requires following cargo feature(s) enabled: credentials-sso")]);
    #[cfg(not(feature = "credentials-sso"))]
    make_test!(sso_no_token_file #[should_panic(expected = "This behavior requires following cargo feature(s) enabled: credentials-sso")]);
    #[cfg(not(feature = "sso"))]
    make_test!(sso_assume_role #[should_panic(expected = "This behavior requires following cargo feature(s) enabled: sso")]);
    #[cfg(not(feature = "sso"))]
    make_test!(sso_no_token_file #[should_panic(expected = "This behavior requires following cargo feature(s) enabled: sso")]);

    #[cfg(feature = "credentials-sso")]
    #[cfg(feature = "sso")]
    make_test!(sso_assume_role);

    #[cfg(feature = "credentials-sso")]
    #[cfg(feature = "sso")]
    make_test!(sso_no_token_file);

    #[cfg(feature = "credentials-sso")]
+5 −1
Original line number Diff line number Diff line
@@ -194,7 +194,11 @@ fn parse_token_response(response: &HttpResponse, now: SystemTime) -> Result<Toke
}

impl ResolveIdentity for TokenResolver {
    fn resolve_identity<'a>(&'a self, _config_bag: &'a ConfigBag) -> IdentityFuture<'a> {
    fn resolve_identity<'a>(
        &'a self,
        _components: &'a RuntimeComponents,
        _config_bag: &'a ConfigBag,
    ) -> IdentityFuture<'a> {
        IdentityFuture::new(async {
            let preloaded_token = self
                .inner
+1 −1
Original line number Diff line number Diff line
@@ -121,7 +121,7 @@ pub mod meta;
pub mod profile;
pub mod provider_config;
pub mod retry;
#[cfg(feature = "credentials-sso")]
#[cfg(feature = "sso")]
pub mod sso;
pub(crate) mod standard_property;
pub mod sts;
Loading