Skip to content
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

Caching improvement: AssumeRoleRequest used for credentialsCache's key can use a set of policy ARNs instead of a list #51

Open
yjanezou opened this issue Dec 6, 2021 · 1 comment

Comments

@yjanezou
Copy link

yjanezou commented Dec 6, 2021

private final LoadingCache<AssumeRoleRequest, Optional<EC2MetadataUtils.IAMSecurityCredential>> credentialsCache = CacheBuilder

In case the user groups fetched for the same user are returned with different order though they are same set of groups, the corresponding generated AssumeRoleRequest will be different as the order of the mapped policy ARN list will be different based on current hash/equal methods. It could cause the STS credential cache (assumeRoleRequest -> token) not used effectively.

We can either sort the user groups, or more desirable, use a set instead of a list in AssumeRoleRequest.

@a517690655
Copy link

a517690655 commented Mar 28, 2022

If AssumeRoleRequest.withPolicy(stsPolicy) resource include chinese, sdk will throw an exception.Need use URLEncoder.encode(fileKey.toString(),"UTF-8"); to thransfer will pass, advice this transfer add to SDK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants