Skip to Content
Google Cloud Platform Cookbook
book

Google Cloud Platform Cookbook

by Legorie Rajan PS
April 2018
Intermediate to advanced content levelIntermediate to advanced
280 pages
6h 18m
English
Packt Publishing
Content preview from Google Cloud Platform Cookbook

How to do it...

This recipe will be of two parts. The first part is to set up the Cloud KMS key, which will be part of a keyring. Then, we'll use the generated key to encrypt and decrypt our secret data. For the secret data, let us take a sensitive financial data for a credit card: 1234 4321 2342 9084 and save it to a text file. We'll use the key generated to encrypt the file and push the encrypted file to be stored on a public data store, for this we'll use a Google Storage bucket. Later, we can pull the encrypted file and use the KMS key to decrypt the data:

  1. First, let us create a keyring called fin-keyring:
gcloud kms keyrings create fin-keyring --location global
  1. With the fin-keyring, create a key named fin-encrypt-key:
gcloud kms ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Google Compute Engine

Google Compute Engine

Marc Cohen, Kathryn Hurley, Paul Newson
Mastering Google App Engine

Mastering Google App Engine

Mohsin Shafique Hijazee
Google Cloud Platform Administration

Google Cloud Platform Administration

Ranjit Singh Thakurratan
Google Cloud Cookbook

Google Cloud Cookbook

Rui Santos Costa, Drew Hodun

Publisher Resources

ISBN: 9781788291996Supplemental Content