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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0608e906404bd3779e8ae59eb5ee6b4b26f0cdca3d973844d7acc62a90bd7115
4
- data.tar.gz: 1a027d137a460afac641d6f093bf32ede60a0a37fed0c780c0eecfd5075a30e7
3
+ metadata.gz: 0b3ecd4016516f3a84e803acc3859b439bd950e87d56b5824e359c38a8cfc3d7
4
+ data.tar.gz: 268a92df933a848bc8a278eeb3b43026265fae73d87b4ecaf4e6ecd12e91802b
5
5
  SHA512:
6
- metadata.gz: 626b0ba91d1bd1ed4a9927626af64c2977ca65ce5c1d174aa4755d3c782d6bf0a4a459aa27eab7dfeb4528ea7412e85befab3ee01a69eb2d1a52c7acd9bd759d
7
- data.tar.gz: 73d97616fcf204cf9ca130fcc09b5ee496e2d2786c4e004d1eb21310589ea9b680da8fbf40f323cb86bfe0cb3844ed7a5e5229c13979ec99d97b0ebe9bfad90a
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
- deploy:
8
- provider: rubygems
9
- api_key:
10
- secure: H6MYP5cWFC0BtqrxW6ahc1RFxywtyKRFjGlSpyoBM+AH2y8U194toWQdGyO/QMRQVr7vAZf+MdxYTutDvnBEkwQbof6QBJ1+4GFWSqFgYAVEV5Ddva0ea5dVE8xC3rMRvd+i5KTzwuVNX/+Cux49v2wGRWZLKOmBSWbujsL8SbpdKaPi+qsClkdz3YTrHpGEEWTPNBNTwDMlg+qAX3UkqoAxD5ebrUaFPdJR83yMSGUPfTm/urlKvkx85MONuj7lPL1CyoYJCvy31bE6CWGq2L/+2Fnk8RvNMCaDffY+8YjKhWduBLrGuUYWf+ZcERxW6AxDy6BFIkekpFwpeaDmrdfSTK0aELSZogGqs9VHs9O1pTApdS/NRYDzxC9hmlvub80xC2uI1Vnhn04Z95Gh9KYh0H20UnlBJJ7ewvFPHzQ3zK8Z2O3kJOeZo0rX2d3yGOydyHlf1dX/auGnn8QVcr7w1jERQDLi5ZEAR+EGnYROvfGKjfP9rgaLoouTbEGXx7KV9QQjLUsmQ0q2yu+HoVlQaDtv7VEQTtFnvdmiVGYbWj+DhaquvTmHyiizO7hFOfvVYYFyOM2iFoRCY+dT3kapqc0DM94BUjxV3tMZX6MYNYfwnNwhNNpTXLVvVXP9cShL+ogwY/E0C2Fg2CYdY5/Ioe6hUbAiPx79dwzVfic=
11
- gem: aws_assume_role
12
- on:
13
- tags: true
14
- repo: scalefactory/aws-assume-role
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,3 +1,6 @@
1
+ ## 1.1.1
2
+ * Allow aws-assume-role to retrieve all Yubikey stored OATH tokens (@alanthing)
3
+
1
4
  ## 1.1.0
2
5
  * Publish separate gems for Linux, BSD and MacOS (@randomvariable)
3
6
 
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
- sh "cd #{File.dirname(__FILE__)} && mkdir -p pkg"
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|
@@ -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 = 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
- codes = YubiOATH.new(card).calculate_all(timestamp: Time.now)
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AwsAssumeRole
4
- VERSION = "1.1.0".freeze
4
+ VERSION = "1.1.1".freeze
5
5
  end
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.0
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-04 00:00:00.000000000 Z
17
+ date: 2018-02-01 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: activesupport