Skip to content

WebIdentityTokenFileCredentialsProvider throws IllegalStateException if "sts" dependency on path in 2.38.3+ #6583

@internetstaff

Description

@internetstaff

Describe the bug

Starting in 2.38.3, likely due to the fix for #6529, if we have the "sts" dependency on our path, we get:

IllegalStateException: Either the environment variable AWS_WEB_IDENTITY_TOKEN_FILE or the javaproperty aws.webIdentityTokenFile must be set.

Perhaps this is now expected behavior, but in our case "sts" comes in from the Apache Camel S3 component and had to be excluded or it breaks the Spring Cloud AWS parameterstore integration by silently throwing this error internally.

I believe this is coming from the DefaultCredentialsProvider, so it seems odd that this would be fatal now.

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

Either nothing, or an INFO log noting that this provider isn't configured.

Current Behavior

Application dies.

Reproduction Steps

In my case, boot a Spring Cloud AWS application with parameter store import support enabled with "sts" on the classpath.

Likely reproducible using DefaultCredentialProvider with sts on the classpath and without AWS_WEB_IDENTITY_TOKEN_FILE configured.

Possible Solution

No response

Additional Information/Context

No response

AWS Java SDK version used

2.39.2

JDK version used

25

Operating System and version

Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.p2This is a standard priority issueresponse-requestedWaiting on additional info and feedback. Will move to "closing-soon" in 10 days.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions