Skip to content

Conversation

@alextwoods
Copy link
Contributor

Raise exceptions in resolveCredentials instead of creation for StsWebIdentityTokenFileCredentialsProvider

Motivation and Context

Unlike other credential providers, the StsWebIdentityTokenFileCredentialsProvider was previously raising exceptions during construction instead of when resolveCredentials was called - this impacts its usage in a credentials provider chain. The logic to capture exceptions during construction exited previously, but the scope was not wide enough.

Modifications

  • Expand the existing try to cover all of the places in construction where exceptions are raised.

Testing

New unit tests

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read the CONTRIBUTING document
  • Local run of mvn install succeeds
  • My code follows the code style of this project
  • My change requires a change to the Javadoc documentation
  • I have updated the Javadoc documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed
  • I have added a changelog entry. Adding a new entry must be accomplished by running the scripts/new-change script and following the instructions. Commit the new file created by the script in .changes/next-release with your changes.
  • My change is to implement 1.11 parity feature and I have updated LaunchChangelog

License

  • I confirm that this pull request can be released under the Apache 2 license

@alextwoods alextwoods requested a review from a team as a code owner November 7, 2025 19:09
@alextwoods alextwoods added the no-api-surface-area-change Indicate there is no API surface area change and thus API surface area review is not required label Nov 7, 2025
@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 7, 2025

@alextwoods alextwoods added this pull request to the merge queue Nov 7, 2025
Merged via the queue into master with commit eef2063 Nov 7, 2025
49 of 50 checks passed
@github-actions
Copy link

github-actions bot commented Nov 7, 2025

This pull request has been closed and the conversation has been locked. Comments on closed PRs are hard for our team to see. If you need more assistance, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

no-api-surface-area-change Indicate there is no API surface area change and thus API surface area review is not required

Projects

None yet

2 participants