Class: Google::Apis::DlpV2::GooglePrivacyDlpV2CryptoKey

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/dlp_v2/classes.rb,
generated/google/apis/dlp_v2/representations.rb,
generated/google/apis/dlp_v2/representations.rb

Overview

This is a data encryption key (DEK) (as opposed to a key encryption key (KEK) stored by KMS). When using KMS to wrap/unwrap DEKs, be sure to set an appropriate IAM policy on the KMS CryptoKey (KEK) to ensure an attacker cannot unwrap the data crypto key.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ GooglePrivacyDlpV2CryptoKey

Returns a new instance of GooglePrivacyDlpV2CryptoKey



1217
1218
1219
# File 'generated/google/apis/dlp_v2/classes.rb', line 1217

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#kms_wrappedGoogle::Apis::DlpV2::GooglePrivacyDlpV2KmsWrappedCryptoKey

Include to use an existing data crypto key wrapped by KMS. Authorization requires the following IAM permissions when sending a request to perform a crypto transformation using a kms-wrapped crypto key: dlp.kms.encrypt Corresponds to the JSON property kmsWrapped



1203
1204
1205
# File 'generated/google/apis/dlp_v2/classes.rb', line 1203

def kms_wrapped
  @kms_wrapped
end

#transientGoogle::Apis::DlpV2::GooglePrivacyDlpV2TransientCryptoKey

Use this to have a random data crypto key generated. It will be discarded after the request finishes. Corresponds to the JSON property transient



1209
1210
1211
# File 'generated/google/apis/dlp_v2/classes.rb', line 1209

def transient
  @transient
end

#unwrappedGoogle::Apis::DlpV2::GooglePrivacyDlpV2UnwrappedCryptoKey

Using raw keys is prone to security risks due to accidentally leaking the key. Choose another type of key if possible. Corresponds to the JSON property unwrapped



1215
1216
1217
# File 'generated/google/apis/dlp_v2/classes.rb', line 1215

def unwrapped
  @unwrapped
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1222
1223
1224
1225
1226
# File 'generated/google/apis/dlp_v2/classes.rb', line 1222

def update!(**args)
  @kms_wrapped = args[:kms_wrapped] if args.key?(:kms_wrapped)
  @transient = args[:transient] if args.key?(:transient)
  @unwrapped = args[:unwrapped] if args.key?(:unwrapped)
end