0
0
GCPcloud~10 mins

Cloud KMS for key management in GCP - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a new key ring in Cloud KMS.

GCP
gcloud kms keyrings create [1] --location=us-central1
Drag options to blanks, or click blank then click option'
Amy-keyring
Bcreate-keyring
Ckeyring-create
Dnew-keyring
Attempts:
3 left
💡 Hint
Common Mistakes
Using command-like names instead of a simple key ring name.
Omitting the location parameter.
2fill in blank
medium

Complete the code to create a new symmetric encryption key in the key ring.

GCP
gcloud kms keys create [1] --location=us-central1 --keyring=my-keyring --purpose=encryption
Drag options to blanks, or click blank then click option'
Amy-symmetric-key
Bsymmetric-create
Ckey-encrypt
Dencrypt-key
Attempts:
3 left
💡 Hint
Common Mistakes
Using verbs or commands as key names.
Not specifying the purpose correctly.
3fill in blank
hard

Fix the error in the command to encrypt data using the key.

GCP
echo 'Hello World' | gcloud kms encrypt --location=us-central1 --keyring=my-keyring --key=[1] --plaintext-file=- --ciphertext-file=encrypted.txt
Drag options to blanks, or click blank then click option'
Amy-keyring
Bencrypt-key
Cmy-symmetric-key
Dus-central1
Attempts:
3 left
💡 Hint
Common Mistakes
Using the key ring name instead of the key name.
Using the location instead of the key name.
4fill in blank
hard

Fill both blanks to decrypt the ciphertext file and output the plaintext.

GCP
gcloud kms decrypt --location=us-central1 --keyring=[1] --key=[2] --ciphertext-file=encrypted.txt --plaintext-file=decrypted.txt
Drag options to blanks, or click blank then click option'
Amy-keyring
Bmy-symmetric-key
Cencrypt-key
Ddecrypt-key
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping key ring and key names.
Using incorrect key names.
5fill in blank
hard

Fill all three blanks to list all keys in a key ring with their purpose.

GCP
gcloud kms keys list --location=[1] --keyring=[2] --format='table(name, [3])'
Drag options to blanks, or click blank then click option'
Aus-central1
Bmy-keyring
Cpurpose
DcreationTime
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong location or key ring names.
Choosing a wrong field in the format option.