Skip to content

EC2CredentialsFetcher seems to force refresh, when expiration time has not been reached. #1921

@tmc24win

Description

@tmc24win

It seems like the logic in this function (isWithinExpirationThreshold() line 198) should evaluate greater than the expiration threshold.

(credentialsExpiration.getTime() - System.currentTimeMillis()) < EXPIRATION_THRESHOLD;

I checked that our iam server response returns an expiration date that is 10 minutes from now() and this provider is still forcing a refresh on every request. Since this is a synchronized code block it is severely impacting performance.

It also would be good to add some TRACE or DEBUG message, when the provider has to refresh the credentials.

Metadata

Metadata

Assignees

No one assigned

    Labels

    guidanceQuestion that needs advice or information.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions