aws-mfa-secure 0.3.6 → 0.3.7

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: 7a728b3bca2a3ecf8c4566c122eeb29e98e8f2e54ce6bd515c601a0cd070933a
4
- data.tar.gz: '00894d69954b1abba894fe5cbfbd71c360d33f87a3805413379634724e3da3cd'
3
+ metadata.gz: 66ffdf370150a2faa8dd385f187822633ba16bea532b359bc219443ec2b34ded
4
+ data.tar.gz: 1a2f3e0d2632fbc3ddd650ee9dd04677ccea305fe30d1b8e99b85a301337e911
5
5
  SHA512:
6
- metadata.gz: bfee9f00cb2b17c5123d6c57eaf5b078fff8b579b137900f27e9d8457bb22a8a737bbf2e597bbcefb845b986994f5678c2836ca3137c7fa11b82323feb9e9309
7
- data.tar.gz: aa7ce5e4a34d622f877f16dba24687dc1d883c5b4f22db715528334df55e76fbb2dd1e0c82677ecbff98c72077097cd98a91555caac4f02ff2d4feef330516d1
6
+ metadata.gz: 7ddd72b31ee4374e113c711333217dc07e385850ce641bf94d636689c788e1b93e73527d9c89194364846131f8d504ed3b4a88d9038963894e9c937a66bf2ad8
7
+ data.tar.gz: 4cc98c88e78e3e43c54ee2458cc3d79eda0b18794adf644e727d6fa4de270b7c1b2874360b7ef6c481ce9689aa742bc0c10c593b0ea19d26c4554a22ed28f3cd
@@ -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.7]
7
+ - check aws cli is fully setup
8
+
6
9
  ## [0.3.6]
7
10
  - #1 speed up iam_mfa? detection with AWSConfig parser
8
11
 
@@ -12,7 +12,7 @@ module AwsMfaSecure
12
12
 
13
13
  def iam_mfa?
14
14
  return true if aws_mfa_env_set?
15
- return false unless aws_cli_installed?
15
+ return false unless aws_cli_installed? && aws_cli_setup?
16
16
  return false unless mfa_serial
17
17
 
18
18
  # The iam_mfa? check will only return true for the case when mfa_serial is set and access keys are used.
@@ -36,6 +36,11 @@ module AwsMfaSecure
36
36
  system("type aws > /dev/null 2>&1")
37
37
  end
38
38
 
39
+ def aws_cli_setup?
40
+ File.exist?("#{ENV['HOME']}/.aws/config") &&
41
+ File.exist?("#{ENV['HOME']}/.aws/credentials")
42
+ end
43
+
39
44
  def fetch_creds?
40
45
  !good_session_creds?
41
46
  end
@@ -1,3 +1,3 @@
1
1
  module AwsMfaSecure
2
- VERSION = "0.3.6"
2
+ VERSION = "0.3.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-mfa-secure
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-11-12 00:00:00.000000000 Z
11
+ date: 2019-11-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport