yaml_vault 1.1.0 → 1.1.1

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
- SHA1:
3
- metadata.gz: a79d04cb3d8df1d8f24a3411fee8557b49244634
4
- data.tar.gz: 1ab20b6c54798ea32f882c50eb0bbd03204124d4
2
+ SHA256:
3
+ metadata.gz: 5eb430b21248916d5fef1f0efaf3b130f470022e127831963e19fef6e2b5036f
4
+ data.tar.gz: 0d1e5e5204271a502432ad0eaca81bce18c0b90e0cdf51e19fdbfda062c3a066
5
5
  SHA512:
6
- metadata.gz: 27f581f18b544b3b794024af3aa415660bd7d8974cffb19e7746806e9da3dc195e83a64e59e63700cdbe063cd49de75500a122c5aa434c66843f32a980b35bea
7
- data.tar.gz: 0d4005e3c7722f0472f66e8f54429ab47def0647783f99ccbfca3b7f88199f423f16233ad45d4b4cf8d16447d9b2617945e9ec149a99c6ebd615b04da45c039e
6
+ metadata.gz: 9af688ea8a99eddaa805e0a88eb2c62bce266555341d91d54c7525602c17119a250b54d1e0f0da17407ff11a443da432ef5ba589442904fb5852c95747c2ec19
7
+ data.tar.gz: cfc7dbb695073751446b4481bc207d3b23332156ddc3297c3efdd9fa38b25f111a1b24c8da6c96d57dafda4d56ffc3d9125d3691b4ba9bbe51aff98259967f54
data/exe/yaml_vault CHANGED
@@ -21,6 +21,7 @@ class YamlVault::Cli < Thor
21
21
  class_option :aws_region, type: :string
22
22
  class_option :aws_access_key_id, type: :string
23
23
  class_option :aws_secret_access_key, type: :string
24
+ class_option :aws_profile, type: :string
24
25
 
25
26
  class_option :gcp_kms_resource_id, type: :string
26
27
  class_option :gcp_credential_file, type: :string
@@ -41,6 +42,7 @@ class YamlVault::Cli < Thor
41
42
  aws_region: options[:aws_region],
42
43
  aws_access_key_id: options[:aws_access_key_id],
43
44
  aws_secret_access_key: options[:aws_secret_access_key],
45
+ aws_profile: options[:aws_profile],
44
46
  gcp_kms_resource_id: options[:gcp_kms_resource_id],
45
47
  gcp_credential_file: options[:gcp_credential_file]
46
48
  ).encrypt_yaml
@@ -63,6 +65,7 @@ class YamlVault::Cli < Thor
63
65
  aws_region: options[:aws_region],
64
66
  aws_access_key_id: options[:aws_access_key_id],
65
67
  aws_secret_access_key: options[:aws_secret_access_key],
68
+ aws_profile: options[:aws_profile],
66
69
  gcp_kms_resource_id: options[:gcp_kms_resource_id],
67
70
  gcp_credential_file: options[:gcp_credential_file]
68
71
  ).decrypt_yaml
@@ -1,3 +1,3 @@
1
1
  module YamlVault
2
- VERSION = "1.1.0"
2
+ VERSION = "1.1.1"
3
3
  end
data/lib/yaml_vault.rb CHANGED
@@ -22,7 +22,7 @@ module YamlVault
22
22
  def initialize(
23
23
  yaml_content, keys, cryptor_name = nil,
24
24
  passphrase: nil, sign_passphrase: nil, salt: nil, cipher: "aes-256-cbc", key_len: 32, signature_key_len: 64, digest: "SHA256",
25
- aws_kms_key_id: nil, aws_region: nil, aws_access_key_id: nil, aws_secret_access_key: nil,
25
+ aws_kms_key_id: nil, aws_region: nil, aws_access_key_id: nil, aws_secret_access_key: nil, aws_profile: nil,
26
26
  gcp_kms_resource_id: nil, gcp_credential_file: nil
27
27
  )
28
28
  @yaml = yaml_content
@@ -40,6 +40,7 @@ module YamlVault
40
40
  @aws_region = aws_region
41
41
  @aws_access_key_id = aws_access_key_id
42
42
  @aws_secret_access_key = aws_secret_access_key
43
+ @aws_profile = aws_profile
43
44
 
44
45
  @gcp_kms_resource_id = gcp_kms_resource_id
45
46
  @gcp_credential_file = gcp_credential_file
@@ -80,7 +81,7 @@ module YamlVault
80
81
  when "simple"
81
82
  ValueCryptor::Simple.new(@passphrase, @sign_passphrase, @salt, @cipher, @digest, @key_len, @signature_key_len)
82
83
  when "aws-kms", "kms"
83
- ValueCryptor::KMS.new(@aws_kms_key_id, region: @aws_region, aws_access_key_id: @aws_access_key_id, aws_secret_access_key: @aws_secret_access_key)
84
+ ValueCryptor::KMS.new(@aws_kms_key_id, region: @aws_region, aws_access_key_id: @aws_access_key_id, aws_secret_access_key: @aws_secret_access_key, aws_profile: @aws_profile)
84
85
  when "gcp-kms"
85
86
  ValueCryptor::GCPKMS.new(@gcp_kms_resource_id, @gcp_credential_file)
86
87
  else
@@ -111,7 +112,7 @@ module YamlVault
111
112
  end
112
113
 
113
114
  class KMS
114
- def initialize(key_id, region: nil, aws_access_key_id: nil, aws_secret_access_key: nil)
115
+ def initialize(key_id, region: nil, aws_access_key_id: nil, aws_secret_access_key: nil, aws_profile: nil)
115
116
  begin
116
117
  begin
117
118
  require 'aws-sdk-kms'
@@ -128,6 +129,7 @@ module YamlVault
128
129
  options[:region] = region if region
129
130
  options[:access_key_id] = aws_access_key_id if aws_access_key_id
130
131
  options[:secret_access_key] = aws_secret_access_key if aws_secret_access_key
132
+ options[:profile] = aws_profile if aws_profile
131
133
  @client = Aws::KMS::Client.new(options)
132
134
  @key_id = key_id
133
135
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yaml_vault
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - joker1007
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-12-15 00:00:00.000000000 Z
11
+ date: 2018-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -124,7 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
124
124
  version: '0'
125
125
  requirements: []
126
126
  rubyforge_project:
127
- rubygems_version: 2.6.13
127
+ rubygems_version: 2.7.4
128
128
  signing_key:
129
129
  specification_version: 4
130
130
  summary: yaml encryption/decryption helper.