Skip to content

Associate Data Practitioner · Domain 4: Data Management · 25% of the exam

Task 4.4: Apply security measures and ensure compliance with data privacy regulations.

When to use customer-managed, customer-supplied or Google-managed encryption keys, what Cloud KMS does, and encryption in transit versus at rest.

Study it

Sample questions

Try each one before opening the answer. Every option is explained, with the Google Cloud documentation page that proves it.

Question 1 · choose 1

A bucket has held 2 million objects for a year without any customer-managed key. To meet a new policy, the team set a Cloud KMS key as the bucket's default key and granted the Cloud Storage service agent access to it. An auditor then finds that the older objects are still not protected by the customer-managed key. What must the team do so that every object uses it?

  1. AWait up to 24 hours for Cloud Storage to re-encrypt the existing objects in the background
  2. BRotate the Cloud KMS key, so that a new key version re-encrypts the objects
  3. CRewrite each existing object with the key, for example with gcloud storage objects update
  4. DFully restrict standard encryption in the bucket's encryption enforcement settings
Show the answer and why
  • AWait up to 24 hours for Cloud Storage to re-encrypt the existing objects in the background

    Incorrect

    A bucket's default key applies to objects added to the bucket, and to objects rewritten with it; nothing re-encrypts existing objects in the background.

  • BRotate the Cloud KMS key, so that a new key version re-encrypts the objects

    Incorrect

    Rotation adds a key version for new encryption; existing objects stay as they are, and earlier versions are kept so that their data can still be decrypted.

  • CRewrite each existing object with the key, for example with gcloud storage objects update

    Correct

    Setting a default key changes how new objects are encrypted; existing objects take the key only when they are rewritten, which the gcloud storage objects update command does when it sets an encryption key.

  • DFully restrict standard encryption in the bucket's encryption enforcement settings

    Incorrect

    Encryption enforcement controls which encryption types new objects may use when they are uploaded, copied or composed; objects that already exist keep the encryption they have.

With CMEK on Cloud Storage, the bucket's default key encrypts new objects and any object rewritten with the key. Objects written before the default key was set keep their previous encryption until they are rewritten, for example with gcloud storage objects update and an encryption key. Bucket encryption enforcement and key rotation both act on new encryption only.

Question 2 · choose 1

A Cloud SQL for MySQL instance was created two years ago without a customer-managed key. A new rule requires the database to run on an instance protected by a customer-managed key from Cloud KMS in the same region, and the team wants to reuse the data it already has rather than rebuild it by hand. What should the team do?

  1. ACreate a new instance that uses the key, and import into it the data exported from the old instance
  2. BSelect the key in the existing instance's encryption settings, then restore its latest backup onto it
  3. CCreate a read replica in the same region with the key, then promote the replica
  4. DClone the existing instance and select the key for the clone
Show the answer and why
  • ACreate a new instance that uses the key, and import into it the data exported from the old instance

    Correct

    CMEK is configured when an instance is created, and data exported from an instance can be imported into a new CMEK-enabled instance, where it is protected by the new key.

  • BSelect the key in the existing instance's encryption settings, then restore its latest backup onto it

    Incorrect

    You can't enable customer-managed encryption keys on an existing Cloud SQL instance, so there is no key setting to select before the restore.

  • CCreate a read replica in the same region with the key, then promote the replica

    Incorrect

    A replica in the same region inherits the encryption of its parent instance, so it would also be without the customer-managed key.

  • DClone the existing instance and select the key for the clone

    Incorrect

    You can't assign a different key to a clone, so it keeps the encryption of its source instance.

For Cloud SQL, customer-managed encryption keys are set when an instance is created; after that, the encryption key type can't be switched between a Google-managed key and a Cloud KMS key. Same-region replicas and clones inherit the source's encryption. To move existing data onto a CMEK-enabled instance, the data is exported to Cloud Storage and imported into a new instance created with the key; to keep the exported data under a customer-managed key as well, the bucket needs a customer-managed key before the export.

Question 3 · choose 1

A reviewer asks how query results are protected while a Python script in the office calls the BigQuery API over HTTPS, as opposed to how the tables are protected while stored. The dataset uses a customer-managed key. Which statement is accurate?

  1. AThe dataset's customer-managed key also encrypts the results on their way to the script
  2. BThe request and results are protected in transit only if the team configures IPsec to Google
  3. CThe request travels over TLS that the Google Front End terminates, which is encryption in transit
  4. DThe data is protected by ALTS between the script and BigQuery, the same as for internal service traffic
Show the answer and why
  • AThe dataset's customer-managed key also encrypts the results on their way to the script

    Incorrect

    CMEK controls the keys for data at rest in the dataset; it is not the mechanism that protects data travelling to a client.

  • BThe request and results are protected in transit only if the team configures IPsec to Google

    Incorrect

    IPsec is an optional extra protection that you can add; requests to Google Cloud services over HTTPS are already secured with TLS.

  • CThe request travels over TLS that the Google Front End terminates, which is encryption in transit

    Correct

    Google Cloud services accept requests through the Google Front End, and requests sent over HTTPS are secured with TLS; that is encryption in transit, separate from the CMEK that protects the stored tables.

  • DThe data is protected by ALTS between the script and BigQuery, the same as for internal service traffic

    Incorrect

    ALTS is used inside Google's infrastructure; a client on the internet talks to Google Cloud services over TLS through the Google Front End.

Encryption at rest protects stored data, here under the dataset's customer-managed key. Encryption in transit protects data that moves: client requests to Google Cloud services over HTTPS are secured with TLS at the Google Front End, and further options such as IPsec or managed TLS certificates can be added.

Question 4 · choose 1

A team is creating its first customer-managed keys in Cloud KMS to protect analytics data. It has no regulatory requirement for a particular FIPS validation level or for keeping keys outside Google, and it wants the lowest key cost. Which protection level should it choose?

  1. AHSM
  2. BSOFTWARE
  3. CEXTERNAL
  4. DEXTERNAL_VPC
Show the answer and why
  • AHSM

    Incorrect

    HSM keys are generated and used in FIPS 140-2 Level 3 validated hardware security modules, which suits regulatory needs the team does not have, at a higher cost per key version.

  • BSOFTWARE

    Correct

    Software keys use FIPS 140-3 Level 1 validated primitives and are a good choice when there is no specific regulatory requirement for a higher validation level; they are the lowest-cost protection level.

  • CEXTERNAL

    Incorrect

    External protection levels keep key material in a key manager outside Google, which the team does not need.

  • DEXTERNAL_VPC

    Incorrect

    This external option reaches an outside key manager over a VPC network; it is for keeping keys outside Google, which is not required here.

Cloud KMS protection levels set where key material lives and how it is validated: SOFTWARE (FIPS 140-3 Level 1 primitives), HSM (FIPS 140-2 Level 3 hardware) and external options for keys held in an outside key manager. The cost of active key versions depends on the protection level.

Question 5 · choose 1

A research group must make sure that Google never has any possible access to the unencrypted content of certain files it stores in Cloud Storage, and it accepts doing all key management and encryption work itself. Which encryption option does Cloud Storage describe for this?

  1. ACustomer-managed encryption keys in Cloud KMS
  2. BThe bucket's standard server-side encryption
  3. CClient-side encryption before upload
  4. DA retention policy with Bucket Lock
Show the answer and why
  • ACustomer-managed encryption keys in Cloud KMS

    Incorrect

    With CMEK, the service encrypts the data with keys you manage in Cloud KMS, so Cloud Storage handles unencrypted data during server-side encryption.

  • BThe bucket's standard server-side encryption

    Incorrect

    Standard encryption happens after Cloud Storage receives the data, with keys that Google manages.

  • CClient-side encryption before upload

    Correct

    Client-side encryption encrypts the data before it is sent, so it arrives already encrypted; Cloud Storage describes it as the option for maximum secrecy, with the full key management burden on you.

  • DA retention policy with Bucket Lock

    Incorrect

    A locked retention policy prevents deletion; it does not encrypt anything.

Cloud Storage compares standard (Google-managed) server-side encryption, CMEK, customer-supplied keys and client-side encryption. Only client-side encryption keeps unencrypted data from ever reaching Google, at the cost of managing keys and encryption yourself.

Question 6 · choose 1

A team encrypted some Cloud Storage objects with customer-supplied encryption keys and has now lost one of those keys. What is the consequence for the objects it protected?

  1. AThey can no longer be read, and storage charges continue until they are deleted
  2. BGoogle support can recover the key from the hash that Cloud Storage keeps
  3. CThey fall back to Google-managed keys and stay readable as before
  4. DCloud KMS can restore the key from its earlier key versions
Show the answer and why
  • AThey can no longer be read, and storage charges continue until they are deleted

    Correct

    Cloud Storage warns that if you lose customer-supplied keys you can no longer read the data, and you keep paying for its storage until you delete it.

  • BGoogle support can recover the key from the hash that Cloud Storage keeps

    Incorrect

    Cloud Storage keeps only a cryptographic hash of the key, which cannot be used to recover the key or decrypt the data.

  • CThey fall back to Google-managed keys and stay readable as before

    Incorrect

    There is no fallback; reading the objects requires the key that encrypted them.

  • DCloud KMS can restore the key from its earlier key versions

    Incorrect

    Customer-supplied keys are not stored or managed in Cloud KMS, so there are no key versions to restore.

With customer-supplied keys, you manage the keys outside Google, and Cloud Storage does not keep them. Losing a key makes the objects it encrypted unreadable while their storage is still billed, so keys must be backed up securely.

Question 7 · choose 1

A hospital will send patient imaging archives to Google on a Transfer Appliance by courier. Its auditor asks what keeps the data unreadable if the appliance is lost or stolen on the road, before it reaches Google, and wants the hospital to control the keys. What protects the data in that situation?

  1. ATLS encryption in transit, which protects the data on its way to Google
  2. BEncryption that Google applies once the data is uploaded to a bucket
  3. CThe tamper-evident tags on the appliance's shipping case
  4. DAES 256 encryption on the device, with keys it manages in Cloud KMS
Show the answer and why
  • ATLS encryption in transit, which protects the data on its way to Google

    Incorrect

    Encryption in transit protects data if network communications are intercepted; an appliance on a truck holds stored data, which is protected by encrypting what is written to the device.

  • BEncryption that Google applies once the data is uploaded to a bucket

    Incorrect

    Transfer Appliance encrypts the data on the device before it is shipped; it does not travel unencrypted until the upload.

  • CThe tamper-evident tags on the appliance's shipping case

    Incorrect

    The tags let the hospital inspect the case's integrity before opening it; they do not make the data on a lost device unreadable.

  • DAES 256 encryption on the device, with keys it manages in Cloud KMS

    Correct

    Transfer Appliance encrypts data with AES 256 and uses encryption keys that the customer manages in Cloud KMS, so the data stays protected during and after transit and the hospital controls it before shipping.

Encryption in transit protects data moving over networks, between a site and Google or between services. Data stored on a device, even one being shipped, is protected by encryption at rest: Transfer Appliance encrypts the copied data with AES 256 under customer-managed Cloud KMS keys and adds a tamper-resistant case, tamper-evident tags and hardware attestation.

Question 8 · choose 1

Objects in a bucket are encrypted with a customer-managed key. A developer proposes naming each object after the patient it describes, arguing that CMEK protects everything about the object. Why does Google advise against this?

  1. ACMEK keys cannot encrypt objects whose names contain personal data
  2. BNames longer than 64 characters disable CMEK for the object
  3. CObject names and most metadata use standard server-side keys and stay readable even if the key is disabled
  4. DPersonal data in names makes the bucket public by default
Show the answer and why
  • ACMEK keys cannot encrypt objects whose names contain personal data

    Incorrect

    Object names do not affect whether a key can encrypt the object's data.

  • BNames longer than 64 characters disable CMEK for the object

    Incorrect

    Name length has nothing to do with which key encrypts an object.

  • CObject names and most metadata use standard server-side keys and stay readable even if the key is disabled

    Correct

    CMEK covers the object's data and a few fields, while the object name and most other metadata are encrypted with standard server-side keys, so sensitive information should not go in names or metadata.

  • DPersonal data in names makes the bucket public by default

    Incorrect

    Object names do not change a bucket's access settings.

With CMEK, Cloud Storage encrypts the object's data, CRC32C checksum and MD5 hash with your key; the remaining metadata, including the object's name, uses standard server-side keys. Users with permission can list and read most metadata even after the key is disabled or destroyed.

Question 9 · choose 1

A Cloud SQL instance in europe-west1 uses a customer-managed key from a key ring in europe-west1. The team adds a read replica in us-east1 for disaster recovery. Which key does the replica use?

  1. AThe same europe-west1 key, inherited from the primary
  2. BNo customer-managed key, because replicas always use Google's keys
  3. CAny key from any region, chosen after the replica is created
  4. DA customer-managed key from us-east1, selected when it is created
Show the answer and why
  • AThe same europe-west1 key, inherited from the primary

    Incorrect

    Only replicas in the same region inherit the parent's key; each region uses its own set of keys.

  • BNo customer-managed key, because replicas always use Google's keys

    Incorrect

    Replicas of a CMEK-enabled instance are protected with a customer-managed key too.

  • CAny key from any region, chosen after the replica is created

    Incorrect

    The key is chosen when the replica is created and must belong to the replica's region.

  • DA customer-managed key from us-east1, selected when it is created

    Correct

    For a read or failover replica in a different region, you must select a CMEK from that other region, because each region uses its own set of keys.

Cloud SQL ties CMEK to regions. Same-region replicas and clones inherit the parent's key, while a replica in another region needs a key from its own region, chosen at creation.

Practice domain 4 →Practice all domains →