active_kms 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/LICENSE.txt +1 -1
- data/README.md +10 -2
- data/lib/active_kms/log_subscriber.rb +2 -2
- data/lib/active_kms/version.rb +1 -1
- data/lib/active_kms.rb +7 -7
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fea10177fdfb47749adbe2124399ff36888ba36714bc74670c1415334ec0caf9
|
4
|
+
data.tar.gz: e8deeaafd93f148872bf81c76647e9c6b5ca255e8720fb1994aa49d5cdb9022e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ccb3ac2371d95e1fe9034526b5523d91940c706f986f2db2f3bc780eca0b23e1f4dcd5e42651031574c1c934df857f223a716f9ba2afedb00ef83d0e9901328b
|
7
|
+
data.tar.gz: c2a91da842938155123a9f16db7685e424189ddc17e6d9e189d10d4431f51e0b0f97607cbe32ee8b97b521f52f814b6cae20524cd2722bb7e640999a21562786
|
data/CHANGELOG.md
CHANGED
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -2,7 +2,9 @@
|
|
2
2
|
|
3
3
|
Simple, secure key management for [Active Record encryption](https://edgeguides.rubyonrails.org/active_record_encryption.html)
|
4
4
|
|
5
|
-
**Note:**
|
5
|
+
**Note:** At the moment, encryption requires three encryption requests and one decryption request. See [this Rails issue](https://github.com/rails/rails/issues/42388) for more info. As a result, there’s no way to grant encryption and decryption permission separately.
|
6
|
+
|
7
|
+
For Lockbox and attr_encrypted, check out [KMS Encrypted](https://github.com/ankane/kms_encrypted)
|
6
8
|
|
7
9
|
[![Build Status](https://github.com/ankane/active_kms/workflows/build/badge.svg?branch=master)](https://github.com/ankane/active_kms/actions)
|
8
10
|
|
@@ -130,7 +132,13 @@ Key management services allow you to rotate the master key without any code chan
|
|
130
132
|
vault write -f transit/keys/my-key/rotate
|
131
133
|
```
|
132
134
|
|
133
|
-
New data will be encrypted with the new master key version.
|
135
|
+
New data will be encrypted with the new master key version. To encrypt existing data with new master key version, run:
|
136
|
+
|
137
|
+
```ruby
|
138
|
+
User.find_each do |user|
|
139
|
+
user.encrypt
|
140
|
+
end
|
141
|
+
```
|
134
142
|
|
135
143
|
### Switching Keys
|
136
144
|
|
@@ -4,14 +4,14 @@ module ActiveKms
|
|
4
4
|
return unless logger.debug?
|
5
5
|
|
6
6
|
name = "Decrypt Data Key (#{event.duration.round(1)}ms)"
|
7
|
-
debug " #{color(name, YELLOW, true)}"
|
7
|
+
debug " #{color(name, YELLOW, bold: true)}"
|
8
8
|
end
|
9
9
|
|
10
10
|
def encrypt(event)
|
11
11
|
return unless logger.debug?
|
12
12
|
|
13
13
|
name = "Encrypt Data Key (#{event.duration.round(1)}ms)"
|
14
|
-
debug " #{color(name, YELLOW, true)}"
|
14
|
+
debug " #{color(name, YELLOW, bold: true)}"
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
data/lib/active_kms/version.rb
CHANGED
data/lib/active_kms.rb
CHANGED
@@ -2,15 +2,15 @@
|
|
2
2
|
require "active_support"
|
3
3
|
|
4
4
|
# modules
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
require_relative "active_kms/base_key_provider"
|
6
|
+
require_relative "active_kms/log_subscriber"
|
7
|
+
require_relative "active_kms/version"
|
8
8
|
|
9
9
|
# providers
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
10
|
+
require_relative "active_kms/aws_key_provider"
|
11
|
+
require_relative "active_kms/google_cloud_key_provider"
|
12
|
+
require_relative "active_kms/test_key_provider"
|
13
|
+
require_relative "active_kms/vault_key_provider"
|
14
14
|
|
15
15
|
module ActiveKms
|
16
16
|
class Error < StandardError; end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_kms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-12-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 7
|
19
|
+
version: '7'
|
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: 7
|
26
|
+
version: '7'
|
27
27
|
description:
|
28
28
|
email: andrew@ankane.org
|
29
29
|
executables: []
|
@@ -53,14 +53,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
53
53
|
requirements:
|
54
54
|
- - ">="
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version: '2.
|
56
|
+
version: '2.7'
|
57
57
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
requirements: []
|
63
|
-
rubygems_version: 3.
|
63
|
+
rubygems_version: 3.4.10
|
64
64
|
signing_key:
|
65
65
|
specification_version: 4
|
66
66
|
summary: Simple, secure key management for Active Record encryption
|