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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4ef69ec3793d206e0f6dc11c39de7d61af017d4c743441c20592411fab4ed54c
4
- data.tar.gz: 7ddc9779bf39ce4dbbcbb52bb4f58a33407916cb58865de66aa761b4dd0da12a
3
+ metadata.gz: fea10177fdfb47749adbe2124399ff36888ba36714bc74670c1415334ec0caf9
4
+ data.tar.gz: e8deeaafd93f148872bf81c76647e9c6b5ca255e8720fb1994aa49d5cdb9022e
5
5
  SHA512:
6
- metadata.gz: 8285f7d2a15d25507104264c66c29dfbc6fe745d0161a860d8cd9115f75b1748d574cdcf3e5a07557397f95fd51188bb7795eb2742c442cf37f6837502ef872e
7
- data.tar.gz: 4240335bc026f1f36bdacdeb781b205cb4f809f81694bb83a3d69e10ee07e360ca50be999da68aa3236427b579f87c40998d7d8395d0d2438664fc15e300db1a
6
+ metadata.gz: ccb3ac2371d95e1fe9034526b5523d91940c706f986f2db2f3bc780eca0b23e1f4dcd5e42651031574c1c934df857f223a716f9ba2afedb00ef83d0e9901328b
7
+ data.tar.gz: c2a91da842938155123a9f16db7685e424189ddc17e6d9e189d10d4431f51e0b0f97607cbe32ee8b97b521f52f814b6cae20524cd2722bb7e640999a21562786
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.1.1 (2023-12-01)
2
+
3
+ - Fixed deprecation warning with Active Record 7.1
4
+
1
5
  ## 0.1.0 (2021-12-14)
2
6
 
3
7
  - First release
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2021 Andrew Kane
3
+ Copyright (c) 2021-2023 Andrew Kane
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
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:** This project is experimental until Rails 7 is released. 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.
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
@@ -1,3 +1,3 @@
1
1
  module ActiveKms
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
data/lib/active_kms.rb CHANGED
@@ -2,15 +2,15 @@
2
2
  require "active_support"
3
3
 
4
4
  # modules
5
- require "active_kms/base_key_provider"
6
- require "active_kms/log_subscriber"
7
- require "active_kms/version"
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
- require "active_kms/aws_key_provider"
11
- require "active_kms/google_cloud_key_provider"
12
- require "active_kms/test_key_provider"
13
- require "active_kms/vault_key_provider"
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.0
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: 2021-12-15 00:00:00.000000000 Z
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.0.0.rc3
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.0.0.rc3
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.6'
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.2.32
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