aws_assume_role 1.1.1-universal-darwin → 1.2.0-universal-darwin
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -4
- data/CHANGELOG.md +7 -0
- data/README.md +1 -1
- data/aws_assume_role.gemspec +6 -5
- data/lib/aws_assume_role/credentials/factories/abstract_factory.rb +1 -1
- data/lib/aws_assume_role/credentials/factories/default_chain_provider.rb +2 -1
- data/lib/aws_assume_role/credentials/factories/repository.rb +3 -1
- data/lib/aws_assume_role/credentials/providers/mfa_session_credentials.rb +21 -10
- data/lib/aws_assume_role/profile_configuration.rb +2 -1
- data/lib/aws_assume_role/runner.rb +2 -1
- data/lib/aws_assume_role/types.rb +1 -1
- data/lib/aws_assume_role/version.rb +1 -1
- metadata +10 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed68195ac2fe3cb59f88bba5b1ffb035d655bbd8819c709ffbbd1de617cdd6b0
|
4
|
+
data.tar.gz: ff963eba14d1dc9a7d3c8d3520557e40b35000e5c6d66331d3979264ed6ce3c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99cad0ef00b6250af7ce93fb4c5a49a4dae1f35c5b9b8bf0f700305851fcf9878526d4ebd709ace6e72014ba83144e74a1956b2029c4b988ac8e55cbf6288f02
|
7
|
+
data.tar.gz: 804bbaa46c011ceba762cd5dc91e8d335211f74c2537a109d73b3ad0bf07fc7975bc2c2b5d287241448a76937313e1c7d6d2a61489a6d5485964a27d19f7cbcc
|
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.
|
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.
|
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
|
data/aws_assume_role.gemspec
CHANGED
@@ -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",
|
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.
|
33
|
-
spec.add_runtime_dependency "dry-types", "~> 0.
|
34
|
-
spec.add_runtime_dependency "dry-validation", "~> 0.
|
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.
|
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.
|
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(
|
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
|
-
|
22
|
-
|
23
|
-
attribute :
|
24
|
-
attribute :
|
25
|
-
attribute :
|
26
|
-
|
27
|
-
|
28
|
-
attribute :
|
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.
|
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]+/
|
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.2.0
|
5
5
|
platform: universal-darwin
|
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-
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
103
|
+
version: '0.11'
|
103
104
|
- !ruby/object:Gem::Dependency
|
104
105
|
name: gli
|
105
106
|
requirement: !ruby/object:Gem::Requirement
|
@@ -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.
|
435
|
+
rubygems_version: 2.7.7
|
435
436
|
signing_key:
|
436
437
|
specification_version: 4
|
437
438
|
summary: Manage AWS STS credentials with MFA
|