-
Notifications
You must be signed in to change notification settings - Fork 861
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default credentials provider should not fail silently if multiple HTTP client are present #4583
Comments
Hi @singhbaljit, Thank you for reporting this issue. I believe this behaviour is per the design. The behaviour of moving onto the next credential provider in the Default credentials provider chain is as expected. The Java SDK can't change its behaviour when there's more than one sync client in the classpath. You would need to check the logs if an expected credential isn't picked up. Please let me know if you have further questions. Thank you. Regards, |
It looks like this issue has not been active for more than five days. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please add a comment to prevent automatic closure, or if the issue is already closed please feel free to reopen it. |
At the INFO level, the default credentials provider actually does not state which underlying credentials provider is being used. So it is difficult to debug, especially in the Kubernetes/STS context. I think the default credentials provider should distinguish between "credentials not available" vs. "SDK is used improperly". Or the very least, print which credentials provider is being at the INFO level. |
I created #4631. |
@singhbaljit we changed the behavior when multiple implementations are found in the classpath, WebIdentityTokenCredentialsProvider won't fail anymore after version In addition, we don't think the logs should have a higher level than DEBUG in this case, so I'll close the PR you submitted. Let us know if you have any questions. |
The changes did fix my issues. Thank you! |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Describe the bug
Currently, if both the Apache and URL clients are present on classpath,
WebIdentityTokenFileCredentialsProvider
will fail with the expected errorHowever, the default credentials provider ignores this error, and moves to the next credential provider. When such exception happens, it indicates that the SDK is configured incorrectly. Ignoring the error implies the STS credentials are not provided, which is not the expected behavior.
Expected Behavior
This error should either not be thrown or not ignored silently.
Current Behavior
Default credentials provider ignores the error
WebIdentityTokenFileCredentialsProvider
when multiple HTTP clients are present on classpath.Reproduction Steps
WebIdentityTokenFileCredentialsProvider
WebIdentityTokenFileCredentialsProvider
is ignored silently.Possible Solution
WebIdentityTokenFileCredentialsProvider
failed because of incorrect SDK usage with multiple clients.Additional Information/Context
This came about when working with awslabs/aws-glue-schema-registry. That library, unlike this SDK, uses the URL client by default instead of the Apache client. See awslabs/aws-glue-schema-registry#120.
AWS Java SDK version used
2.20.162
JDK version used
17.0.8
Operating System and version
Any
The text was updated successfully, but these errors were encountered: