0
0
GCPcloud~20 mins

Cloud KMS for key management in GCP - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Cloud KMS Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
service_behavior
intermediate
2:00remaining
What happens when you disable a CryptoKey in Cloud KMS?

You have a CryptoKey in Google Cloud KMS. You disable it. What is the effect on encryption and decryption operations?

AEncryption and decryption both stop working immediately for that key.
BBoth encryption and decryption continue to work until the key is destroyed.
CEncryption stops but decryption still works for existing ciphertexts.
DDecryption stops but encryption still works for new data.
Attempts:
2 left
💡 Hint

Think about how disabling a key affects new and existing data.

Architecture
intermediate
2:00remaining
Which Cloud KMS resource hierarchy is correct for managing keys securely?

Arrange the Cloud KMS resources from broadest to most specific for organizing keys securely.

A2, 1, 3, 4
B3, 1, 2, 4
C2, 3, 1, 4
D1, 2, 3, 4
Attempts:
2 left
💡 Hint

Think about how projects contain key rings and key rings contain keys.

security
advanced
2:00remaining
What is the effect of setting an IAM policy to deny 'cloudkms.cryptoKeyVersions.useToEncrypt' permission on a user?

You set an IAM policy that denies the 'cloudkms.cryptoKeyVersions.useToEncrypt' permission for a user on a CryptoKey. What will happen when the user tries to encrypt data?

AThe user cannot encrypt data but can decrypt existing ciphertexts.
BThe user can neither encrypt nor decrypt data.
CThe user can encrypt data but cannot decrypt it.
DThe user can encrypt and decrypt data as usual.
Attempts:
2 left
💡 Hint

Consider what the specific permission controls.

Configuration
advanced
2:00remaining
What is the output of this gcloud command to create a new CryptoKey with automatic rotation every 30 days?

Consider the following command:

gcloud kms keys create my-key --location=us-central1 --keyring=my-ring --purpose=encryption --rotation-period=2592000s --next-rotation-time=2024-07-01T00:00:00Z

What will be the rotation behavior of this key?

AThe key will rotate once after 30 days from creation and then stop rotating.
BThe key will not rotate automatically because next-rotation-time is in the past.
CThe command will fail because rotation-period must be specified in days, not seconds.
DThe key will rotate automatically every 30 days starting from 2024-07-01T00:00:00Z.
Attempts:
2 left
💡 Hint

Check the format and meaning of rotation-period and next-rotation-time.

Best Practice
expert
2:00remaining
Which approach best ensures minimal exposure of plaintext keys in Cloud KMS usage?

You want to minimize the risk of exposing plaintext encryption keys in your application using Cloud KMS. Which approach is best?

AStore the plaintext key in your application and use Cloud KMS only to encrypt/decrypt data directly.
BUse Cloud KMS to generate and store keys, and perform all encryption and decryption operations inside Cloud KMS without exporting keys.
CExport the plaintext key from Cloud KMS and store it encrypted in your application for faster access.
DUse Cloud KMS only to encrypt the keys and perform encryption/decryption with plaintext keys in your app.
Attempts:
2 left
💡 Hint

Think about where the plaintext keys should reside to reduce risk.