aws-mfa-secure 0.3.4 → 0.3.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 563b4c8779985cea417d47a059ef5d0b19fac15b85ad09286519d9a9efd319e6
4
- data.tar.gz: 45afef64714aa58869fc76ca35f28d220a92413a292b47846bd1b82a48b7f82d
3
+ metadata.gz: 94dd717cafaeea6c1d41e0e1ec7693af40f86f0f30f22aec621098d9fb1aa2ee
4
+ data.tar.gz: 639c9af3947210e4d6ffe7b5c45ddb6d957da1bed71595291f66d16c27b4f545
5
5
  SHA512:
6
- metadata.gz: c5fa68aedf4a6ecf2e4e86da6ee93eb313a3dd2fc81e5e3349cad69ee738d6e727c86da34e6fa7beac2f4e212d41d32a920b8c6c25b6c6a90d4ac39eb94ad43b
7
- data.tar.gz: 845f1152b4c568492f39433de7435e1be16ee6cd23a2aca82eee7f940811f20962de0d533ffb2d08a518bd102ec1810fbefee91d34dc6e4620b9d0cb6851cccb
6
+ metadata.gz: 9a35892f4b00e7b200beb44380ff4130bdba9d6777c7d06a5634bc2209c69ca8c418b8c74a42060aa8c47a5347ef493bd76ddd6512073cf5d64a87740a139cd4
7
+ data.tar.gz: ec4e8369e2ace95feee53b7c1393cba411c6ca566f35db38aafbb06d30ca729002cbe37413c353ce3ba0e09a147abea24b9ddca425a84ece43da466827e860cc
@@ -3,6 +3,9 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  This project *tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
5
5
 
6
+ ## [0.3.5]
7
+ - prompt for mfa when using AWS_* env and `AWS_MFA_SERIAL`
8
+
6
9
  ## [0.3.4]
7
10
  - always set AWS_* env vars when in iam_mfa mode
8
11
 
@@ -10,6 +10,7 @@ module AwsMfaSecure
10
10
  extend Memoist
11
11
 
12
12
  def iam_mfa?
13
+ return true if aws_mfa_env_set?
13
14
  return false unless aws_cli_installed?
14
15
  return false unless mfa_serial
15
16
 
@@ -23,6 +24,12 @@ module AwsMfaSecure
23
24
  aws_access_key_id && aws_secret_access_key && !source_profile
24
25
  end
25
26
 
27
+ def aws_mfa_env_set?
28
+ ENV['AWS_ACCESS_KEY_ID'] &&
29
+ ENV['AWS_SECRET_ACCESS_KEY'] &&
30
+ ENV['AWS_MFA_SERIAL']
31
+ end
32
+
26
33
  def aws_cli_installed?
27
34
  return false unless File.exist?("#{ENV['HOME']}/.aws")
28
35
  system("type aws > /dev/null 2>&1")
@@ -1,3 +1,3 @@
1
1
  module AwsMfaSecure
2
- VERSION = "0.3.4"
2
+ VERSION = "0.3.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-mfa-secure
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen