menu
arrow_back

Share Data Securely via a REST API Using Cloud Run

Share Data Securely via a REST API Using Cloud Run

1시간 크레딧 5개

GSP645

Google Cloud Self-Paced Labs

image

Overview

For the labs in the GCP Serverless Workshop: Pet Theory Quest, you will read through a fictitious business scenario and assist the characters with their serverless migration plan.

Twelve years ago, Lily started the Pet Theory chain of veterinary clinics. As the chain of clinics has grown, Lily spends more time on the phone with insurance companies than treating pets. If only the insurance companies could see the information they need online!

In this lab, you'll help Ruby and Patrick give insurance companies access to customer data without exposing Personal Identifiable Information (PII). You will build a secure Representational State Transfer (REST) API gateway using Cloud Run—a serverless GCP service. This will allow insurance companies to see the total cost of treatments without seeing customers' PII.

Architecture

This diagram gives you an overview of the services you will be using and how they connect to one another:

arch.png

What you will learn

In this lab, you will learn how to:

  • Build a simple REST API with Docker and Google Container Registry.
  • Call your API and test the endpoint in your browser.
  • Import customer data into Firestore.
  • Connect your REST API to your Firestore database.
  • Add authentication procedures to your API to secure customers' data.
  • Add a web page that lets users sign in and call the REST API.
  • Explore Firebase's real time updates in your web app.

Prerequisites

This is a fundamental level lab. This assumes familiarity with the GCP Console and shell environments. Experience with Firebase will be helpful, but it is not required. Taking the previous labs could be helpful, but is not necessary:

You should also be comfortable editing files. You can use your favorite text editor (like nano, vi, etc.) or you can launch the code editor from Cloud Shell, which can be found in the top ribbon:

ba731110a97f468f.png

Once you're ready, scroll down and follow the steps below to setup your lab environment.

이 실습의 나머지 부분과 기타 사항에 대해 알아보려면 Qwiklabs에 가입하세요.

  • Google Cloud Console에 대한 임시 액세스 권한을 얻습니다.
  • 초급부터 고급 수준까지 200여 개의 실습이 준비되어 있습니다.
  • 자신의 학습 속도에 맞춰 학습할 수 있도록 적은 분량으로 나누어져 있습니다.
이 실습을 시작하려면 가입하세요
점수

—/100

Build a REST API with Google Container Registry and Cloud Run

단계 진행

/ 10

Create a new GCS bucket with name as <PROJECT_ID>-customer

단계 진행

/ 10

Import customer data into Firestore Database

단계 진행

/ 10

Connect the REST API to the Firestore database

단계 진행

/ 10

Create an OAuth consent screen for your app

단계 진행

/ 10

Create OAuth client ID

단계 진행

/ 10

Create a new GCS bucket with name as <PROJECT_ID>-public

단계 진행

/ 10

Copy website directory content into <PROJECT_ID>-public bucket

단계 진행

/ 10

Add an authentication check to the REST API code

단계 진행

/ 20