assumer 0.4.1a → 0.4.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/exe/assumer +29 -13
- data/lib/assumer/version.rb +1 -1
- data/lib/mfa.rb +3 -1
- metadata +4 -5
- data/Gemfile.lock +0 -34
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c10e463a92188934c2bc9792ea46b7b2a8a75b28
|
4
|
+
data.tar.gz: f040681ac07f584c4a6a1ac43c7c26145e515069
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba1fe37f2224aff087c443ccad8390af0aabd42bc79fcfefaac64e0195cbb9bc59531863a9ad9cab7db8994b6bc9813ee325c5a9659e9ee1fe02ab347f87c60f
|
7
|
+
data.tar.gz: 985154971e954069cf472ace3b277b43abb742a67cd146f15af5a2e7fd71de201878ee8294e93a5c9c7cb9b746c65b8401307e46b7416cf784b73cbfa72ff4fb
|
data/exe/assumer
CHANGED
@@ -62,25 +62,41 @@ def debug_credential_output(credentials:)
|
|
62
62
|
end
|
63
63
|
|
64
64
|
# First jump
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
65
|
+
begin
|
66
|
+
control_creds = Assumer::Assumer.new(
|
67
|
+
region: parsed_options[:region],
|
68
|
+
account: parsed_options[:control_account],
|
69
|
+
role: control_plane_role,
|
70
|
+
serial_number: mfa_serial_number,
|
71
|
+
profile: parsed_options[:profile]
|
72
|
+
)
|
73
|
+
rescue Assumer::AssumerError => e
|
74
|
+
puts e.message
|
75
|
+
puts "#{e.cause.class}: #{e.cause}" if DEBUG_FLAG
|
76
|
+
puts e.backtrace if DEBUG_FLAG
|
77
|
+
exit -1
|
78
|
+
end
|
79
|
+
|
72
80
|
if DEBUG_FLAG
|
73
81
|
warn 'First Jump Credentials:'
|
74
82
|
warn debug_credential_output(credentials: control_creds.assume_role_credentials.credentials)
|
75
83
|
end
|
76
84
|
|
77
85
|
# Second jump
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
86
|
+
begin
|
87
|
+
target_creds = Assumer::Assumer.new(
|
88
|
+
region: parsed_options[:region],
|
89
|
+
account: parsed_options[:target_account],
|
90
|
+
role: target_account_role,
|
91
|
+
credentials: control_creds
|
92
|
+
)
|
93
|
+
rescue Assumer::AssumerError => e
|
94
|
+
puts e.message
|
95
|
+
puts "#{e.cause.class}: #{e.cause}" if DEBUG_FLAG
|
96
|
+
puts e.backtrace if DEBUG_FLAG
|
97
|
+
exit -1
|
98
|
+
end
|
99
|
+
|
84
100
|
if DEBUG_FLAG
|
85
101
|
warn 'Second Jump Credentials:'
|
86
102
|
warn debug_credential_output(credentials: target_creds.assume_role_credentials.credentials)
|
data/lib/assumer/version.rb
CHANGED
data/lib/mfa.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: assumer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandon Sherman
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -96,7 +96,6 @@ extensions: []
|
|
96
96
|
extra_rdoc_files: []
|
97
97
|
files:
|
98
98
|
- Gemfile
|
99
|
-
- Gemfile.lock
|
100
99
|
- Rakefile
|
101
100
|
- assumer.gemspec
|
102
101
|
- bin/console
|
@@ -120,9 +119,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
120
119
|
version: '2.1'
|
121
120
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
122
121
|
requirements:
|
123
|
-
- - "
|
122
|
+
- - ">="
|
124
123
|
- !ruby/object:Gem::Version
|
125
|
-
version:
|
124
|
+
version: '0'
|
126
125
|
requirements: []
|
127
126
|
rubyforge_project:
|
128
127
|
rubygems_version: 2.4.5.1
|
data/Gemfile.lock
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
assumer (0.2.2)
|
5
|
-
aws-sdk-core (~> 2.1, >= 2.1.1)
|
6
|
-
pry (~> 0)
|
7
|
-
trollop (= 2.1.2)
|
8
|
-
|
9
|
-
GEM
|
10
|
-
remote: https://rubygems.org/
|
11
|
-
specs:
|
12
|
-
aws-sdk-core (2.1.26)
|
13
|
-
jmespath (~> 1.0)
|
14
|
-
coderay (1.1.0)
|
15
|
-
jmespath (1.1.3)
|
16
|
-
method_source (0.8.2)
|
17
|
-
pry (0.10.2)
|
18
|
-
coderay (~> 1.1.0)
|
19
|
-
method_source (~> 0.8.1)
|
20
|
-
slop (~> 3.4)
|
21
|
-
rake (10.4.2)
|
22
|
-
slop (3.6.0)
|
23
|
-
trollop (2.1.2)
|
24
|
-
|
25
|
-
PLATFORMS
|
26
|
-
ruby
|
27
|
-
|
28
|
-
DEPENDENCIES
|
29
|
-
assumer!
|
30
|
-
bundler (~> 1.10)
|
31
|
-
rake (~> 10.0)
|
32
|
-
|
33
|
-
BUNDLED WITH
|
34
|
-
1.10.6
|