aws_assume_role 1.1.0-linux → 1.1.1-linux
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +14 -11
- data/CHANGELOG.md +3 -0
- data/Rakefile +23 -1
- data/aws_assume_role.gemspec +1 -1
- data/lib/aws_assume_role/credentials/providers/mfa_session_credentials.rb +1 -2
- data/lib/aws_assume_role/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b3ecd4016516f3a84e803acc3859b439bd950e87d56b5824e359c38a8cfc3d7
|
4
|
+
data.tar.gz: 268a92df933a848bc8a278eeb3b43026265fae73d87b4ecaf4e6ecd12e91802b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c3f9d4270bcd66505c2628d95f48b5044cdbec609bdb446fd6498ce298eafd2e709e0d0d64def06632b14f15c060ce8b47a3a7794baaf15277f4eac80e4df20
|
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
data/Rakefile
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require "aws_assume_role/version"
|
4
4
|
require "bundler/gem_tasks"
|
5
|
+
require "yaml"
|
5
6
|
|
6
7
|
task default: :test
|
7
8
|
|
@@ -26,12 +27,27 @@ DISTRIBUTIONS = [
|
|
26
27
|
"universal-openbsd",
|
27
28
|
].freeze
|
28
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
|
+
|
29
45
|
namespace :build_arch do
|
30
46
|
DISTRIBUTIONS.each do |arch|
|
31
47
|
desc "build binary gem for #{arch}"
|
32
48
|
task arch do
|
33
49
|
sh "cd #{File.dirname(__FILE__)} && PLATFORM=#{arch} gem build aws_assume_role.gemspec"
|
34
|
-
|
50
|
+
FileUtils.mkdir_p(File.join(File.dirname(__FILE__), "pkg"))
|
35
51
|
sh "cd #{File.dirname(__FILE__)} && mv *.gem pkg/"
|
36
52
|
end
|
37
53
|
end
|
@@ -39,6 +55,12 @@ end
|
|
39
55
|
|
40
56
|
task build: DISTRIBUTIONS.map { |d| "build_arch:#{d}" }
|
41
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
|
63
|
+
|
42
64
|
task :no_pry do
|
43
65
|
files = Dir.glob("**/**").reject { |x| x.match(/^spec|Gemfile|coverage|\.gemspec$|Rakefile/) || File.directory?(x) }
|
44
66
|
files.each do |file|
|
data/aws_assume_role.gemspec
CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.bindir = "bin"
|
26
26
|
spec.executables = spec.files.grep(%r{^bin/aws}) { |f| File.basename(f) }
|
27
27
|
spec.require_paths = ["lib"]
|
28
|
-
spec.platform
|
28
|
+
spec.platform = PLATFORM unless ENV.fetch("GENERIC_GEM", false)
|
29
29
|
spec.add_runtime_dependency "activesupport", "~> 4.2"
|
30
30
|
spec.add_runtime_dependency "aws-sdk", "~> 2.7"
|
31
31
|
spec.add_runtime_dependency "dry-configurable", "~> 0.5"
|
@@ -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.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: linux
|
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
|