Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: check credential expiration timestamp when generating tokens
What this PR does / why we need it: There are two expirations which must be considered when using a signed EKS token: * 15 minutes after the point in time when the AWS STS request has been signed * The underlying AWS credentials can expire at which point the token won't be accepted The second case is particularly common when making frequent requests while using AssumeRole or AssumeRoleWithWebRequest as mentioned in kubernetes-sigs#590 as the default session timeout is 1 hour. This PR adds an additional check fetching the AWS credential expiration and using that as the returned expiration if it is before the 15 minute token expiration. Which issue(s) this PR fixes Fixes kubernetes-sigs#590
- Loading branch information