aws_assume_role 1.0.6 → 1.1.1
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/.travis.yml +14 -11
- data/CHANGELOG.md +7 -0
- data/Rakefile +45 -1
- data/aws_assume_role.gemspec +11 -2
- data/lib/aws_assume_role/credentials/providers/mfa_session_credentials.rb +1 -2
- data/lib/aws_assume_role/version.rb +1 -1
- metadata +23 -5
- data/ext/mkrf_conf.rb +0 -25
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5a75991b1e4c430bf00dedb8d69c35ea109cf0a1e073c1b64036299ec0d7f31f
|
|
4
|
+
data.tar.gz: 268a92df933a848bc8a278eeb3b43026265fae73d87b4ecaf4e6ecd12e91802b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e5b7ce3973c19c81f30577eddfbbc1065eea4d793d93bffbbc5dc88862961d4be1d47eda783699daefcaf648407c8b468d8b51989bcc908057c68180375792e2
|
|
7
|
+
data.tar.gz: 2b3311eb773c464bea0ad25dd19e6eaa2483c3ceac8a16ef1fd9257e4a53bce97fde3602d0f7b510f33d1f71a8ab5e247d24252d4048e071ba1b910b009f2e79
|
data/.travis.yml
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
language: ruby
|
|
2
|
-
rvm:
|
|
3
|
-
- 2.2
|
|
4
|
-
- 2.3.0
|
|
5
2
|
sudo: false
|
|
6
3
|
script: bundle exec rake
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
4
|
+
jobs:
|
|
5
|
+
include:
|
|
6
|
+
- stage: test
|
|
7
|
+
rvm: 2.2
|
|
8
|
+
script: bundle exec rake
|
|
9
|
+
- rvm: 2.3
|
|
10
|
+
script: bundle exec rake
|
|
11
|
+
- stage: deploy
|
|
12
|
+
rvm: 2.3
|
|
13
|
+
script: bundle exec rake setup_credentials && chmod 0600 /home/travis/.gem/credentials && bundle exec rake publish
|
|
14
|
+
stages:
|
|
15
|
+
- name: test
|
|
16
|
+
- name: deploy
|
|
17
|
+
if: tag =~ ^v
|
|
15
18
|
notifications:
|
|
16
19
|
slack:
|
|
17
20
|
secure: RmJmJSSDI8qdIpM2KKYoXX2mpcL85YZ9r9gF4rauZH9TuqnYOPP3kQ5iYJsE0VUTuZpuvQ8Axoux5IQr+IDK7kMrmrI0iaZp1dAR9tGK+aLF73sprOmQEou6HIoDs97UQhOWlsAUR8max/7WYdJYJ1o78dqavfFtOy0VcHCkUMRf+WxcKzz+8MunsocIYi0HXuz5vC3RAZCOaK2h8epXzmnWq0ke8YeTmddpDWC85wzeDNjA9T1j5WD+y6gC9F0vyaqVqDCsCXlbRKZl7a1TU9QGDVyBzowoGsWmTpFR80v4CKofAn6nnMRqblwATOS1jMT+HC+Yku29qFzXPugYa2KAUSQaYQiOe+TE5IDa2Exe/57ZQCOq4ve8gKSE9aQXh4Riq3u8qccM+UeoQdcwgXQIciTeWjqi4LQro6Dbyrv8XrUbxdG0VPsWmf49jbWgq6PPAJqdcbXr9eGb+81uJ2REa1vhDYZu4T3JHv4erd5QlyYWzeBJ/LMQav/C5mnMF43jg8DzZ2g0BZBao/reO9xcZre/ka8eOus9Ll1i+8PCxmFZMx2KDPC9i5R7bXL/CwPBjzFInmvHM0cgKjxrRSY6xMWSPyBbgdsKJl2qag74K5xG+2VPlMcVx0ikTKVjsja5iPlOYKhflGAfCKvpzPcd2QoEWg8jZYqZtO9Nj+M=
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
|
+
## 1.1.1
|
|
2
|
+
* Allow aws-assume-role to retrieve all Yubikey stored OATH tokens (@alanthing)
|
|
3
|
+
|
|
4
|
+
## 1.1.0
|
|
5
|
+
* Publish separate gems for Linux, BSD and MacOS (@randomvariable)
|
|
6
|
+
|
|
1
7
|
## 1.0.6
|
|
2
8
|
* Determine gem dependencies for OS X & Linux at install time (@randomvariable)
|
|
9
|
+
|
|
3
10
|
## 1.0.5
|
|
4
11
|
* Escape run commands properly (@mrprimate)
|
|
5
12
|
|
data/Rakefile
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require "aws_assume_role/version"
|
|
3
4
|
require "bundler/gem_tasks"
|
|
5
|
+
require "yaml"
|
|
6
|
+
|
|
4
7
|
task default: :test
|
|
5
8
|
|
|
6
9
|
begin
|
|
@@ -15,7 +18,48 @@ begin
|
|
|
15
18
|
rescue LoadError # rubocop:disable Lint/HandleExceptions
|
|
16
19
|
end
|
|
17
20
|
|
|
18
|
-
task :
|
|
21
|
+
task test: %i[no_pry rubocop spec]
|
|
22
|
+
|
|
23
|
+
DISTRIBUTIONS = [
|
|
24
|
+
"universal-linux",
|
|
25
|
+
"universal-freebsd",
|
|
26
|
+
"universal-darwin",
|
|
27
|
+
"universal-openbsd",
|
|
28
|
+
].freeze
|
|
29
|
+
|
|
30
|
+
CREDENTIALS = {
|
|
31
|
+
rubygems_api_key: ENV.fetch("API_KEY", "null"),
|
|
32
|
+
}.freeze
|
|
33
|
+
|
|
34
|
+
task :setup_credentials do
|
|
35
|
+
FileUtils.mkdir_p(File.expand_path("~/.gem"))
|
|
36
|
+
File.write(File.expand_path("~/.gem/credentials"), CREDENTIALS.to_yaml)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
task publish: %i[build build_generic] do
|
|
40
|
+
Dir.glob("#{File.dirname(__FILE__)}/pkg/*.gem") do |g|
|
|
41
|
+
sh "gem push #{g}"
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
namespace :build_arch do
|
|
46
|
+
DISTRIBUTIONS.each do |arch|
|
|
47
|
+
desc "build binary gem for #{arch}"
|
|
48
|
+
task arch do
|
|
49
|
+
sh "cd #{File.dirname(__FILE__)} && PLATFORM=#{arch} gem build aws_assume_role.gemspec"
|
|
50
|
+
FileUtils.mkdir_p(File.join(File.dirname(__FILE__), "pkg"))
|
|
51
|
+
sh "cd #{File.dirname(__FILE__)} && mv *.gem pkg/"
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
task build: DISTRIBUTIONS.map { |d| "build_arch:#{d}" }
|
|
57
|
+
|
|
58
|
+
task :build_generic do
|
|
59
|
+
sh "cd #{File.dirname(__FILE__)} && GENERIC_GEM=true gem build aws_assume_role.gemspec"
|
|
60
|
+
FileUtils.mkdir_p(File.join(File.dirname(__FILE__), "pkg"))
|
|
61
|
+
sh "cd #{File.dirname(__FILE__)} && mv *.gem pkg/"
|
|
62
|
+
end
|
|
19
63
|
|
|
20
64
|
task :no_pry do
|
|
21
65
|
files = Dir.glob("**/**").reject { |x| x.match(/^spec|Gemfile|coverage|\.gemspec$|Rakefile/) || File.directory?(x) }
|
data/aws_assume_role.gemspec
CHANGED
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
$LOAD_PATH << File.expand_path("../lib", __FILE__)
|
|
4
4
|
require "aws_assume_role/version"
|
|
5
|
+
|
|
6
|
+
PLATFORM = ENV.fetch("PLATFORM", Gem::Platform.local.os)
|
|
7
|
+
|
|
5
8
|
Gem::Specification.new do |spec|
|
|
6
9
|
spec.name = "aws_assume_role"
|
|
7
10
|
spec.version = AwsAssumeRole::VERSION
|
|
@@ -21,9 +24,8 @@ Gem::Specification.new do |spec|
|
|
|
21
24
|
}
|
|
22
25
|
spec.bindir = "bin"
|
|
23
26
|
spec.executables = spec.files.grep(%r{^bin/aws}) { |f| File.basename(f) }
|
|
24
|
-
spec.extensions = "ext/mkrf_conf.rb"
|
|
25
27
|
spec.require_paths = ["lib"]
|
|
26
|
-
|
|
28
|
+
spec.platform = PLATFORM unless ENV.fetch("GENERIC_GEM", false)
|
|
27
29
|
spec.add_runtime_dependency "activesupport", "~> 4.2"
|
|
28
30
|
spec.add_runtime_dependency "aws-sdk", "~> 2.7"
|
|
29
31
|
spec.add_runtime_dependency "dry-configurable", "~> 0.5"
|
|
@@ -44,4 +46,11 @@ Gem::Specification.new do |spec|
|
|
|
44
46
|
spec.add_development_dependency "yard", "~> 0.9"
|
|
45
47
|
spec.add_development_dependency "simplecov", "~> 0.13"
|
|
46
48
|
spec.add_development_dependency "webmock", "~> 2.3"
|
|
49
|
+
|
|
50
|
+
case PLATFORM
|
|
51
|
+
when /linux|bsd/
|
|
52
|
+
spec.add_dependency "gir_ffi-gnome_keyring", "~> 0.0", ">= 0.0.3"
|
|
53
|
+
when /darwin/
|
|
54
|
+
spec.add_dependency "ruby-keychain", "~> 0.3", ">= 0.3.2"
|
|
55
|
+
end
|
|
47
56
|
end
|
|
@@ -67,8 +67,7 @@ class AwsAssumeRole::Credentials::Providers::MfaSessionCredentials < Dry::Struct
|
|
|
67
67
|
raise "Yubikey not found" unless context.readers.length == 1
|
|
68
68
|
reader_name = context.readers.first
|
|
69
69
|
card = Smartcard::PCSC::Card.new(context, reader_name, :shared)
|
|
70
|
-
|
|
71
|
-
codes.fetch(BinData::String.new(@yubikey_oath_name))
|
|
70
|
+
YubiOATH.new(card).calculate(name: @yubikey_oath_name, timestamp: Time.now)
|
|
72
71
|
end
|
|
73
72
|
|
|
74
73
|
def refresh_using_mfa
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: aws_assume_role
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jon Topper
|
|
@@ -14,7 +14,7 @@ authors:
|
|
|
14
14
|
autorequire:
|
|
15
15
|
bindir: bin
|
|
16
16
|
cert_chain: []
|
|
17
|
-
date: 2018-01
|
|
17
|
+
date: 2018-02-01 00:00:00.000000000 Z
|
|
18
18
|
dependencies:
|
|
19
19
|
- !ruby/object:Gem::Dependency
|
|
20
20
|
name: activesupport
|
|
@@ -308,6 +308,26 @@ dependencies:
|
|
|
308
308
|
- - "~>"
|
|
309
309
|
- !ruby/object:Gem::Version
|
|
310
310
|
version: '2.3'
|
|
311
|
+
- !ruby/object:Gem::Dependency
|
|
312
|
+
name: gir_ffi-gnome_keyring
|
|
313
|
+
requirement: !ruby/object:Gem::Requirement
|
|
314
|
+
requirements:
|
|
315
|
+
- - "~>"
|
|
316
|
+
- !ruby/object:Gem::Version
|
|
317
|
+
version: '0.0'
|
|
318
|
+
- - ">="
|
|
319
|
+
- !ruby/object:Gem::Version
|
|
320
|
+
version: 0.0.3
|
|
321
|
+
type: :runtime
|
|
322
|
+
prerelease: false
|
|
323
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
324
|
+
requirements:
|
|
325
|
+
- - "~>"
|
|
326
|
+
- !ruby/object:Gem::Version
|
|
327
|
+
version: '0.0'
|
|
328
|
+
- - ">="
|
|
329
|
+
- !ruby/object:Gem::Version
|
|
330
|
+
version: 0.0.3
|
|
311
331
|
description: Used to fetch multiple AWS Role Credential Keys using different Session
|
|
312
332
|
Keys and store them securely using Gnome Keyring or OSX keychain
|
|
313
333
|
email:
|
|
@@ -317,8 +337,7 @@ email:
|
|
|
317
337
|
- tim@scalefactory.com
|
|
318
338
|
executables:
|
|
319
339
|
- aws-assume-role
|
|
320
|
-
extensions:
|
|
321
|
-
- ext/mkrf_conf.rb
|
|
340
|
+
extensions: []
|
|
322
341
|
extra_rdoc_files: []
|
|
323
342
|
files:
|
|
324
343
|
- ".gitignore"
|
|
@@ -333,7 +352,6 @@ files:
|
|
|
333
352
|
- Rakefile
|
|
334
353
|
- aws_assume_role.gemspec
|
|
335
354
|
- bin/aws-assume-role
|
|
336
|
-
- ext/mkrf_conf.rb
|
|
337
355
|
- i18n/en.yml
|
|
338
356
|
- lib/aws_assume_role.rb
|
|
339
357
|
- lib/aws_assume_role/cli.rb
|
data/ext/mkrf_conf.rb
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
require "rubygems"
|
|
2
|
-
require "rubygems/command"
|
|
3
|
-
require "rubygems/dependency_installer"
|
|
4
|
-
begin
|
|
5
|
-
Gem::Command.build_args = ARGV
|
|
6
|
-
rescue NoMethodError # rubocop:disable Lint/HandleExceptions
|
|
7
|
-
end
|
|
8
|
-
|
|
9
|
-
installer = Gem::DependencyInstaller.new
|
|
10
|
-
|
|
11
|
-
begin
|
|
12
|
-
case Gem::Platform.local.os
|
|
13
|
-
when "linux"
|
|
14
|
-
installer.install "gir_ffi-gnome_keyring", Gem::Requirement.new("~> 0.0", ">= 0.0.3")
|
|
15
|
-
when "darwin"
|
|
16
|
-
installer.install "ruby-keychain", Gem::Requirement.new("~> 0.3", ">= 0.3.2")
|
|
17
|
-
end
|
|
18
|
-
rescue => e # rubocop:disable Lint/RescueWithoutErrorClass
|
|
19
|
-
puts e.backtrace
|
|
20
|
-
exit(1)
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
f = File.open(File.join(File.dirname(__FILE__), "Rakefile"), "w") # create dummy rakefile to indicate success
|
|
24
|
-
f.write("task :default\n")
|
|
25
|
-
f.close
|