-
-
Notifications
You must be signed in to change notification settings - Fork 350
Description
Type: Bug
Component:
STS/Autoconfiguration
Describe the bug
We are only using an StsAssumeRoleCredentialsProvider
to assume a role and not the StsWebIdentityTokenFileCredentialsProvider
. So there is no need to provide an webIdentityTokenFile
or other StsProperties
.
Now the CredentialsProviderAutoConfiguration#createCredentialsProvider
will log this warning because it founds the StsWebIdentityTokenFileCredentialsProvider
dependency but no proper config for it:
Skipping creating `StsCredentialsProvider`. `software.amazon.awssdk:sts` is on the classpath, but neither `spring.cloud.aws.credentials.sts` properties are configured nor `AWS_WEB_IDENTITY_TOKEN_FILE` or the javaproperty `aws.webIdentityTokenFile` is set
But this config issue is only important for the case you want to use this StsWebIdentityTokenFileCredentialsProvider
. So assuming we want to do the StsWebIdentityTokenFileCredentialsProvider
based login only because this class is inside the class-path is not correct.
Seen in Spring AWS Cloud 3.0.1
Sample
Just put this dependency in your project and the log message will be shown:
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>sts</artifactId>
</dependency>
I would suggest to only log this warning if the StsProperties
are not null and an error happens.