Skip to content

Commit 57e4a4d

Browse files
authored
feat: Pass client-configured LogMode through to internal credentials providers (#1134)
1 parent c5dc86d commit 57e4a4d

File tree

4 files changed

+14
-0
lines changed

4 files changed

+14
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"id": "c8ccff8e-460a-4e91-8f81-d09180636dea",
3+
"type": "feature",
4+
"description": "Pass client-configured LogMode through to internal credentials providers",
5+
"issues": [
6+
"https://github.com/awslabs/aws-sdk-kotlin/issues/1132"
7+
]
8+
}

aws-runtime/aws-config/common/src/aws/sdk/kotlin/runtime/auth/credentials/SsoCredentialsProvider.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import aws.sdk.kotlin.runtime.auth.credentials.internal.sso.getRoleCredentials
1111
import aws.smithy.kotlin.runtime.auth.awscredentials.Credentials
1212
import aws.smithy.kotlin.runtime.auth.awscredentials.CredentialsProvider
1313
import aws.smithy.kotlin.runtime.auth.awscredentials.CredentialsProviderException
14+
import aws.smithy.kotlin.runtime.client.SdkClientOption
1415
import aws.smithy.kotlin.runtime.collections.Attributes
1516
import aws.smithy.kotlin.runtime.http.engine.HttpClientEngine
1617
import aws.smithy.kotlin.runtime.serde.json.*
@@ -101,6 +102,7 @@ public class SsoCredentialsProvider public constructor(
101102
region = ssoRegion
102103
httpClient = this@SsoCredentialsProvider.httpClient
103104
telemetryProvider = telemetry
105+
logMode = attributes.getOrNull(SdkClientOption.LogMode)
104106
// FIXME - create an anonymous credential provider to explicitly avoid default chain creation (technically the transform should remove need for sigv4 cred provider since it's all anon auth)
105107
}
106108

aws-runtime/aws-config/common/src/aws/sdk/kotlin/runtime/auth/credentials/StsAssumeRoleCredentialsProvider.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import aws.smithy.kotlin.runtime.auth.awscredentials.Credentials
1717
import aws.smithy.kotlin.runtime.auth.awscredentials.CredentialsProvider
1818
import aws.smithy.kotlin.runtime.auth.awscredentials.CredentialsProviderException
1919
import aws.smithy.kotlin.runtime.auth.awscredentials.DEFAULT_CREDENTIALS_REFRESH_SECONDS
20+
import aws.smithy.kotlin.runtime.client.SdkClientOption
2021
import aws.smithy.kotlin.runtime.collections.Attributes
2122
import aws.smithy.kotlin.runtime.config.resolve
2223
import aws.smithy.kotlin.runtime.http.engine.HttpClientEngine
@@ -105,6 +106,7 @@ public class StsAssumeRoleCredentialsProvider(
105106
credentialsProvider = provider.bootstrapCredentialsProvider
106107
httpClient = provider.httpClient
107108
telemetryProvider = telemetry
109+
logMode = attributes.getOrNull(SdkClientOption.LogMode)
108110
}
109111

110112
val resp = try {

aws-runtime/aws-config/common/src/aws/sdk/kotlin/runtime/auth/credentials/StsWebIdentityCredentialsProvider.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import aws.smithy.kotlin.runtime.auth.awscredentials.Credentials
1515
import aws.smithy.kotlin.runtime.auth.awscredentials.CredentialsProvider
1616
import aws.smithy.kotlin.runtime.auth.awscredentials.CredentialsProviderException
1717
import aws.smithy.kotlin.runtime.auth.awscredentials.DEFAULT_CREDENTIALS_REFRESH_SECONDS
18+
import aws.smithy.kotlin.runtime.client.SdkClientOption
1819
import aws.smithy.kotlin.runtime.collections.Attributes
1920
import aws.smithy.kotlin.runtime.config.EnvironmentSetting
2021
import aws.smithy.kotlin.runtime.config.resolve
@@ -120,6 +121,7 @@ public class StsWebIdentityCredentialsProvider(
120121
httpClient = provider.httpClient
121122
// NOTE: credentials provider not needed for this operation
122123
telemetryProvider = telemetry
124+
logMode = attributes.getOrNull(SdkClientOption.LogMode)
123125
}
124126

125127
val resp = try {

0 commit comments

Comments
 (0)