aws-mfa-secure 0.3.3 → 0.3.4

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: 42390b062852aa9d6934511cdc4bd0713f6f0a4ea06afcce9aada3d8966edf2e
4
- data.tar.gz: 25eb794fa65c35ce06d5ce97a0ca854f003f6b527000a13eec035c73421503ce
3
+ metadata.gz: 563b4c8779985cea417d47a059ef5d0b19fac15b85ad09286519d9a9efd319e6
4
+ data.tar.gz: 45afef64714aa58869fc76ca35f28d220a92413a292b47846bd1b82a48b7f82d
5
5
  SHA512:
6
- metadata.gz: 349ef5dbd0d7dce66fbd00aaf857001dae0a0ac767a581079f4a5ebb63afdb50b2888cdd4defd6944dbed7546c5f95a70805f6deefbcdf506c4de7b1050e804b
7
- data.tar.gz: dca4f146d65588cd9b9c8d79bfac300929998e6b1488f8c369c5a84de738ee1b46b48641737eedbda0ef02592249680d72b4efb34ce9f567858b059b7bfffd64
6
+ metadata.gz: c5fa68aedf4a6ecf2e4e86da6ee93eb313a3dd2fc81e5e3349cad69ee738d6e727c86da34e6fa7beac2f4e212d41d32a920b8c6c25b6c6a90d4ac39eb94ad43b
7
+ data.tar.gz: 845f1152b4c568492f39433de7435e1be16ee6cd23a2aca82eee7f940811f20962de0d533ffb2d08a518bd102ec1810fbefee91d34dc6e4620b9d0cb6851cccb
data/.gitignore CHANGED
@@ -14,3 +14,4 @@ spec/reports
14
14
  test/tmp
15
15
  test/version_tmp
16
16
  tmp
17
+ Gemfile.lock
@@ -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.4]
7
+ - always set AWS_* env vars when in iam_mfa mode
8
+
6
9
  ## [0.3.3]
7
10
  - fix aws_cli_installed? check
8
11
 
data/README.md CHANGED
@@ -93,7 +93,7 @@ You can eval it to set the environment variables in one go. Note, the MFA code p
93
93
 
94
94
  If you're using the `aws-mfa-secure exports` command, the `aws-mfa-secure unsets` command is useful to unset the `AWS_*` env variables quickly. For more info: `aws-mfa-secure unsets -h`.
95
95
 
96
- ## AWS Extension
96
+ ## Ruby AWS SDK Extension
97
97
 
98
98
  You can also use `aws-mfa-secure` to add MFA support to Ruby libraries. Do so by requiring the `aws_mfa_secure/ext/aws`.
99
99
 
@@ -25,8 +25,7 @@ module AwsMfaSecure
25
25
 
26
26
  def aws_cli_installed?
27
27
  return false unless File.exist?("#{ENV['HOME']}/.aws")
28
- return false unless system("type aws > /dev/null 2>&1")
29
- true
28
+ system("type aws > /dev/null 2>&1")
30
29
  end
31
30
 
32
31
  def fetch_creds?
@@ -0,0 +1,5 @@
1
+ ## Example
2
+
3
+ $ aws-mfa-secure clean
4
+ Removed /home/ec2-user/.aws/aws-mfa-secure-sessions
5
+ $
@@ -16,10 +16,9 @@ module AwsMfaSecure
16
16
  save_creds(resp.credentials.to_h)
17
17
  end
18
18
 
19
- # Set AWS_ values unless alredy set
20
- ENV['AWS_ACCESS_KEY_ID'] ||= credentials["access_key_id"]
21
- ENV['AWS_SECRET_ACCESS_KEY'] ||= credentials["secret_access_key"]
22
- ENV['AWS_SESSION_TOKEN'] ||= credentials["session_token"]
19
+ ENV['AWS_ACCESS_KEY_ID'] = credentials["access_key_id"]
20
+ ENV['AWS_SECRET_ACCESS_KEY'] = credentials["secret_access_key"]
21
+ ENV['AWS_SESSION_TOKEN'] = credentials["session_token"]
23
22
  exec(*@argv)
24
23
  end
25
24
  end
@@ -1,3 +1,3 @@
1
1
  module AwsMfaSecure
2
- VERSION = "0.3.3"
2
+ VERSION = "0.3.4"
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.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen
@@ -176,7 +176,6 @@ files:
176
176
  - ".rspec"
177
177
  - CHANGELOG.md
178
178
  - Gemfile
179
- - Gemfile.lock
180
179
  - Guardfile
181
180
  - LICENSE.txt
182
181
  - README.md
@@ -198,6 +197,7 @@ files:
198
197
  - lib/aws_mfa_secure/exports.rb
199
198
  - lib/aws_mfa_secure/ext/aws.rb
200
199
  - lib/aws_mfa_secure/help.rb
200
+ - lib/aws_mfa_secure/help/clean.md
201
201
  - lib/aws_mfa_secure/help/completion.md
202
202
  - lib/aws_mfa_secure/help/completion_script.md
203
203
  - lib/aws_mfa_secure/help/exports.md
@@ -1,82 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- aws-mfa-secure (0.1.0)
5
- activesupport
6
- aws-sdk-core
7
- memoist
8
- rainbow
9
- thor
10
- zeitwerk
11
-
12
- GEM
13
- remote: https://rubygems.org/
14
- specs:
15
- activesupport (6.0.1)
16
- concurrent-ruby (~> 1.0, >= 1.0.2)
17
- i18n (>= 0.7, < 2)
18
- minitest (~> 5.1)
19
- tzinfo (~> 1.1)
20
- zeitwerk (~> 2.2)
21
- aws-eventstream (1.0.3)
22
- aws-partitions (1.237.0)
23
- aws-sdk-core (3.76.0)
24
- aws-eventstream (~> 1.0, >= 1.0.2)
25
- aws-partitions (~> 1, >= 1.228.0)
26
- aws-sigv4 (~> 1.1)
27
- jmespath (~> 1.0)
28
- aws-sigv4 (1.1.0)
29
- aws-eventstream (~> 1.0, >= 1.0.2)
30
- byebug (11.0.1)
31
- cli_markdown (0.1.0)
32
- codeclimate-test-reporter (1.0.9)
33
- simplecov (<= 0.13)
34
- concurrent-ruby (1.1.5)
35
- diff-lcs (1.3)
36
- docile (1.1.5)
37
- i18n (1.7.0)
38
- concurrent-ruby (~> 1.0)
39
- jmespath (1.4.0)
40
- json (2.2.0)
41
- memoist (0.16.1)
42
- minitest (5.13.0)
43
- rainbow (3.0.0)
44
- rake (13.0.0)
45
- rspec (3.9.0)
46
- rspec-core (~> 3.9.0)
47
- rspec-expectations (~> 3.9.0)
48
- rspec-mocks (~> 3.9.0)
49
- rspec-core (3.9.0)
50
- rspec-support (~> 3.9.0)
51
- rspec-expectations (3.9.0)
52
- diff-lcs (>= 1.2.0, < 2.0)
53
- rspec-support (~> 3.9.0)
54
- rspec-mocks (3.9.0)
55
- diff-lcs (>= 1.2.0, < 2.0)
56
- rspec-support (~> 3.9.0)
57
- rspec-support (3.9.0)
58
- simplecov (0.13.0)
59
- docile (~> 1.1.0)
60
- json (>= 1.8, < 3)
61
- simplecov-html (~> 0.10.0)
62
- simplecov-html (0.10.2)
63
- thor (0.20.3)
64
- thread_safe (0.3.6)
65
- tzinfo (1.2.5)
66
- thread_safe (~> 0.1)
67
- zeitwerk (2.2.1)
68
-
69
- PLATFORMS
70
- ruby
71
-
72
- DEPENDENCIES
73
- aws-mfa-secure!
74
- bundler
75
- byebug
76
- cli_markdown
77
- codeclimate-test-reporter
78
- rake
79
- rspec
80
-
81
- BUNDLED WITH
82
- 2.0.2