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

Refresh credentials every half-duration #108

Merged
merged 1 commit into from
Jun 12, 2018

Conversation

rdickey-r7
Copy link
Contributor

By default, credentials last an hour. Previously, awsaml would refresh
the credentials every hour minus ten seconds. This leaves the potential
of a long-running command picking up those credentials right before they
expire, and them expiring partway through running the command, and the
command failing. Terraform is one such example.

This change will refresh the credentials every half hour. This should
guarantee that whenever a command is run, it has at least a half hour of
useful life on the credential that it picks up from the credentials
file.

A bug still exists: The timer starts from the time awsaml launches, not
from the time a user logs in. This is okay, because it should still
guarantee more frequent updates than necessary to retain valid and
recent credentials.

By default, credentials last an hour.  Previously, awsaml would refresh
the credentials every hour minus ten seconds.  This leaves the potential
of a long-running command picking up those credentials right before they
expire, and them expiring partway through running the command, and the
command failing.  Terraform is one such example.

This change will refresh the credentials every half hour.  This *should*
guarantee that whenever a command is run, it has at least a half hour of
useful life on the credential that it picks up from the credentials
file.

A bug still exists:  The timer starts from the time awsaml launches, not
from the time a user logs in.  This is okay, because it should still
guarantee more frequent updates than necessary to retain valid and
recent credentials.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 90.625% when pulling 20ad4a1 on refresh-every-half-duration into a62d741 on master.

@rdickey-r7 rdickey-r7 merged commit 1838098 into master Jun 12, 2018
@rdickey-r7 rdickey-r7 deleted the refresh-every-half-duration branch June 12, 2018 21:03
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

Successfully merging this pull request may close these issues.

None yet

3 participants