asherah 0.4.10-aarch64-linux → 0.5.1-aarch64-linux

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: 2306f143d8c9e9c15adcd514c975c1d41a176c1842db522b41811b27f31b05c1
4
- data.tar.gz: ad688b320e87097082c1683c702ae33a7240c4e0c1987e18425da3e2ae2af78a
3
+ metadata.gz: f89fbc3bb85f02af89338c9cade56bc458ebb26e83c59f8c726bb7f032746b62
4
+ data.tar.gz: 430faf8f2391af60061004d8cabbf19f6ce173bfc5e7248ca4875deeea1661f3
5
5
  SHA512:
6
- metadata.gz: 5d94e4358e66b204e992603229112c716b725e60cfa10551030105c1cef93a59eab07a601b23b7cba2f5b1ca21b031e36a85cc5be5b78d200e9a5bde22c30ac9
7
- data.tar.gz: fb765a908a521e87ff6928d266bf1dcc1eaa1fed1ff26aa0da19297aac80e5708a9ef8541bdb46fd7b0f1e61d29720205dc7d4ee18c5d77af17bd57d8085957d
6
+ metadata.gz: f66fbd2c6605d61c5de160fe231313993383ce7fbb4607f4360af328038132cf0a05dddfc87d801ceb55440bc1f48c8780c3dd4529d85a53ca0d7d6590d295d8
7
+ data.tar.gz: c09db816ab66ffdc8e8a7b6db2cd467a9fe5556d0d709379924785fad77b0b7466610c295c6f66b897522d2d6a1283e28f2d8b02219192fc67a58d7f71192172
data/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.5.1] - 2023-10-25
4
+
5
+ - Add `sql_metastore_db_type` config option to support PostgresSQL adapter for Asherah
6
+ - Upgrade to use asherah-cobhan v0.4.31
7
+
8
+ ## [0.5.0] - 2023-10-16
9
+
10
+ - Upgrade to use asherah-cobhan v0.4.30
11
+ - Expose `test-debug-static` kms type and `test-debug-memory` metastore type to skip warnings in tests
12
+ - Check initialized flag on setup/shutdown and raise appropriate errors
13
+
3
14
  ## [0.4.10] - 2023-08-10
4
15
 
5
16
  - Upgrade to use asherah-cobhan v0.4.25
data/README.md CHANGED
@@ -45,6 +45,8 @@ Asherah.configure do |config|
45
45
  end
46
46
  ```
47
47
 
48
+ See [config.rb](lib/asherah/config.rb) for all evailable configuration options.
49
+
48
50
  Encrypt some data for a `partition_id`
49
51
 
50
52
  ```ruby
@@ -1,5 +1,5 @@
1
- version: v0.4.25
2
- libasherah-arm64.so: 573d4ac89dc54be952b428e4caa52f00861d67fdd94baf2deb0b37a1e40ea5d1
3
- libasherah-x64.so: 9a976b425edcaa27be84314414747c3d4abc22571c9ae8170f476822c2380716
4
- libasherah-arm64.dylib: 73f60860303af81de5f042d50ef755bbac34bae9f966d654036a259161e03f81
5
- libasherah-x64.dylib: a0e0c5c69278602cd19889df9b86795baf957cdaa4635c413c81d06b59572ec4
1
+ version: v0.4.31
2
+ libasherah-arm64.so: 5fef00afadf6557a41c4c1a6f7e6fc29670898f6b530c7f7bce7b4a2b128bec8
3
+ libasherah-x64.so: 1ccf9dae397b4e375715e0260455108838d7f9fc85768875aeb0cfda826768c6
4
+ libasherah-arm64.dylib: 48ed5d7e992383910c78f5e1933d6aa42bb551b26e959d4c27d41627b6a10132
5
+ libasherah-x64.dylib: 18183fb5fb56423a5a61b162d14316c88a5f8e2b63ac004b686a29825a8f1045
@@ -9,6 +9,7 @@ module Asherah
9
9
  # @attr [String] metastore, The type of metastore for persisting keys (rdbms, dynamodb, memory)
10
10
  # @attr [String] connection_string, The database connection string (required when metastore is rdbms)
11
11
  # @attr [String] replica_read_consistency, For Aurora sessions using write forwarding (eventual, global, session)
12
+ # @attr [String] sql_metastore_db_type, Which SQL driver to use (mysql, postgres, oracle), defaults to mysql
12
13
  # @attr [String] dynamo_db_endpoint, An optional endpoint URL (for dynamodb metastore)
13
14
  # @attr [String] dynamo_db_region, The AWS region for DynamoDB requests (for dynamodb metastore)
14
15
  # @attr [String] dynamo_db_table_name, The table name for DynamoDB (for dynamodb metastore)
@@ -29,6 +30,7 @@ module Asherah
29
30
  metastore: :Metastore,
30
31
  connection_string: :ConnectionString,
31
32
  replica_read_consistency: :ReplicaReadConsistency,
33
+ sql_metastore_db_type: :SQLMetastoreDBType,
32
34
  dynamo_db_endpoint: :DynamoDBEndpoint,
33
35
  dynamo_db_region: :DynamoDBRegion,
34
36
  dynamo_db_table_name: :DynamoDBTableName,
@@ -43,8 +45,9 @@ module Asherah
43
45
  verbose: :Verbose
44
46
  }.freeze
45
47
 
46
- KMS_TYPES = ['static', 'aws'].freeze
47
- METASTORE_TYPES = ['rdbms', 'dynamodb', 'memory'].freeze
48
+ KMS_TYPES = ['static', 'aws', 'test-debug-static'].freeze
49
+ METASTORE_TYPES = ['rdbms', 'dynamodb', 'memory', 'test-debug-memory'].freeze
50
+ SQL_METASTORE_DB_TYPES = ['mysql', 'postgres', 'oracle'].freeze
48
51
 
49
52
  attr_accessor(*MAPPING.keys)
50
53
 
@@ -53,6 +56,7 @@ module Asherah
53
56
  validate_product_id
54
57
  validate_kms
55
58
  validate_metastore
59
+ validate_sql_metastore_db_type
56
60
  validate_kms_attributes
57
61
  end
58
62
 
@@ -91,6 +95,15 @@ module Asherah
91
95
  end
92
96
  end
93
97
 
98
+ def validate_sql_metastore_db_type
99
+ return if sql_metastore_db_type.nil?
100
+
101
+ unless SQL_METASTORE_DB_TYPES.include?(sql_metastore_db_type)
102
+ raise Error::ConfigError,
103
+ "config.sql_metastore_db_type must be one of these: #{SQL_METASTORE_DB_TYPES.join(', ')}"
104
+ end
105
+ end
106
+
94
107
  def validate_kms_attributes
95
108
  if kms == 'aws'
96
109
  raise Error::ConfigError, 'config.region_map not set' if region_map.nil?
Binary file
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Asherah
4
- VERSION = '0.4.10'
4
+ VERSION = '0.5.1'
5
5
  end
data/lib/asherah.rb CHANGED
@@ -44,6 +44,8 @@ module Asherah
44
44
  # @yield [Config]
45
45
  # @return [void]
46
46
  def configure
47
+ raise Asherah::Error::AlreadyInitialized if @initialized
48
+
47
49
  config = Config.new
48
50
  yield config
49
51
  config.validate!
@@ -53,6 +55,7 @@ module Asherah
53
55
 
54
56
  result = SetupJson(config_buffer)
55
57
  Error.check_result!(result, 'SetupJson failed')
58
+ @initialized = true
56
59
  end
57
60
 
58
61
  # Encrypts data for a given partition_id and returns DataRowRecord in JSON format.
@@ -104,7 +107,10 @@ module Asherah
104
107
 
105
108
  # Stop the Asherah instance
106
109
  def shutdown
110
+ raise Asherah::Error::NotInitialized unless @initialized
111
+
107
112
  Shutdown()
113
+ @initialized = false
108
114
  end
109
115
 
110
116
  private
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asherah
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.10
4
+ version: 0.5.1
5
5
  platform: aarch64-linux
6
6
  authors:
7
7
  - GoDaddy
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-08-10 00:00:00.000000000 Z
11
+ date: 2023-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cobhan