Replies: 1 comment
-
|
Any comments? This issue has been puzzling me for a long time. I would really appreciate your help. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Background:
We followed the approach recommended in the official documentation by implementing the resolve method in the CredentialsResolver to obtain the credentials. While the AWS credentials provided by the official method could be permanent, in our scenario, we create temporary credentials using the assume role method and have set an expiration time of 15 minutes.
I conducted local testing by using temporary credentials as a parameter, instead of the
new DefaultAWSCredentialsProviderChain()shown in the official example. However, after 15 minutes, requests can still access the service normally without any errors.Questions
CredentialsResolver.resolve()method?public CompletionStage resolve(InetSocketAddress address) { if (System.currentTimeMillis() - lastTime > DURATION_SECONDS * 1000 || future == null) { + StaticCredentialsProvider awsCredentialsProvider = getAwsCredentialProvider(); String token = iamAuthTokenRequest.toSignedRequestUri( awsCredentialsProvider.resolveCredentials()); future = CompletableFuture.completedFuture(new Credentials(userName, token)); lastTime = System.currentTimeMillis(); } return future; }Best Regards~~
Beta Was this translation helpful? Give feedback.
All reactions