Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ pyenv rehash
tox
```

[credentials]: http://blogs.aws.amazon.com/security/post/Tx3D6U6WSFGOK2H/A-New-and-Standardized-Way-to-Manage-Credentials-in-the-AWS-SDKs
[best practices]: http://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html
[assume a role]: http://docs.aws.amazon.com/cli/latest/userguide/cli-roles.html
[temporary credentials]: http://docs.aws.amazon.com/STS/latest/UsingSTS/Welcome.html
[account number]: http://docs.aws.amazon.com/general/latest/gr/acct-identifiers.html
[requires MFA]: http://docs.aws.amazon.com/cli/latest/userguide/cli-roles.html#cli-roles-mfa
[AWS CLI guide]: http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html
[credentials]: https://blogs.aws.amazon.com/security/post/Tx3D6U6WSFGOK2H/A-New-and-Standardized-Way-to-Manage-Credentials-in-the-AWS-SDKs
[best practices]: https://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html
[assume a role]: https://docs.aws.amazon.com/cli/latest/userguide/cli-roles.html
[temporary credentials]: https://docs.aws.amazon.com/STS/latest/UsingSTS/Welcome.html
[account number]: https://docs.aws.amazon.com/general/latest/gr/acct-identifiers.html
[requires MFA]: https://docs.aws.amazon.com/cli/latest/userguide/cli-roles.html#cli-roles-mfa
[AWS CLI guide]: https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html
4 changes: 2 additions & 2 deletions awsudo/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ def set(key, value):
set('AWS_SECRET_ACCESS_KEY', creds.secret_key)

# AWS_SESSION_TOKEN is the ostensibly the standard:
# http://blogs.aws.amazon.com/security/post/Tx3D6U6WSFGOK2H/A-New-and-Standardized-Way-to-Manage-Credentials-in-the-AWS-SDKs
# http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html#cli-environment
# https://blogs.aws.amazon.com/security/post/Tx3D6U6WSFGOK2H/A-New-and-Standardized-Way-to-Manage-Credentials-in-the-AWS-SDKs
# https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html#cli-environment
set('AWS_SESSION_TOKEN', creds.token)

# ...but boto expects AWS_SECURITY_TOKEN. Set both for compatibility.
Expand Down
8 changes: 4 additions & 4 deletions awsudo/rotate.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from boto.iam.connection import IAMConnection
from boto.exception import BotoServerError

ACCESS_KEY_DOCS = 'http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html'
ACCESS_KEY_DOCS = 'https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html'

try:
from configparser import RawConfigParser
Expand Down Expand Up @@ -50,7 +50,7 @@ def updateCredentials(self, keyId, secretKey):
self._config.set(self.section, 'aws_secret_access_key', secretKey)

os.umask(0o0066)
os.rename(self._filename, self._filename+'~')
os.rename(self._filename, self._filename + '~')
with open(self._filename, 'w') as f:
self._config.write(f)

Expand Down Expand Up @@ -130,9 +130,9 @@ def getUserName(iam):


@retry(
stop_max_delay=60*1000,
stop_max_delay=60 * 1000,
wait_exponential_multiplier=250,
wait_exponential_max=10*1000,
wait_exponential_max=10 * 1000,
retry_on_exception=lambda e: isinstance(e, BotoServerError))
def deactivateKey(iam, oldKey, userName):
"""Set the given key as inactive.
Expand Down