lib/kms_encrypted.rb in kms_encrypted-1.2.1 vs lib/kms_encrypted.rb in kms_encrypted-1.2.2

- old
+ new

@@ -25,10 +25,11 @@ class << self attr_writer :aws_client attr_writer :google_client attr_writer :vault_client + attr_writer :key_id def aws_client @aws_client ||= Aws::KMS::Client.new( retry_limit: 1, http_open_timeout: 2, @@ -50,9 +51,13 @@ end end def vault_client @vault_client ||= ::Vault::Client.new + end + + def key_id + @key_id ||= ENV["KMS_KEY_ID"] end # hash is independent of key, but specific to audit device def context_hash(context, path:) context = Base64.encode64(context.to_json)