aws_assume_role 1.1.1-universal-linux → 1.2.0-universal-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: b4d760d911075070b709e42deb9c629b426a49aa6abee4aa28c9979f7e4d3bca
4
- data.tar.gz: 3c3be9b959d24559262b9ec8c276006d8b53032756ccf9e7314681195ac3764e
3
+ metadata.gz: 127a5b20d266a6726fea588ff3f9ae988f586e95c6baf79304b3b6191d729168
4
+ data.tar.gz: fe76bc3ee9a038ae4af364a1843dbab439ec994999baba3950eac8b78422dadd
5
5
  SHA512:
6
- metadata.gz: 0706066010a8ced39b90f7d2e36ecae707ef01d19169f000a34b522a9a0b22434776a39eaaf39f4bd2ef06ddab618d4c233bd99947914e2315a21ab1b2322047
7
- data.tar.gz: 1e300e1a6eb48cb1a17c6bf4a5a38d3570538eb3017c0e9c972ca771f12f8a088e6269a3156da86928c9b1a1eb5b1e53d1932bd696aafd8cf5b3e46b61e74b12
6
+ metadata.gz: 2435f44d260756b9444cb4f236b7d49668fcf19285155937ee20f344b986032f90a69c10ca6b34f6d60adba30c5c50b2358a7a3d29dee770d7004964dbe49149
7
+ data.tar.gz: ae564261374be8d4d9310db1a46fbd6a5ec4d03356f9ce1fea8bec23ff0143f308876aa0547268939a0dab9026bf391ce9ba4592b571fee12657f00cd7e78572
data/.travis.yml CHANGED
@@ -3,13 +3,12 @@ sudo: false
3
3
  script: bundle exec rake
4
4
  jobs:
5
5
  include:
6
- - stage: test
7
- rvm: 2.2
8
- script: bundle exec rake
9
6
  - rvm: 2.3
10
7
  script: bundle exec rake
8
+ - rvm: 2.5
9
+ script: bundle exec rake
11
10
  - stage: deploy
12
- rvm: 2.3
11
+ rvm: 2.5
13
12
  script: bundle exec rake setup_credentials && chmod 0600 /home/travis/.gem/credentials && bundle exec rake publish
14
13
  stages:
15
14
  - name: test
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## 1.2.0
2
+ * Support latest version of `dry-*` gems
3
+ * Requires ruby 2.3
4
+
5
+ ## 1.1.2
6
+ * Pin breaking upstream `dry-*` gems until code is fixed in aws_assume_role
7
+
1
8
  ## 1.1.1
2
9
  * Allow aws-assume-role to retrieve all Yubikey stored OATH tokens (@alanthing)
3
10
 
data/README.md CHANGED
@@ -25,7 +25,7 @@ For more information on role assumption, see the [AWS documentation](https://doc
25
25
 
26
26
  Requirements
27
27
  ------------
28
- * Ruby ≥ 2.2
28
+ * Ruby ≥ 2.3
29
29
  * macOS Keychain / GNOME Keyring
30
30
  * At least one account with Amazon Web Services
31
31
  * An IAM role configured in the target account
@@ -8,7 +8,8 @@ PLATFORM = ENV.fetch("PLATFORM", Gem::Platform.local.os)
8
8
  Gem::Specification.new do |spec|
9
9
  spec.name = "aws_assume_role"
10
10
  spec.version = AwsAssumeRole::VERSION
11
- spec.authors = ["Jon Topper", "Jack Thomas", "Naadir Jeewa", "David King", "Tim Bannister", "Phil Potter", "Tom Haynes"]
11
+ spec.authors = ["Jon Topper", "Jack Thomas", "Naadir Jeewa", "David King",
12
+ "Tim Bannister", "Phil Potter", "Tom Haynes", "Alan Ivey"]
12
13
  spec.email = ["jon@scalefactory.com", "jack@scalefactory.com", "naadir@scalefactory.com", "tim@scalefactory.com"]
13
14
 
14
15
  spec.description = "Used to fetch multiple AWS Role Credential "\
@@ -29,9 +30,9 @@ Gem::Specification.new do |spec|
29
30
  spec.add_runtime_dependency "activesupport", "~> 4.2"
30
31
  spec.add_runtime_dependency "aws-sdk", "~> 2.7"
31
32
  spec.add_runtime_dependency "dry-configurable", "~> 0.5"
32
- spec.add_runtime_dependency "dry-struct", "~> 0.1"
33
- spec.add_runtime_dependency "dry-types", "~> 0.12"
34
- spec.add_runtime_dependency "dry-validation", "~> 0.10"
33
+ spec.add_runtime_dependency "dry-struct", "~> 0.5"
34
+ spec.add_runtime_dependency "dry-types", "~> 0.13"
35
+ spec.add_runtime_dependency "dry-validation", "~> 0.11"
35
36
  spec.add_runtime_dependency "gli", "~> 2.15"
36
37
  spec.add_runtime_dependency "highline", "~> 1.6"
37
38
  spec.add_runtime_dependency "i18n", "~> 0.7"
@@ -49,7 +50,7 @@ Gem::Specification.new do |spec|
49
50
 
50
51
  case PLATFORM
51
52
  when /linux|bsd/
52
- spec.add_dependency "gir_ffi-gnome_keyring", "~> 0.0", ">= 0.0.3"
53
+ spec.add_dependency "gir_ffi-gnome_keyring", "~> 0.0", ">= 0.0.9"
53
54
  when /darwin/
54
55
  spec.add_dependency "ruby-keychain", "~> 0.3", ">= 0.3.2"
55
56
  end
@@ -9,7 +9,7 @@ class AwsAssumeRole::Credentials::Factories::AbstractFactory
9
9
  include AwsAssumeRole::Credentials::Factories
10
10
  include AwsAssumeRole::Logging
11
11
 
12
- Dry::Types.register_class(Aws::SharedCredentials)
12
+ Dry::Types.register("aws.sharedcredentials", Aws::SharedCredentials)
13
13
  attr_reader :credentials, :region, :profile, :role_arn
14
14
 
15
15
  def initialize(_options)
@@ -12,10 +12,11 @@ require_relative "shared"
12
12
  require_relative "static"
13
13
 
14
14
  class AwsAssumeRole::Credentials::Factories::DefaultChainProvider < Dry::Struct
15
- constructor_type :schema
16
15
  include AwsAssumeRole::Credentials::Factories
17
16
  include AwsAssumeRole::Logging
18
17
 
18
+ transform_types { |t| t.meta(omittable: true) }
19
+
19
20
  attribute :access_key_id, Dry::Types["strict.string"].optional
20
21
  attribute :credentials, Dry::Types["object"].optional
21
22
  attribute :duration_seconds, Dry::Types["coercible.int"].optional
@@ -6,7 +6,9 @@ require_relative "abstract_factory"
6
6
  class AwsAssumeRole::Credentials::Factories::Repository
7
7
  include AwsAssumeRole::Credentials::Factories
8
8
 
9
- SubFactoryRepositoryType = Types::Hash.schema(Types::Coercible::Int => Types::Strict::Array)
9
+ SubFactoryRepositoryType = Types::Hash.schema(
10
+ Types::Coercible::Int => Types::Strict::Array.meta(omittable: true),
11
+ )
10
12
 
11
13
  FactoryRepositoryType = Types::Hash.schema(
12
14
  credential_provider: SubFactoryRepositoryType,
@@ -12,27 +12,38 @@ rescue LoadError
12
12
  end
13
13
 
14
14
  class AwsAssumeRole::Credentials::Providers::MfaSessionCredentials < Dry::Struct
15
- constructor_type :schema
16
15
  include AwsAssumeRole::Vendored::Aws::CredentialProvider
17
16
  include AwsAssumeRole::Vendored::Aws::RefreshingCredentials
18
17
  include AwsAssumeRole::Ui
19
18
  include AwsAssumeRole::Logging
20
19
 
21
- attribute :permanent_credentials, Dry::Types["object"].optional
22
- attribute :credentials, Dry::Types["object"].optional
23
- attribute :expiration, Dry::Types["strict.time"].default(Time.now)
24
- attribute :first_time, Dry::Types["strict.bool"].default(true)
25
- attribute :persist_session, Dry::Types["strict.bool"].default(true)
26
- attribute :duration_seconds, Dry::Types["coercible.int"].default(3600)
27
- attribute :region, AwsAssumeRole::Types::Region.optional
28
- attribute :serial_number, AwsAssumeRole::Types::MfaSerial.optional.default("automatic")
20
+ transform_types { |t| t.meta(omittable: true) }
21
+
22
+ attribute :permanent_credentials, Dry::Types["object"]
23
+ attribute :credentials, Dry::Types["object"]
24
+ attribute :expiration, (Dry::Types["strict.time"]
25
+ .default(Time.now)
26
+ .constructor { |v| v.nil? ? Dry::Types::Undefined : v })
27
+ attribute :first_time, (Dry::Types["strict.bool"]
28
+ .default(true)
29
+ .constructor { |v| v.nil? ? Dry::Types::Undefined : v })
30
+ attribute :persist_session, (Dry::Types["strict.bool"]
31
+ .default(true)
32
+ .constructor { |v| v.nil? ? Dry::Types::Undefined : v })
33
+ attribute :duration_seconds, (Dry::Types["coercible.int"]
34
+ .default(3600)
35
+ .constructor { |v| v.nil? ? Dry::Types::Undefined : v })
36
+ attribute :region, AwsAssumeRole::Types::Region
37
+ attribute :serial_number, (AwsAssumeRole::Types::MfaSerial
38
+ .default("automatic")
39
+ .constructor { |v| v.nil? ? Dry::Types::Undefined : v })
29
40
  attribute :yubikey_oath_name, Dry::Types["strict.string"].optional
30
41
 
31
42
  def initialize(options)
32
43
  options.each { |key, value| instance_variable_set("@#{key}", value) }
33
44
  @permanent_credentials ||= @credentials
34
45
  @credentials = nil
35
- @serial_number = resolve_serial_number(serial_number)
46
+ @serial_number = resolve_serial_number(@serial_number)
36
47
  AwsAssumeRole::Vendored::Aws::RefreshingCredentials.instance_method(:initialize).bind(self).call(options)
37
48
  end
38
49
 
@@ -4,8 +4,9 @@ require_relative "includes"
4
4
  require_relative "logging"
5
5
 
6
6
  class AwsAssumeRole::ProfileConfiguration < Dry::Struct
7
- constructor_type :schema
8
7
  include AwsAssumeRole::Logging
8
+ transform_types { |t| t.meta(omittable: true) }
9
+
9
10
  attribute :access_key_id, Dry::Types["strict.string"].optional
10
11
  attribute :credentials, Dry::Types["object"].optional
11
12
  attribute :secret_access_key, Dry::Types["strict.string"].optional
@@ -5,13 +5,14 @@ require_relative "logging"
5
5
 
6
6
  class AwsAssumeRole::Runner < Dry::Struct
7
7
  include AwsAssumeRole::Logging
8
- constructor_type :schema
9
8
  attribute :command, Dry::Types["coercible.array"].of(Dry::Types["strict.string"]).default([])
10
9
  attribute :exit_on_error, Dry::Types["strict.bool"].default(true)
11
10
  attribute :expected_exit_code, Dry::Types["strict.int"].default(0)
12
11
  attribute :environment, Dry::Types["strict.hash"].default({})
13
12
  attribute :credentials, Dry::Types["object"].optional
14
13
 
14
+ transform_types { |t| t.meta(omittable: true) }
15
+
15
16
  def initialize(options)
16
17
  super(options)
17
18
  command_to_exec = command.map(&:shellescape).join(" ")
@@ -5,7 +5,7 @@ module AwsAssumeRole
5
5
  module Types
6
6
  Dry = Dry::Types.module
7
7
 
8
- ::Dry::Types.register_class(::Aws::Credentials)
8
+ ::Dry::Types.register("aws.credentials", ::Aws::Credentials)
9
9
  AwsAssumeRole::Types::Credentials = ::Dry::Types["aws.credentials"]
10
10
 
11
11
  ACCESS_KEY_REGEX = /[\w]+/
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AwsAssumeRole
4
- VERSION = "1.1.1".freeze
4
+ VERSION = "1.2.0".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.1
4
+ version: 1.2.0
5
5
  platform: universal-linux
6
6
  authors:
7
7
  - Jon Topper
@@ -11,10 +11,11 @@ authors:
11
11
  - Tim Bannister
12
12
  - Phil Potter
13
13
  - Tom Haynes
14
+ - Alan Ivey
14
15
  autorequire:
15
16
  bindir: bin
16
17
  cert_chain: []
17
- date: 2018-02-01 00:00:00.000000000 Z
18
+ date: 2018-06-20 00:00:00.000000000 Z
18
19
  dependencies:
19
20
  - !ruby/object:Gem::Dependency
20
21
  name: activesupport
@@ -64,42 +65,42 @@ dependencies:
64
65
  requirements:
65
66
  - - "~>"
66
67
  - !ruby/object:Gem::Version
67
- version: '0.1'
68
+ version: '0.5'
68
69
  type: :runtime
69
70
  prerelease: false
70
71
  version_requirements: !ruby/object:Gem::Requirement
71
72
  requirements:
72
73
  - - "~>"
73
74
  - !ruby/object:Gem::Version
74
- version: '0.1'
75
+ version: '0.5'
75
76
  - !ruby/object:Gem::Dependency
76
77
  name: dry-types
77
78
  requirement: !ruby/object:Gem::Requirement
78
79
  requirements:
79
80
  - - "~>"
80
81
  - !ruby/object:Gem::Version
81
- version: '0.12'
82
+ version: '0.13'
82
83
  type: :runtime
83
84
  prerelease: false
84
85
  version_requirements: !ruby/object:Gem::Requirement
85
86
  requirements:
86
87
  - - "~>"
87
88
  - !ruby/object:Gem::Version
88
- version: '0.12'
89
+ version: '0.13'
89
90
  - !ruby/object:Gem::Dependency
90
91
  name: dry-validation
91
92
  requirement: !ruby/object:Gem::Requirement
92
93
  requirements:
93
94
  - - "~>"
94
95
  - !ruby/object:Gem::Version
95
- version: '0.10'
96
+ version: '0.11'
96
97
  type: :runtime
97
98
  prerelease: false
98
99
  version_requirements: !ruby/object:Gem::Requirement
99
100
  requirements:
100
101
  - - "~>"
101
102
  - !ruby/object:Gem::Version
102
- version: '0.10'
103
+ version: '0.11'
103
104
  - !ruby/object:Gem::Dependency
104
105
  name: gli
105
106
  requirement: !ruby/object:Gem::Requirement
@@ -317,7 +318,7 @@ dependencies:
317
318
  version: '0.0'
318
319
  - - ">="
319
320
  - !ruby/object:Gem::Version
320
- version: 0.0.3
321
+ version: 0.0.9
321
322
  type: :runtime
322
323
  prerelease: false
323
324
  version_requirements: !ruby/object:Gem::Requirement
@@ -327,7 +328,7 @@ dependencies:
327
328
  version: '0.0'
328
329
  - - ">="
329
330
  - !ruby/object:Gem::Version
330
- version: 0.0.3
331
+ version: 0.0.9
331
332
  description: Used to fetch multiple AWS Role Credential Keys using different Session
332
333
  Keys and store them securely using Gnome Keyring or OSX keychain
333
334
  email:
@@ -431,7 +432,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
431
432
  version: '0'
432
433
  requirements: []
433
434
  rubyforge_project:
434
- rubygems_version: 2.7.4
435
+ rubygems_version: 2.7.7
435
436
  signing_key:
436
437
  specification_version: 4
437
438
  summary: Manage AWS STS credentials with MFA