kms_encrypted 1.5.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c5e9d54c273ae3e76a7a1f7a531b72b06caf5e00379f38e0d163e26199a06e88
4
- data.tar.gz: d52dfddfa8a212558a03a7471256f6eb9548f9d4f38c9cad94f4a3f9b83c8273
3
+ metadata.gz: 976b11beef2b23b84bfd0b3d55571594c98ab2c94cb36298e76e36bee216e50d
4
+ data.tar.gz: 1759acc732572f8dec16f33ce08d9d3ec20236fcc32e8607befab633ded7c08c
5
5
  SHA512:
6
- metadata.gz: 44ed5968f5922182764a922e8c915850e720b9909959ff0194c0f0451bb544986ea278b21380da539b30b203d8779304e01c8d4b04f407e67e623999c8456b1e
7
- data.tar.gz: 4cf8569a4bae315bf269ae16dfb145cb5bf90f8680eeab7b886be9e486281e09b6426529d7254da93e0adb0060eee4be9f8674bc15ba0730105d20c4c1cc7423
6
+ metadata.gz: 809e313c6f24df49ba7393d17a3f72e033d3f73de06c2d19091227a631e4c973d2efdd2f5f5e34497dee1e2737608b79691410a9841cd8bc87a76fbb726ff505
7
+ data.tar.gz: d9cff0a3c98c637198d1f4e4524922d304f87f7913c60c9eae98c49f07f03a7a88d59a1f5b24c7da5c8b198ccdb9ef28742bc066b10b1e46ddc9612189a02661
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 1.6.0 (2024-06-24)
2
+
3
+ - Dropped support for Ruby < 3.1 and Rails < 6.1
4
+
5
+ ## 1.5.1 (2023-09-05)
6
+
7
+ - Fixed deprecation warning with Active Support 7.1
8
+
1
9
  ## 1.5.0 (2023-04-09)
2
10
 
3
11
  - Added support for attr_encrypted 4
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2017-2023 Andrew Kane
1
+ Copyright (c) 2017-2024 Andrew Kane
2
2
 
3
3
  MIT License
4
4
 
data/README.md CHANGED
@@ -14,7 +14,7 @@ Supports [AWS KMS](https://aws.amazon.com/kms/), [Google Cloud KMS](https://clou
14
14
 
15
15
  Check out [this post](https://ankane.org/sensitive-data-rails) for more info on securing sensitive data with Rails
16
16
 
17
- [![Build Status](https://github.com/ankane/kms_encrypted/workflows/build/badge.svg?branch=master)](https://github.com/ankane/kms_encrypted/actions)
17
+ [![Build Status](https://github.com/ankane/kms_encrypted/actions/workflows/build.yml/badge.svg)](https://github.com/ankane/kms_encrypted/actions)
18
18
 
19
19
  ## How It Works
20
20
 
@@ -480,34 +480,6 @@ kms.decrypt(ciphertext, context: {model_name: "User", model_id: 123})
480
480
 
481
481
  To securely search encrypted data, check out [Blind Index](https://github.com/ankane/blind_index).
482
482
 
483
- ## Upgrading
484
-
485
- ### 1.0
486
-
487
- KMS Encrypted 1.0 brings a number of improvements. Here are a few breaking changes to be aware of:
488
-
489
- - There’s now a default encryption context with the model name and id
490
- - ActiveSupport notifications were changed from `generate_data_key` and `decrypt_data_key` to `encrypt` and `decrypt`
491
- - AWS KMS uses the `Encrypt` operation instead of `GenerateDataKey`
492
-
493
- If you didn’t previously use encryption context, add the `upgrade_context` option to your models:
494
-
495
- ```ruby
496
- class User < ApplicationRecord
497
- has_kms_key upgrade_context: true
498
- end
499
- ```
500
-
501
- Then run:
502
-
503
- ```ruby
504
- User.where("encrypted_kms_key NOT LIKE 'v1:%'").find_each do |user|
505
- user.rotate_kms_key!
506
- end
507
- ```
508
-
509
- And remove the `upgrade_context` option.
510
-
511
483
  ## History
512
484
 
513
485
  View the [changelog](CHANGELOG.md)
@@ -8,7 +8,7 @@ module KmsEncrypted
8
8
  name += " (#{event.duration.round(1)}ms)"
9
9
  context = event.payload[:context]
10
10
  context = context.inspect if context.is_a?(Hash)
11
- debug " #{color(name, YELLOW, true)} Context: #{context}"
11
+ debug " #{color(name, YELLOW, bold: true)} Context: #{context}"
12
12
  end
13
13
 
14
14
  def encrypt(event)
@@ -19,7 +19,7 @@ module KmsEncrypted
19
19
  name += " (#{event.duration.round(1)}ms)"
20
20
  context = event.payload[:context]
21
21
  context = context.inspect if context.is_a?(Hash)
22
- debug " #{color(name, YELLOW, true)} Context: #{context}"
22
+ debug " #{color(name, YELLOW, bold: true)} Context: #{context}"
23
23
  end
24
24
  end
25
25
  end
@@ -81,7 +81,7 @@ module KmsEncrypted
81
81
  key = SecureRandom.random_bytes(32)
82
82
 
83
83
  if eager_encrypt == :fetch_id
84
- raise ArgumentError, ":fetch_id only works with Postgres" unless self.class.connection.adapter_name =~ /postg/i
84
+ raise ArgumentError, ":fetch_id only works with Postgres" unless self.class.connection.adapter_name.match?(/postg/i)
85
85
  self.id ||= self.class.connection.execute("select nextval('#{self.class.sequence_name}')").first["nextval"]
86
86
  end
87
87
 
@@ -1,3 +1,3 @@
1
1
  module KmsEncrypted
2
- VERSION = "1.5.0"
2
+ VERSION = "1.6.0"
3
3
  end
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.5.0
4
+ version: 1.6.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: 2023-04-09 00:00:00.000000000 Z
11
+ date: 2024-06-24 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: '6'
19
+ version: '6.1'
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: '6'
26
+ version: '6.1'
27
27
  description:
28
28
  email: andrew@ankane.org
29
29
  executables: []
@@ -57,14 +57,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - ">="
59
59
  - !ruby/object:Gem::Version
60
- version: '3'
60
+ version: '3.1'
61
61
  required_rubygems_version: !ruby/object:Gem::Requirement
62
62
  requirements:
63
63
  - - ">="
64
64
  - !ruby/object:Gem::Version
65
65
  version: '0'
66
66
  requirements: []
67
- rubygems_version: 3.4.10
67
+ rubygems_version: 3.5.11
68
68
  signing_key:
69
69
  specification_version: 4
70
70
  summary: Simple, secure key management for Lockbox and attr_encrypted