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 +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/aws_mfa_secure/base.rb +7 -0
- data/lib/aws_mfa_secure/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 94dd717cafaeea6c1d41e0e1ec7693af40f86f0f30f22aec621098d9fb1aa2ee
|
4
|
+
data.tar.gz: 639c9af3947210e4d6ffe7b5c45ddb6d957da1bed71595291f66d16c27b4f545
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a35892f4b00e7b200beb44380ff4130bdba9d6777c7d06a5634bc2209c69ca8c418b8c74a42060aa8c47a5347ef493bd76ddd6512073cf5d64a87740a139cd4
|
7
|
+
data.tar.gz: ec4e8369e2ace95feee53b7c1393cba411c6ca566f35db38aafbb06d30ca729002cbe37413c353ce3ba0e09a147abea24b9ddca425a84ece43da466827e860cc
|
data/CHANGELOG.md
CHANGED
@@ -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
|
|
data/lib/aws_mfa_secure/base.rb
CHANGED
@@ -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")
|