aws-mfa-secure 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/aws_mfa_secure/base.rb +6 -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: 2e39008cea5e1bf43114c32b2478f530a69296a18065fc4af75e5c3074960be6
|
4
|
+
data.tar.gz: 262b9171dcb03c2497945b0bae5711eff2cf6d6a0e502948ed1668442f827fee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 528b239ff75ce82eb62e21555ec876f4d800783da73b796e3476908bae4801d4fa9624847683c55961a8f96bdfc237b3150494b2b99f57be5b697b3484604061
|
7
|
+
data.tar.gz: 4582fb337d00f6752046cd33b453bdf69ffdc4a34f826e2e0a5912586a41d1c46d81531503157becf9f907317a975cbea808cc97fd977c284e666bbaa53b2cc6
|
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.2]
|
7
|
+
- check for aws_cli_installed, allow to work on aws lambda
|
8
|
+
|
6
9
|
## [0.3.1]
|
7
10
|
- allow specs to pass in other projects
|
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 false unless aws_cli_installed?
|
13
14
|
return false unless mfa_serial
|
14
15
|
|
15
16
|
# The iam_mfa? check will only return true for the case when mfa_serial is set and access keys are used.
|
@@ -22,6 +23,11 @@ module AwsMfaSecure
|
|
22
23
|
aws_access_key_id && aws_secret_access_key && !source_profile
|
23
24
|
end
|
24
25
|
|
26
|
+
def aws_cli_installed?
|
27
|
+
return false unless File.exist?("#{ENV['HOME']}/.aws")
|
28
|
+
return false unless system("type aws > /dev/null 2>&1")
|
29
|
+
end
|
30
|
+
|
25
31
|
def fetch_creds?
|
26
32
|
!good_session_creds?
|
27
33
|
end
|