| |
| new file mode 100644 |
| |
| |
| |
| @@ -0,0 +1,5 @@ |
| +{ |
| + "type": "enhancement", |
| + "category": "configure", |
| + "description": "Added aws_security_token to the list of keys that are written to the shared credentials file when using aws configure set." |
| +} |
| |
| |
| |
| |
| @@ -38,7 +38,7 @@ class ConfigureSetCommand(BasicCommand): |
| # Any variables specified in this list will be written to |
| # the ~/.aws/credentials file instead of ~/.aws/config. |
| _WRITE_TO_CREDS_FILE = ['aws_access_key_id', 'aws_secret_access_key', |
| - 'aws_session_token'] |
| + 'aws_session_token', 'aws_security_token'] |
| |
| def __init__(self, session, config_writer=None): |
| super(ConfigureSetCommand, self).__init__(session) |
| |
| |
| |
| |
| @@ -126,6 +126,15 @@ def test_session_token_written_to_shared_credentials_file(self): |
| {'__section__': 'default', |
| 'aws_session_token': 'foo'}, self.fake_credentials_filename) |
| |
| + def test_security_token_written_to_shared_credentials_file(self): |
| + set_command = ConfigureSetCommand( |
| + self.session, self.config_writer) |
| + set_command(args=['aws_security_token', 'foo'], |
| + parsed_globals=None) |
| + self.config_writer.update_config.assert_called_with( |
| + {'__section__': 'default', |
| + 'aws_security_token': 'foo'}, self.fake_credentials_filename) |
| + |
| def test_access_key_written_to_shared_credentials_file_profile(self): |
| set_command = ConfigureSetCommand( |
| self.session, self.config_writer) |
|
|