Book Image

Google Cloud Platform Cookbook

By : Legorie Rajan PS
Book Image

Google Cloud Platform Cookbook

By: Legorie Rajan PS

Overview of this book

Google Cloud Platform is a cloud computing platform that offers products and services to host applications using state-of-the art infrastructure and technology. You can build and host applications and websites, store data, and analyze data on Google's scalable infrastructure. This book follows a recipe-based approach, giving you hands-on experience to make the most of Google Cloud services. This book starts with practical recipes that explain how to utilize Google Cloud's common services. Then, you'll see how to make full use of Google Cloud components such as networking, security, management, and developer tools. Next, we'll deep dive into implementing core Google Cloud services into your organization, with practical recipes on App Engine, Compute Engine, Cloud Functions, virtual networks, and Cloud Storage. Later, we'll provide recipes on implementing authentication and security, Cloud APIs, command-line management, deployment management, and the Cloud SDK. Finally, we'll cover administration and troubleshooting tasks on applications with Compute services and we'll show how to monitor your organization's efficiency with best practices. By the end of this book, you'll have an overall understanding and hands-on implementation of Google Cloud services in your organization with ease.
Table of Contents (14 chapters)
Title Page
Dedication
Packt Upsell
Contributors
Preface
Index

Automatic recon and defense


"Automating security" has been a buzzphrase in the world of information security since the dawn of Cloud. It refers to a wide range of products which provide security by monitoring logs and bringing intelligence into processing. The Google Cloud APIs provide us with a plethora of options to monitor and take actions programmatically against events. For this recipe, let us suppose that someone has compromised our programmatic access to GCP and has started launching unauthorized instances in our project. We'll need a way to identify such incidents and take defensive action against such events. We'll make some assumptions as follows:

  • Regular users of the account are allowed only to create g1-small and n1-standard machines
  • The controls on user access for the above are set using IAM, which are not covered as part of this recipe
  • The authority under which the Python program will run is not compromised; that is, the authority exists on a different security plane than that...