kms_encrypted 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +1 -1
- data/lib/kms_encrypted/model.rb +17 -2
- data/lib/kms_encrypted/version.rb +1 -1
- metadata +21 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7137f301bae6ecaa8ae8b7dd9947a2bd3aee5e3c92c918b397b5d28dfdbc0cbb
|
4
|
+
data.tar.gz: c0a094bc32726cdb89978a94390e2e2f4be47e320cea622865fae07f8ac658ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b4b6835f1401450167af387e5d89fee3079f699442d5960a4d78fdd8686b801d39f50ca00c11cb553050c69f441ea26915a1d98ecb28345950e0be091ce90386
|
7
|
+
data.tar.gz: 7423c9b750c0821408993e3bd9f69c188350f99eecbf3d9a1d87c038d5591e8755791f397609c7898cd2d2fce022a38b486aac78b5fc062ae76096f217678fd9
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# KMS Encrypted
|
2
2
|
|
3
|
-
Simple, secure key management for [attr_encrypted](https://github.com/attr-encrypted/attr_encrypted)
|
3
|
+
Simple, secure key management for [Lockbox](https://github.com/ankane/lockbox) and [attr_encrypted](https://github.com/attr-encrypted/attr_encrypted)
|
4
4
|
|
5
5
|
With KMS Encrypted:
|
6
6
|
|
data/lib/kms_encrypted/model.rb
CHANGED
@@ -109,10 +109,25 @@ module KmsEncrypted
|
|
109
109
|
define_method("rotate_#{key_method}!") do
|
110
110
|
# decrypt
|
111
111
|
plaintext_attributes = {}
|
112
|
-
|
113
|
-
|
112
|
+
|
113
|
+
# attr_encrypted
|
114
|
+
if self.class.respond_to?(:encrypted_attributes)
|
115
|
+
self.class.encrypted_attributes.select { |_, v| v[:key] == key_method.to_sym }.keys.each do |key|
|
116
|
+
plaintext_attributes[key] = send(key)
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
# lockbox attributes
|
121
|
+
if self.class.respond_to?(:lockbox_attributes)
|
122
|
+
self.class.lockbox_attributes.select { |_, v| v[:key] == key_method.to_sym }.keys.each do |key|
|
123
|
+
plaintext_attributes[key] = send(key)
|
124
|
+
end
|
114
125
|
end
|
115
126
|
|
127
|
+
# TODO lockbox attachments
|
128
|
+
# if self.class.respond_to?(:lockbox_attachments)
|
129
|
+
# end
|
130
|
+
|
116
131
|
# reset key
|
117
132
|
instance_variable_set("@#{key_method}", nil)
|
118
133
|
send("encrypted_#{key_method}=", nil)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kms_encrypted
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-07-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '5'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '5'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -108,6 +108,20 @@ dependencies:
|
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: lockbox
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0.2'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0.2'
|
111
125
|
- !ruby/object:Gem::Dependency
|
112
126
|
name: aws-sdk-kms
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -183,16 +197,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
183
197
|
requirements:
|
184
198
|
- - ">="
|
185
199
|
- !ruby/object:Gem::Version
|
186
|
-
version: '2.
|
200
|
+
version: '2.4'
|
187
201
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
188
202
|
requirements:
|
189
203
|
- - ">="
|
190
204
|
- !ruby/object:Gem::Version
|
191
205
|
version: '0'
|
192
206
|
requirements: []
|
193
|
-
|
194
|
-
rubygems_version: 2.7.6
|
207
|
+
rubygems_version: 3.0.4
|
195
208
|
signing_key:
|
196
209
|
specification_version: 4
|
197
|
-
summary: Simple, secure key management for attr_encrypted
|
210
|
+
summary: Simple, secure key management for Lockbox and attr_encrypted
|
198
211
|
test_files: []
|