Google Professional Cloud デベロッパーのセキュリティとアイデンティティGoogle Professional Cloud Developer Security and Identity

IAM、サービス アカウント、認証、シークレット、IAP、OAuth、Identity Platform、KMS、およびアプリケーション側のアクセス制御の決定に使用します。Use for IAM, service accounts, authentication, secrets, IAP, OAuth, Identity Platform, KMS, and application-facing access control decisions.

試験Exams
PROFESSIONAL-CLOUD-DEVELOPER
問題数Questions
32
コメント数Comments
225
1 32

表示中 32 / 32 問

1. PROFESSIONAL-CLOUD-DEVELOPER トピック 1 問題 271. PROFESSIONAL-CLOUD-DEVELOPER Topic 1 Question 27

問題Question

Compute Engine インスタンスで実行され、任意のユーザーの Google ドライブにファイルを書き込むウェブ アプリケーションを作成しています。 Google Drive APIに対して認証するようにアプリケーションを設定する必要があります。どうすればいいでしょうか?

  • A. https://www.googleapis.com/auth/drive.file スコープを使用する OAuth クライアント ID を使用して、各ユーザーのアクセス トークンを取得します。
  • B. ドメイン全体の権限を委任された OAuth クライアント ID を使用します。
  • C. App Engine サービス アカウントと https://www.googleapis.com/auth/drive.file スコープを使用して、署名付き JSON Web トークン (JWT) を生成します。
  • D. ドメイン全体の権限が委任された App Engine サービス アカウントを使用します。

You are creating a web application that runs in a Compute Engine instance and writes a file to any user's Google Drive. You need to configure the application to authenticate to the Google Drive API. What should you do?

  • A. Use an OAuth Client ID that uses the https://www.googleapis.com/auth/drive.file scope to obtain an access token for each user.
  • B. Use an OAuth Client ID with delegated domain-wide authority.
  • C. Use the App Engine service account and https://www.googleapis.com/auth/drive.file scope to generate a signed JSON Web Token (JWT).
  • D. Use the App Engine service account with delegated domain-wide authority.

2. PROFESSIONAL-CLOUD-DEVELOPER トピック 1 問題 422. PROFESSIONAL-CLOUD-DEVELOPER Topic 1 Question 42

問題Question

コードはプロジェクト A の Cloud Functions で実行されています。プロジェクト B が所有する Cloud Storage バケットにオブジェクトを書き込むことになっています。しかし、書き込み呼び出しは「403 Forbidden」エラーで失敗します。
問題を解決するにはどうすればよいでしょうか?

  • A. ユーザー アカウントに Cloud Storage バケットのロール /storage.objectCreator ロールを付与します。
  • B. ユーザー アカウントに、 [メール 保護されています] サービスアカウント。
  • C. を付与します。 [メール 保護されています] サービス アカウントは、Cloud Storage バケットのロール/storage.objectCreator ロールです。
  • D. プロジェクト B で Cloud Storage API を有効にします。

Your code is running on Cloud Functions in project A. It is supposed to write an object in a Cloud Storage bucket owned by project B. However, the write call is failing with the error "403 Forbidden".
What should you do to correct the problem?

  • A. Grant your user account the roles/storage.objectCreator role for the Cloud Storage bucket.
  • B. Grant your user account the roles/iam.serviceAccountUser role for the [email protected] service account.
  • C. Grant the [email protected] service account the roles/storage.objectCreator role for the Cloud Storage bucket.
  • D. Enable the Cloud Storage API in project B.

3. PROFESSIONAL-CLOUD-DEVELOPER トピック 1 問題 653. PROFESSIONAL-CLOUD-DEVELOPER Topic 1 Question 65

問題Question

分析システムは、BigQuery データセットに対してクエリを実行します。 SQL クエリはバッチで実行され、SQL ファイルの内容を BigQuery に渡します。
CLI。次に、BigQuery CLI 出力を別のプロセスにリダイレクトします。ただし、クエリの実行時に BigQuery CLI から権限エラーが発生します。
あなたは問題を解決したいと考えています。どうすればいいでしょうか?

  • A. サービス アカウントに BigQuery データ閲覧者ロールと BigQuery ジョブ ユーザー ロールを付与します。
  • B. サービス アカウントに BigQuery データ編集者ロールと BigQuery データ閲覧者ロールを付与します。
  • C. BigQuery で SQL クエリからビューを作成し、CLI のビューから SELECT* を作成します。
  • D. BigQuery で新しいデータセットを作成し、ソース テーブルを新しいデータセットにコピーします。 CLI から新しいデータセットとテーブルをクエリします。

Your analytics system executes queries against a BigQuery dataset. The SQL query is executed in batch and passes the contents of a SQL file to the BigQuery
CLI. Then it redirects the BigQuery CLI output to another process. However, you are getting a permission error from the BigQuery CLI when the queries are executed.
You want to resolve the issue. What should you do?

  • A. Grant the service account BigQuery Data Viewer and BigQuery Job User roles.
  • B. Grant the service account BigQuery Data Editor and BigQuery Data Viewer roles.
  • C. Create a view in BigQuery from the SQL query and SELECT* from the view in the CLI.
  • D. Create a new dataset in BigQuery, and copy the source table to the new dataset Query the new dataset and table from the CLI.

4. PROFESSIONAL-CLOUD-DEVELOPER トピック 1 問題 694. PROFESSIONAL-CLOUD-DEVELOPER Topic 1 Question 69

問題Question

アプリケーションでは、ホストの Compute Engine 仮想マシン インスタンスに保存されている認証情報を介して、サービス アカウントが GCP 製品に対して認証される必要があります。これらの資格情報をできるだけ安全にホスト インスタンスに配布したいと考えています。
どうすればいいでしょうか?

  • A. HTTP 署名付き URL を使用して、必要なリソースへのアクセスを安全に提供します。
  • B. インスタンスのサービス アカウントのアプリケーションのデフォルト認証情報を使用して、必要なリソースに対する認証を行います。
  • C. インスタンスのデプロイ後に GCP Console から P12 ファイルを生成し、アプリケーションを開始する前に認証情報をホスト インスタンスにコピーします。
  • D. 認証情報 JSON ファイルをアプリケーションのソース リポジトリにコミットし、CI/CD プロセスでそれをインスタンスにデプロイされるソフトウェアとともにパッケージ化します。

Your application requires service accounts to be authenticated to GCP products via credentials stored on its host Compute Engine virtual machine instances. You want to distribute these credentials to the host instances as securely as possible.
What should you do?

  • A. Use HTTP signed URLs to securely provide access to the required resources.
  • B. Use the instance's service account Application Default Credentials to authenticate to the required resources.
  • C. Generate a P12 file from the GCP Console after the instance is deployed, and copy the credentials to the host instance before starting the application.
  • D. Commit the credential JSON file into your application's source repository, and have your CI/CD process package it with the software that is deployed to the instance.

5. PROFESSIONAL-CLOUD-DEVELOPER トピック 1 問題 775. PROFESSIONAL-CLOUD-DEVELOPER Topic 1 Question 77

問題Question

あなたは、プロジェクト B の Cloud Pub/Sub トピックに対して安全に認証する必要がある、プロジェクト A で Compute Engine でホストされるアプリケーションを作成しています。
どうすればいいでしょうか?

  • A. プロジェクト B が所有するサービス アカウントを使用してインスタンスを構成します。サービス アカウントを Cloud Pub/Sub パブリッシャーとしてプロジェクト A に追加します。
  • B. プロジェクト A が所有するサービス アカウントを使用してインスタンスを構成します。サービス アカウントをトピックのパブリッシャーとして追加します。
  • C. プロジェクト B が所有するサービス アカウントの秘密キーを使用するようにアプリケーションのデフォルト認証情報を構成します。サービス アカウントを Cloud Pub/Sub パブリッシャーとしてプロジェクト A に追加します。
  • D. プロジェクト A が所有するサービス アカウントの秘密キーを使用するようにアプリケーションのデフォルト資格情報を構成します。 トピックのパブリッシャーとしてサービス アカウントを追加します。

You are writing a Compute Engine hosted application in project A that needs to securely authenticate to a Cloud Pub/Sub topic in project B.
What should you do?

  • A. Configure the instances with a service account owned by project B. Add the service account as a Cloud Pub/Sub publisher to project A.
  • B. Configure the instances with a service account owned by project A. Add the service account as a publisher on the topic.
  • C. Configure Application Default Credentials to use the private key of a service account owned by project B. Add the service account as a Cloud Pub/Sub publisher to project A.
  • D. Configure Application Default Credentials to use the private key of a service account owned by project A. Add the service account as a publisher on the topic

6. PROFESSIONAL-CLOUD-DEVELOPER トピック 1 問題 966. PROFESSIONAL-CLOUD-DEVELOPER Topic 1 Question 96

問題Question

他の Google Cloud リソースにアクセスする Cloud Function を作成しました。最小特権の原則を使用して環境を保護したいと考えています。どうすればいいでしょうか?

  • A. リソースにアクセスするための編集者権限を持つ新しいサービス アカウントを作成します。デプロイヤには、アクセス トークンを取得する権限が与えられます。
  • B. リソースにアクセスするためのカスタム IAM ロールを持つ新しいサービス アカウントを作成します。デプロイヤには、アクセス トークンを取得する権限が与えられます。
  • C. リソースにアクセスするための編集者権限を持つ新しいサービス アカウントを作成します。デプロイ担当者には、新しいサービス アカウントとして機能する権限が与えられます。
  • D. リソースにアクセスするためのカスタム IAM ロールを持つ新しいサービス アカウントを作成します。デプロイ担当者には、新しいサービス アカウントとして機能する権限が与えられます。

You have written a Cloud Function that accesses other Google Cloud resources. You want to secure the environment using the principle of least privilege. What should you do?

  • A. Create a new service account that has Editor authority to access the resources. The deployer is given permission to get the access token.
  • B. Create a new service account that has a custom IAM role to access the resources. The deployer is given permission to get the access token.
  • C. Create a new service account that has Editor authority to access the resources. The deployer is given permission to act as the new service account.
  • D. Create a new service account that has a custom IAM role to access the resources. The deployer is given permission to act as the new service account.

7. PROFESSIONAL-CLOUD-DEVELOPER トピック 1 問題 1047. PROFESSIONAL-CLOUD-DEVELOPER Topic 1 Question 104

問題Question

あなたは、Google Kubernetes Engine クラスターにデプロイされるマイクロサービス ベースのアプリケーションを開発しています。アプリケーションは、
スパナのデータベース。コードの変更を最小限に抑えながら、セキュリティのベスト プラクティスに従いたいと考えています。 Spanner 資格情報を取得するには、アプリケーションをどのように構成すればよいでしょうか?

  • A. 適切なサービス アカウントを構成し、Workload Identity を使用してポッドを実行します。
  • B. アプリケーションの資格情報を Kubernetes Secret として保存し、環境変数として公開します。
  • C. 適切なルーティング ルールを構成し、VPC ネイティブ クラスターを使用してデータベースに直接接続します。
  • D. Cloud Key Management Service を使用してアプリケーションの認証情報を保存し、データベース接続が確立されるたびに認証情報を取得します。

You are developing a microservice-based application that will be deployed on a Google Kubernetes Engine cluster. The application needs to read and write to a
Spanner database. You want to follow security best practices while minimizing code changes. How should you configure your application to retrieve Spanner credentials?

  • A. Configure the appropriate service accounts, and use Workload Identity to run the pods.
  • B. Store the application credentials as Kubernetes Secrets, and expose them as environment variables.
  • C. Configure the appropriate routing rules, and use a VPC-native cluster to directly connect to the database.
  • D. Store the application credentials using Cloud Key Management Service, and retrieve them whenever a database connection is made.

8. PROFESSIONAL-CLOUD-DEVELOPER トピック 1 問題 1268. PROFESSIONAL-CLOUD-DEVELOPER Topic 1 Question 126

問題Question

あなたのチームは、Google Cloud 上で実行されるサービスを開発しています。データ処理サービスを構築する必要があり、Cloud Functions を使用します。関数によって処理されるデータは機密です。承認されたサービスからのみ呼び出しが行われるようにし、機能を保護するために Google が推奨するベスト プラクティスに従う必要があります。どうすればいいでしょうか?

  • A. プロジェクトで Identity-Aware Proxy を有効にします。権限を使用して機能へのアクセスを保護します。
  • B. Cloud Functions 閲覧者ロールを持つサービス アカウントを作成します。そのサービス アカウントを使用して関数を呼び出します。
  • C. Cloud Functions Invoker ロールを持つサービス アカウントを作成します。そのサービス アカウントを使用して関数を呼び出します。
  • D. セキュリティを確保する関数と同じプロジェクト内で呼び出し側サービスの OAuth 2.0 クライアント ID を作成します。これらの資格情報を使用して関数を呼び出します。

Your team develops services that run on Google Cloud. You need to build a data processing service and will use Cloud Functions. The data to be processed by the function is sensitive. You need to ensure that invocations can only happen from authorized services and follow Google-recommended best practices for securing functions. What should you do?

  • A. Enable Identity-Aware Proxy in your project. Secure function access using its permissions.
  • B. Create a service account with the Cloud Functions Viewer role. Use that service account to invoke the function.
  • C. Create a service account with the Cloud Functions Invoker role. Use that service account to invoke the function.
  • D. Create an OAuth 2.0 client ID for your calling service in the same project as the function you want to secure. Use those credentials to invoke the function.

9. PROFESSIONAL-CLOUD-DEVELOPER トピック 1 問題 1349. PROFESSIONAL-CLOUD-DEVELOPER Topic 1 Question 134

問題Question

あなたは、Google ドライブの API にアクセスし、ファイルを Google ドライブに保存するための許可をユーザーから取得する必要がある JavaScript Web アプリケーションを開発しました。アプリケーションの認可アプローチを選択する必要があります。どうすればいいでしょうか?

  • A. APIキーを作成します。
  • B. SAML トークンを作成します。
  • C. サービスアカウントを作成します。
  • D. OAuth クライアント ID を作成します。

You developed a JavaScript web application that needs to access Google Drive's API and obtain permission from users to store files in their Google Drives. You need to select an authorization approach for your application. What should you do?

  • A. Create an API key.
  • B. Create a SAML token.
  • C. Create a service account.
  • D. Create an OAuth Client ID.

10. PROFESSIONAL-CLOUD-DEVELOPER トピック 1 問題 14510. PROFESSIONAL-CLOUD-DEVELOPER Topic 1 Question 145

問題Question

会社の開発チームは、ローカル環境からリソースを管理したいと考えています。各チームの Google Cloud プロジェクトへの開発者アクセスを有効にするように求められました。 Google が推奨するベスト プラクティスに従いながら、効率を最大化したいと考えています。どうすればいいでしょうか?

  • A. ユーザーをプロジェクトに追加し、関連するロールをユーザーに割り当てて、関連する各プロジェクト ID をユーザーに提供します。
  • B. ユーザーをプロジェクトに追加し、関連するロールをユーザーに割り当てて、関連する各プロジェクト番号をユーザーに提供します。
  • C. グループを作成し、そのグループにユーザーを追加し、関連するロールをグループに割り当てて、関連する各プロジェクト ID をユーザーに提供します。
  • D. グループを作成し、そのグループにユーザーを追加し、関連する役割をグループに割り当てて、関連する各プロジェクト番号をユーザーに提供します。

The development teams in your company want to manage resources from their local environments. You have been asked to enable developer access to each team’s Google Cloud projects. You want to maximize efficiency while following Google-recommended best practices. What should you do?

  • A. Add the users to their projects, assign the relevant roles to the users, and then provide the users with each relevant Project ID.
  • B. Add the users to their projects, assign the relevant roles to the users, and then provide the users with each relevant Project Number.
  • C. Create groups, add the users to their groups, assign the relevant roles to the groups, and then provide the users with each relevant Project ID.
  • D. Create groups, add the users to their groups, assign the relevant roles to the groups, and then provide the users with each relevant Project Number.

11. PROFESSIONAL-CLOUD-DEVELOPER トピック 1 問題 14811. PROFESSIONAL-CLOUD-DEVELOPER Topic 1 Question 148

問題Question

あなたは、Google Kubernetes Engine (GKE) 上で実行されるマイクロサービスベースのアプリケーションを開発しています。一部のサービスは、さまざまな Google Cloud API にアクセスする必要があります。 Google が推奨するベスト プラクティスに従って、クラスター内でこれらのサービスの認証をどのように設定する必要がありますか? (2つお選びください。)

  • A. GKE ノードにアタッチされているサービス アカウントを使用します。
  • B. gcloud コマンドライン ツールを使用して、クラスターで Workload Identity を有効にします。
  • C. シークレット管理サービスから Google サービス アカウント キーにアクセスします。
  • D. Google サービス アカウント キーを中央のシークレット管理サービスに保存します。
  • E. gcloud を使用して、roles/iam.workloadIdentity を使用して Kubernetes サービス アカウントと Google サービス アカウントをバインドします。

You are developing a microservice-based application that will run on Google Kubernetes Engine (GKE). Some of the services need to access different Google Cloud APIs. How should you set up authentication of these services in the cluster following Google-recommended best practices? (Choose two.)

  • A. Use the service account attached to the GKE node.
  • B. Enable Workload Identity in the cluster via the gcloud command-line tool.
  • C. Access the Google service account keys from a secret management service.
  • D. Store the Google service account keys in a central secret management service.
  • E. Use gcloud to bind the Kubernetes service account and the Google service account using roles/iam.workloadIdentity.

12. PROFESSIONAL-CLOUD-DEVELOPER トピック 1 問題 17312. PROFESSIONAL-CLOUD-DEVELOPER Topic 1 Question 173

問題Question

あなたの会社は、Google Cloud に保存されているすべてのデータを顧客管理の暗号鍵で暗号化することを要求する新しいセキュリティ イニシアチブを導入しています。クラウド キー管理サービス (KMS) を使用してキーへのアクセスを構成する予定です。 「職務の分離」の原則と、Google が推奨するベスト プラクティスに従う必要があります。どうすればいいでしょうか? (2つお選びください。)

  • A. 独自のプロジェクトで Cloud KMS をプロビジョニングします。
  • B. Cloud KMS プロジェクトに所有者を割り当てないでください。
  • C. 鍵が使用されているプロジェクトに Cloud KMS をプロビジョニングします。
  • D. Cloud KMS の鍵が使用されているプロジェクトのオーナーに、roles/cloudkms.admin ロールを付与します。
  • E. Cloud KMS プロジェクトのオーナー役割を、Cloud KMS の鍵が使用されているプロジェクトのオーナーとは別のユーザーに付与します。

Your company has a new security initiative that requires all data stored in Google Cloud to be encrypted by customer-managed encryption keys. You plan to use Cloud Key Management Service (KMS) to configure access to the keys. You need to follow the "separation of duties" principle and Google-recommended best practices. What should you do? (Choose two.)

  • A. Provision Cloud KMS in its own project.
  • B. Do not assign an owner to the Cloud KMS project.
  • C. Provision Cloud KMS in the project where the keys are being used.
  • D. Grant the roles/cloudkms.admin role to the owner of the project where the keys from Cloud KMS are being used.
  • E. Grant an owner role for the Cloud KMS project to a different user than the owner of the project where the keys from Cloud KMS are being used.

13. PROFESSIONAL-CLOUD-DEVELOPER トピック 1 問題 18813. PROFESSIONAL-CLOUD-DEVELOPER Topic 1 Question 188

問題Question

ケーススタディ -

これはケーススタディです。ケーススタディは個別に時間が設定されるわけではありません。各ケースを完了したいだけ試験時間を費やすことができます。ただし、この試験には追加のケーススタディやセクションが存在する場合があります。この試験に含まれるすべての質問を指定された時間内に完了できるように時間を管理する必要があります。

ケーススタディに含まれる質問に答えるには、ケーススタディで提供される情報を参照する必要があります。ケース スタディには、ケース スタディで説明されているシナリオに関する詳細情報を提供する展示やその他のリソースが含まれる場合があります。このケーススタディでは、各質問は他の質問から独立しています。

このケーススタディの最後に、レビュー画面が表示されます。この画面では、試験の次のセクションに進む前に、回答を確認し、変更を加えることができます。新しいセクションを開始した後は、このセクションに戻ることはできません。


ケーススタディを開始するには -
このケーススタディの最初の質問を表示するには、「次へ」ボタンをクリックします。質問に答える前に、左側のペインのボタンを使用してケーススタディの内容を調べてください。これらのボタンをクリックすると、ビジネス要件、既存の環境、問題の説明などの情報が表示されます。ケーススタディに [すべての情報] タブがある場合、表示される情報は後続のタブに表示される情報と同じであることに注意してください。質問に答える準備ができたら、「質問」ボタンをクリックして質問に戻ります。


会社概要 -
HipLocal は、近くにいる人々の間のコミュニケーションを促進するように設計されたコミュニティ アプリケーションです。スポーツイベントの企画や開催、企業が地域社会とつながるために利用されています。 HipLocal は最近ダラスのいくつかの地域でサービスを開始し、急速に世界的な現象に成長しています。ハイパーローカルなコミュニティコミュニケーションとビジネスアウトリーチのユニークなスタイルは、世界中で需要があります。


エグゼクティブステートメント -
私たちはナンバーワンのローカルコミュニティアプリです。地域コミュニティ サービスをグローバルに展開する時が来ました。私たちのベンチャー キャピタルの投資家は、メンバーが互いに 10 マイルまたは 10,000 マイル離れていても、急速な成長と、オンラインに登場する新しいローカル コミュニティや仮想コミュニティに同様の素晴らしい体験を提供したいと考えています。


ソリューションコンセプト -
HipLocal は、世界中の顧客により良いサービスを提供するために、最新の機能を備えた既存のサービスを新しい地域で拡張したいと考えています。彼らは、これらの地域をタイムゾーンでサポートするための新しいチームを雇用してトレーニングしたいと考えています。アプリケーションがスムーズに拡張され、明確な稼働時間データが提供されることを確認し、発生した問題を分析して対応する必要があります。


既存の技術環境 -
HipLocal の環境は、オンプレミスのハードウェアと Google Cloud Platform で実行されるインフラストラクチャが混在しています。 HipLocal チームはアプリケーションをよく理解していますが、世界規模のアプリケーションの経験は限られています。現在の技術環境は次のとおりです。
• 既存の API は、GCP でホストされている Compute Engine 仮想マシン インスタンス上で実行されます。
• 状態は、GCP の単一インスタンスの MySQL データベースに保存されます。
• リリース サイクルには、QA テストを可能にする開発の凍結が含まれます。
• アプリケーションにはログがありません。
• アプリケーションは、平日の夕方のトラフィックが少ない時間帯に、インフラストラクチャ エンジニアによって手動で展開されます。
• 稼働時間の基本的な指標があります。 API が応答しない場合、アラートが頻繁に発生します。


ビジネス要件 -
HipLocal の投資家は、その拠点を拡大し、見られる需要の増加をサポートしたいと考えています。彼らの要件は次のとおりです。
• アプリケーションの利用可能性を新しい地域に拡大します。
• 10 倍の同時ユーザーをサポートします。
• ユーザーが異なる地域に旅行する場合でも、一貫したエクスペリエンスを確保します。
• ユーザーアクティビティの指標を取得して、製品を収益化する方法をより深く理解します。
• 新しい地域の規制 (GDPR など) への準拠を確保します。
• インフラストラクチャ管理の時間とコストを削減します。
• Google が推奨するクラウド コンピューティングのプラクティスを採用します。
○ アプリケーションのライフサイクル管理に関する標準化されたワークフローとプロセスを開発します。
○ サービス レベル指標 (SLI) とサービス レベル目標 (SLO) を定義します。


技術的要件 -
• オンプレミスのデータセンターとクラウドでホストされているアプリケーションおよびインフラストラクチャの間で安全な通信を提供します。
• アプリケーションは使用状況のメトリクスと監視を提供する必要があります。
• API には認証と認可が必要です。
• 新しい機能のより迅速かつ正確な検証を実装します。
• ロギングとパフォーマンスのメトリクスは、デバッグ情報とアラートを提供できるように実用的な情報を提供する必要があります。
• ユーザーの需要に合わせて拡張する必要がある。


この質問については、HipLocal のケーススタディを参照してください。

最近のセキュリティ監査により、HipLocal の Compute Engine がホストする MySQL データベースのデータベース認証情報が永続ディスクにプレーン テキストで保存されていることが判明しました。 HipLocal は、これらの資格情報が盗まれるリスクを軽減する必要があります。彼らは何をすべきでしょうか?

  • A. サービス アカウントを作成し、そのキーをダウンロードします。キーを使用してクラウド キー管理サービス (KMS) に対して認証し、データベースの資格情報を取得します。
  • B. サービス アカウントを作成し、そのキーをダウンロードします。このキーを使用してクラウド キー管理サービス (KMS) に対する認証を行い、データベース資格情報の復号化に使用されるキーを取得します。
  • C. サービス アカウントを作成し、roles/iam.serviceAccountUser ロールを付与します。このアカウントになりすまして、Cloud SQL Proxy を使用して認証します。
  • D. ロール/secretmanager.secretAccessor ロールを Compute Engine サービス アカウントに付与します。 Secret Manager API を使用してデータベース資格情報を保存し、アクセスします。

Case study -

This is a case study. Case studies are not timed separately. You can use as much exam time as you would like to complete each case. However, there may be additional case studies and sections on this exam. You must manage your time to ensure that you are able to complete all questions included on this exam in the time provided.

To answer the questions included in a case study, you will need to reference information that is provided in the case study. Case studies might contain exhibits and other resources that provide more information about the scenario that is described in the case study. Each question is independent of the other questions in this case study.

At the end of this case study, a review screen will appear. This screen allows you to review your answers and to make changes before you move to the next section of the exam. After you begin a new section, you cannot return to this section.


To start the case study -
To display the first question in this case study, click the Next button. Use the buttons in the left pane to explore the content of the case study before you answer the questions. Clicking these buttons displays information such as business requirements, existing environment, and problem statements. If the case study has an All Information tab, note that the information displayed is identical to the information displayed on the subsequent tabs. When you are ready to answer a question, click the Question button to return to the question.


Company Overview -
HipLocal is a community application designed to facilitate communication between people in close proximity. It is used for event planning and organizing sporting events, and for businesses to connect with their local communities. HipLocal launched recently in a few neighborhoods in Dallas and is rapidly growing into a global phenomenon. Its unique style of hyper-local community communication and business outreach is in demand around the world.


Executive Statement -
We are the number one local community app; it's time to take our local community services global. Our venture capital investors want to see rapid growth and the same great experience for new local and virtual communities that come online, whether their members are 10 or 10000 miles away from each other.


Solution Concept -
HipLocal wants to expand their existing service, with updated functionality, in new regions to better serve their global customers. They want to hire and train a new team to support these regions in their time zones. They will need to ensure that the application scales smoothly and provides clear uptime data, and that they analyze and respond to any issues that occur.


Existing Technical Environment -
HipLocal's environment is a mix of on-premises hardware and infrastructure running in Google Cloud Platform. The HipLocal team understands their application well, but has limited experience in global scale applications. Their existing technical environment is as follows:
• Existing APIs run on Compute Engine virtual machine instances hosted in GCP.
• State is stored in a single instance MySQL database in GCP.
• Release cycles include development freezes to allow for QA testing.
• The application has no logging.
• Applications are manually deployed by infrastructure engineers during periods of slow traffic on weekday evenings.
• There are basic indicators of uptime; alerts are frequently fired when the APIs are unresponsive.


Business Requirements -
HipLocal's investors want to expand their footprint and support the increase in demand they are seeing. Their requirements are:
• Expand availability of the application to new regions.
• Support 10x as many concurrent users.
• Ensure a consistent experience for users when they travel to different regions.
• Obtain user activity metrics to better understand how to monetize their product.
• Ensure compliance with regulations in the new regions (for example, GDPR).
• Reduce infrastructure management time and cost.
• Adopt the Google-recommended practices for cloud computing.
○ Develop standardized workflows and processes around application lifecycle management.
○ Define service level indicators (SLIs) and service level objectives (SLOs).


Technical Requirements -
• Provide secure communications between the on-premises data center and cloud-hosted applications and infrastructure.
• The application must provide usage metrics and monitoring.
• APIs require authentication and authorization.
• Implement faster and more accurate validation of new features.
• Logging and performance metrics must provide actionable information to be able to provide debugging information and alerts.
• Must scale to meet user demand.


For this question, refer to the HipLocal case study.

A recent security audit discovers that HipLocal’s database credentials for their Compute Engine-hosted MySQL databases are stored in plain text on persistent disks. HipLocal needs to reduce the risk of these credentials being stolen. What should they do?

  • A. Create a service account and download its key. Use the key to authenticate to Cloud Key Management Service (KMS) to obtain the database credentials.
  • B. Create a service account and download its key. Use the key to authenticate to Cloud Key Management Service (KMS) to obtain a key used to decrypt the database credentials.
  • C. Create a service account and grant it the roles/iam.serviceAccountUser role. Impersonate as this account and authenticate using the Cloud SQL Proxy.
  • D. Grant the roles/secretmanager.secretAccessor role to the Compute Engine service account. Store and access the database credentials with the Secret Manager API.

14. PROFESSIONAL-CLOUD-DEVELOPER トピック 1 問題 20014. PROFESSIONAL-CLOUD-DEVELOPER Topic 1 Question 200

問題Question

Terraform を使用して、ラップトップから Google Cloud にリソースをデプロイする必要があります。 Google Cloud 環境のリソースは、サービス アカウントを使用して作成する必要があります。 Cloud Identity には、roles/iam.serviceAccountTokenCreator Identity and Access Management (IAM) ロールと、Terraform を使用してリソースをデプロイするために必要な権限があります。 Google が推奨するベスト プラクティスに従って、必要なリソースをデプロイするために開発環境をセットアップしたいと考えています。どうすればいいでしょうか?

  • A. 1. サービス アカウントのキー ファイルを JSON 形式でダウンロードし、ラップトップにローカルに保存します。
    2. GOOGLE_APPLICATION_CREDENTIALS 環境変数を、ダウンロードしたキー ファイルのパスに設定します。
  • B. 1. コマンドラインから次のコマンドを実行します: gcloud config set auth/impersonate_service_account [メール 保護されています].
    2. GOOGLE_OAUTH_ACCESS_TOKEN 環境変数を、gcloud auth print-access-token コマンドによって返される値に設定します。
  • C. 1. コマンド ラインからコマンド gcloud auth application-default login を実行します。
    2. 開いたブラウザ ウィンドウで、個人の資格情報を使用して認証します。
  • D. 1. サービス アカウントのキー ファイルを JSON 形式で Hashicorp Vault に保存します。
    2. Terraform を Vault と統合してキー ファイルを動的に取得し、有効期間の短いアクセス トークンを使用して Vault に対して認証します。

You need to deploy resources from your laptop to Google Cloud using Terraform. Resources in your Google Cloud environment must be created using a service account. Your Cloud Identity has the roles/iam.serviceAccountTokenCreator Identity and Access Management (IAM) role and the necessary permissions to deploy the resources using Terraform. You want to set up your development environment to deploy the desired resources following Google-recommended best practices. What should you do?

  • A. 1. Download the service account’s key file in JSON format, and store it locally on your laptop.
    2. Set the GOOGLE_APPLICATION_CREDENTIALS environment variable to the path of your downloaded key file.
  • B. 1. Run the following command from a command line: gcloud config set auth/impersonate_service_account [email protected].
    2. Set the GOOGLE_OAUTH_ACCESS_TOKEN environment variable to the value that is returned by the gcloud auth print-access-token command.
  • C. 1. Run the following command from a command line: gcloud auth application-default login.
    2. In the browser window that opens, authenticate using your personal credentials.
  • D. 1. Store the service account's key file in JSON format in Hashicorp Vault.
    2. Integrate Terraform with Vault to retrieve the key file dynamically, and authenticate to Vault using a short-lived access token.

15. PROFESSIONAL-CLOUD-DEVELOPER トピック 1 問題 21015. PROFESSIONAL-CLOUD-DEVELOPER Topic 1 Question 210

問題Question

あなたは、Cloud Storage バケットに保存されたプライベートの画像と動画を含むウェブ アプリケーションを開発しています。ユーザーは匿名であり、Google アカウントを持っていません。アプリケーション固有のロジックを使用して、画像やビデオへのアクセスを制御したいと考えています。アクセスをどのように設定すればよいでしょうか?

  • A. Google Cloud Armor を使用して、各 Web アプリケーション ユーザーの IP アドレスをキャッシュし、名前付き IP テーブルを作成します。ユーザーがバックエンド バケットにアクセスできるようにする Google Cloud Armor セキュリティ ポリシーを作成します。
  • B. ストレージ オブジェクト ビューアー IAM ロールを allUsers に付与します。 Web アプリケーションを通じて認証した後、ユーザーがバケットにアクセスできるようにします。
  • C. ユーザーを Web アプリケーションに認証するように Identity-Aware Proxy (IAP) を構成します。 IAP による認証後にユーザーがバケットにアクセスできるようにします。
  • D. バケットへの読み取りアクセスを許可する署名付き URL を生成します。 Web アプリケーションを通じて認証した後、ユーザーが URL にアクセスできるようにします。

You are developing a web application that contains private images and videos stored in a Cloud Storage bucket. Your users are anonymous and do not have Google Accounts. You want to use your application-specific logic to control access to the images and videos. How should you configure access?

  • A. Cache each web application user's IP address to create a named IP table using Google Cloud Armor. Create a Google Cloud Armor security policy that allows users to access the backend bucket.
  • B. Grant the Storage Object Viewer IAM role to allUsers. Allow users to access the bucket after authenticating through your web application.
  • C. Configure Identity-Aware Proxy (IAP) to authenticate users into the web application. Allow users to access the bucket after authenticating through IAP.
  • D. Generate a signed URL that grants read access to the bucket. Allow users to access the URL after authenticating through your web application.

16. PROFESSIONAL-CLOUD-DEVELOPER トピック 1 問題 21416. PROFESSIONAL-CLOUD-DEVELOPER Topic 1 Question 214

問題Question

あなたは大規模な組織の開発者です。 Go で書かれたアプリケーションが本番環境の Google Kubernetes Engine (GKE) クラスターで実行されています。 BigQuery へのアクセスを必要とする新しい機能を追加する必要があります。 Google が推奨するベスト プラクティスに従って、BigQuery に GKE クラスタへのアクセスを許可したいと考えています。どうすればいいでしょうか?

  • A. BigQuery にアクセスできる Google サービス アカウントを作成します。 JSON キーを Secret Manager に追加し、Go クライアント ライブラリを使用して JSON キーにアクセスします。
  • B. BigQuery にアクセスできる Google サービス アカウントを作成します。 Google サービス アカウントの JSON キーを Kubernetes シークレットとして追加し、このシークレットを使用するようにアプリケーションを構成します。
  • C. BigQuery にアクセスできる Google サービス アカウントを作成します。 Google サービス アカウントの JSON キーを Secret Manager に追加し、init コンテナを使用してアプリケーションが使用するシークレットにアクセスします。
  • D. Google サービス アカウントと Kubernetes サービス アカウントを作成します。 GKE クラスタで Workload Identity を構成し、アプリケーションのデプロイで Kubernetes サービス アカウントを参照します。

You are a developer at a large organization. You have an application written in Go running in a production Google Kubernetes Engine (GKE) cluster. You need to add a new feature that requires access to BigQuery. You want to grant BigQuery access to your GKE cluster following Google-recommended best practices. What should you do?

  • A. Create a Google service account with BigQuery access. Add the JSON key to Secret Manager, and use the Go client library to access the JSON key.
  • B. Create a Google service account with BigQuery access. Add the Google service account JSON key as a Kubernetes secret, and configure the application to use this secret.
  • C. Create a Google service account with BigQuery access. Add the Google service account JSON key to Secret Manager, and use an init container to access the secret for the application to use.
  • D. Create a Google service account and a Kubernetes service account. Configure Workload Identity on the GKE cluster, and reference the Kubernetes service account on the application Deployment.

17. PROFESSIONAL-CLOUD-DEVELOPER トピック 1 問題 21517. PROFESSIONAL-CLOUD-DEVELOPER Topic 1 Question 215

問題Question

Python で書かれたアプリケーションが Cloud Run の本番環境で実行されています。アプリケーションは、同じプロジェクト内の Cloud Storage バケットに保存されているデータの読み取り/書き込みを行う必要があります。最小特権の原則に従ってアプリケーションへのアクセスを許可したいと考えています。どうすればいいでしょうか?

  • A. カスタム Identity and Access Management (IAM) ロールを持つユーザー管理のサービス アカウントを作成します。
  • B. ストレージ管理者の Identity and Access Management (IAM) ロールを持つユーザー管理のサービス アカウントを作成します。
  • C. プロジェクト編集者の Identity and Access Management (IAM) ロールを持つユーザー管理のサービス アカウントを作成します。
  • D. 本番環境の Cloud Run リビジョンにリンクされたデフォルトのサービス アカウントを使用します。

You have an application written in Python running in production on Cloud Run. Your application needs to read/write data stored in a Cloud Storage bucket in the same project. You want to grant access to your application following the principle of least privilege. What should you do?

  • A. Create a user-managed service account with a custom Identity and Access Management (IAM) role.
  • B. Create a user-managed service account with the Storage Admin Identity and Access Management (IAM) role.
  • C. Create a user-managed service account with the Project Editor Identity and Access Management (IAM) role.
  • D. Use the default service account linked to the Cloud Run revision in production.

18. PROFESSIONAL-CLOUD-DEVELOPER トピック 1 問題 21818. PROFESSIONAL-CLOUD-DEVELOPER Topic 1 Question 218

問題Question

あなたは、ユーザーに代わって Google Cloud API を介して Google Cloud サービスと対話する必要がある Java Web サーバーを開発しています。ユーザーは、Google Cloud ID を使用して Google Cloud API に対して認証できる必要があります。 Web アプリケーションにどのワークフローを実装する必要がありますか?

  • A. 1. ユーザーがアプリケーションにアクセスしたら、Google ユーザー名とパスワードの入力を求めます。
    2. SHA パスワード ハッシュをユーザーのユーザー名とともにアプリケーションのデータベースに保存します。
    3. アプリケーションは、Authorization リクエスト ヘッダーにユーザーのユーザー名とパスワードのハッシュを含む HTTPS リクエストを使用して、Google Cloud API に対して認証を行います。
  • B. 1. ユーザーがアプリケーションにアクセスしたら、Google ユーザー名とパスワードの入力を求めます。
    2. HTTPS リクエスト内のユーザーのユーザー名とパスワードを Google Cloud 認証サーバーに転送し、アクセス トークンをリクエストします。
    3. Google サーバーはユーザーの資格情報を検証し、アプリケーションにアクセス トークンを返します。
    4. アプリケーションはアクセス トークンを使用して Google Cloud API を呼び出します。
  • C. 1. ユーザーがアプリケーションにアクセスすると、要求された権限のリストが表示された Google Cloud 同意画面にルーティングされ、SSO を使用して Google アカウントにログインするよう求められます。
    2. ユーザーがサインインして同意すると、アプリケーションは Google サーバーから認証コードを受け取ります。
    3. Google サーバーは、ブラウザの Cookie に保存されている認証コードをユーザーに返します。
    4. ユーザーは、Cookie 内の認証コードを使用して Google Cloud API に対して認証します。
  • D. 1. ユーザーがアプリケーションにアクセスすると、要求された権限のリストが表示された Google Cloud 同意画面にルーティングされ、SSO を使用して Google アカウントにログインするよう求められます。
    2. ユーザーがサインインして同意すると、アプリケーションは Google サーバーから認証コードを受け取ります。
    3. アプリケーションは、Google サーバーに認証コードとアクセス トークンを交換するよう要求します。
    4. Google サーバーは、アプリケーションが Google Cloud API を呼び出すために使用するアクセス トークンで応答します。

You are developing a Java Web Server that needs to interact with Google Cloud services via the Google Cloud API on the user's behalf. Users should be able to authenticate to the Google Cloud API using their Google Cloud identities. Which workflow should you implement in your web application?

  • A. 1. When a user arrives at your application, prompt them for their Google username and password.
    2. Store an SHA password hash in your application's database along with the user's username.
    3. The application authenticates to the Google Cloud API using HTTPs requests with the user's username and password hash in the Authorization request header.
  • B. 1. When a user arrives at your application, prompt them for their Google username and password.
    2. Forward the user's username and password in an HTTPS request to the Google Cloud authorization server, and request an access token.
    3. The Google server validates the user's credentials and returns an access token to the application.
    4. The application uses the access token to call the Google Cloud API.
  • C. 1. When a user arrives at your application, route them to a Google Cloud consent screen with a list of requested permissions that prompts the user to sign in with SSO to their Google Account.
    2. After the user signs in and provides consent, your application receives an authorization code from a Google server.
    3. The Google server returns the authorization code to the user, which is stored in the browser's cookies.
    4. The user authenticates to the Google Cloud API using the authorization code in the cookie.
  • D. 1. When a user arrives at your application, route them to a Google Cloud consent screen with a list of requested permissions that prompts the user to sign in with SSO to their Google Account.
    2. After the user signs in and provides consent, your application receives an authorization code from a Google server.
    3. The application requests a Google Server to exchange the authorization code with an access token.
    4. The Google server responds with the access token that is used by the application to call the Google Cloud API.

19. PROFESSIONAL-CLOUD-DEVELOPER トピック 1 問題 23019. PROFESSIONAL-CLOUD-DEVELOPER Topic 1 Question 230

問題Question

アプリケーションは Google Kubernetes Engine クラスタ内のコンテナとして実行されています。安全なアプローチを使用してアプリケーションにシークレットを追加する必要があります。どうすればいいでしょうか?

  • A. Kubernetes Secret を作成し、その Secret を環境変数としてコンテナに渡します。
  • B. Cloud Key Management Service (KMS) キーを使用して、クラスター上でアプリケーション層の秘密暗号化を有効にします。
  • C. 認証情報を Cloud KMS に保存します。 Cloud KMS から認証情報を読み取るための Google サービス アカウント(GSA)を作成します。 GSA を .json ファイルとしてエクスポートし、その .json ファイルを Cloud KMS から認証情報を読み取ることができるボリュームとしてコンテナに渡します。
  • D. 資格情報を Secret Manager に保存します。 Secret Manager から資格情報を読み取るための Google サービス アカウント (GSA) を作成します。コンテナーを実行するための Kubernetes サービス アカウント (KSA) を作成します。 Workload Identity を使用して、KSA が GSA として機能するように構成します。

Your application is running as a container in a Google Kubernetes Engine cluster. You need to add a secret to your application using a secure approach. What should you do?

  • A. Create a Kubernetes Secret, and pass the Secret as an environment variable to the container.
  • B. Enable Application-layer Secret Encryption on the cluster using a Cloud Key Management Service (KMS) key.
  • C. Store the credential in Cloud KMS. Create a Google service account (GSA) to read the credential from Cloud KMS. Export the GSA as a .json file, and pass the .json file to the container as a volume which can read the credential from Cloud KMS.
  • D. Store the credential in Secret Manager. Create a Google service account (GSA) to read the credential from Secret Manager. Create a Kubernetes service account (KSA) to run the container. Use Workload Identity to configure your KSA to act as a GSA.

20. PROFESSIONAL-CLOUD-DEVELOPER トピック 1 問題 25620. PROFESSIONAL-CLOUD-DEVELOPER Topic 1 Question 256

問題Question

あなたのチームは Cloud Run でサーバーレス ウェブ アプリケーションを作成しています。アプリケーションは、プライベート Cloud Storage バケットに保存されている画像にアクセスする必要があります。アプリケーションにバケット内の画像にアクセスするための Identity and Access Management (IAM) 権限を付与すると同時に、Google が推奨するベスト プラクティスを使用してサービスを保護したいと考えています。どうすればいいでしょうか?

  • A. 目的のバケットに対して署名付き URL を適用します。バケットに対するストレージ オブジェクト閲覧者の IAM ロールを Compute Engine のデフォルト サービス アカウントに付与します。
  • B. 目的のバケットに対してパブリック アクセス防止を適用します。バケットに対するストレージ オブジェクト閲覧者の IAM ロールを Compute Engine のデフォルト サービス アカウントに付与します。
  • C. 目的のバケットに対して署名付き URL を適用します。ユーザー管理のサービス アカウントを使用するように Cloud Run サービスを作成および更新します。バケットに対するストレージ オブジェクト ビューアー IAM ロールをサービス アカウントに付与します。
  • D. 目的のバケットに対してパブリック アクセス防止を適用します。ユーザー管理のサービス アカウントを使用するように Cloud Run サービスを作成および更新します。バケットに対するストレージ オブジェクト ビューアー IAM ロールをサービス アカウントに付与します。

Your team is creating a serverless web application on Cloud Run. The application needs to access images stored in a private Cloud Storage bucket. You want to give the application Identity and Access Management (IAM) permission to access the images in the bucket, while also securing the services using Google-recommended best practices. What should you do?

  • A. Enforce signed URLs for the desired bucket. Grant the Storage Object Viewer IAM role on the bucket to the Compute Engine default service account.
  • B. Enforce public access prevention for the desired bucket. Grant the Storage Object Viewer IAM role on the bucket to the Compute Engine default service account.
  • C. Enforce signed URLs for the desired bucket. Create and update the Cloud Run service to use a user-managed service account. Grant the Storage Object Viewer IAM role on the bucket to the service account.
  • D. Enforce public access prevention for the desired bucket. Create and update the Cloud Run service to use a user-managed service account. Grant the Storage Object Viewer IAM role on the bucket to the service account.

21. PROFESSIONAL-CLOUD-DEVELOPER トピック 1 問題 27021. PROFESSIONAL-CLOUD-DEVELOPER Topic 1 Question 270

問題Question

会社のセキュリティ チームは、Identity and Access Management (IAM) を使用して、どのユーザーがどのリソースにアクセスできるかを追跡します。セキュリティ チームのプロセスと統合できるバージョン管理システムを作成する必要があります。マージ競合を最小限に抑えるために、ソリューションで高速リリース サイクルとメイン ブランチへの頻繁なマージをサポートする必要があります。どうすればいいでしょうか?

  • A. Cloud Source Repositories リポジトリを作成し、トランクベースの開発を使用します。
  • B. Cloud Source Repositories リポジトリを作成し、機能ベースの開発を使用します。
  • C. GitHub リポジトリを作成し、それを Cloud Source Repositories リポジトリにミラーリングし、トランクベースの開発を使用します。
  • D. GitHub リポジトリを作成し、それを Cloud Source Repositories リポジトリにミラーリングし、機能ベースの開発を使用します。

Your company's security team uses Identity and Access Management (IAM) to track which users have access to which resources. You need to create a version control system that can integrate with your security team's processes. You want your solution to support fast release cycles and frequent merges to your main branch to minimize merge conflicts. What should you do?

  • A. Create a Cloud Source Repositories repository, and use trunk-based development.
  • B. Create a Cloud Source Repositories repository, and use feature-based development.
  • C. Create a GitHub repository, mirror it to a Cloud Source Repositories repository, and use trunk-based development.
  • D. Create a GitHub repository, mirror it to a Cloud Source Repositories repository, and use feature-based development.

22. PROFESSIONAL-CLOUD-DEVELOPER トピック 1 問題 29122. PROFESSIONAL-CLOUD-DEVELOPER Topic 1 Question 291

問題Question

現在、コンテナ イメージを Artifact Registry にプッシュし、コンテナ化されたマイクロサービス アプリケーションを GKE にデプロイしています。アプリケーションをデプロイした後、サービスが期待どおりに動作しないことに気づきました。 kubectl get pods コマンドを使用してアプリケーション Pod の状態を検査し、Pod の 1 つが CrashLoopBackoff の状態であることを発見します。ポッドのトラブルシューティングはどのように行うべきですか?

  • A. kubectl exec -it POD_NAME - /bin/bash コマンドを実行して、問題のある Pod に接続します。POD_NAME パラメーターは、問題のある Pod の名前です。 /var/log/messages フォルダー内のログを検査して、根本原因を特定します。
  • B. gcloud project get-iam-policy PROJECT_ID コマンドを実行します。ここで、PROJECT_ID パラメータは、Artifact Registry が存在するプロジェクトの名前です。ノード プールのサービス アカウントの IAM バインディングを検査します。サービス アカウントにroles/artifactregistry.readerロールがあるかどうかを検証します。
  • C. kubectl logs POD_NAME コマンドを実行します。POD_NAME パラメーターは、問題のあるポッドの名前です。以前の実行からのポッドのログを分析して、ポッドの開始試行の失敗の根本原因を特定します。
  • D. Google Cloud コンソールで、クラスタの VPC のプロジェクトの Cloud Logging に移動します。フィルタを入力して、プライベート Google アクセス CIDR 範囲への拒否された下りトラフィックを表示します。 GKE クラスタからプライベート Google アクセス CIDR 範囲への下りトラフィックが拒否されているかどうかを検証します。

You are currently pushing container images to Artifact Registry and deploying a containerized microservices application to GKE. After deploying the application, you notice that the services do not behave as expected. You use the kubectl get pods command to inspect the state of the application Pods, and discover that one of the Pods has a state of CrashLoopBackoff. How should you troubleshoot the Pod?

  • A. Connect to the problematic Pod by running the kubectl exec -it POD_NAME - /bin/bash command where the POD_NAME parameter is the name of the problematic Pod. Inspect the logs in the /var/log/messages folder to determine the root cause.
  • B. Execute the gcloud projects get-iam-policy PROJECT_ID command where the PROJECT_ID parameter is the name of the project where your Artifact Registry resides. Inspect the IAM bindings of the node pool s service account. Validate if the service account has the roles/artifactregistry.reader role.
  • C. Run the kubectl logs POD_NAME command where the POD_NAME parameter is the name of the problematic Pod. Analyze the logs of the Pod from previous runs to determine the root cause of failed start attempts of the Pod.
  • D. In the Google Cloud console, navigate to Cloud Logging in the project of the cluster’s VPC. Enter a filter to show denied egress traffic to the Private Google Access CIDR range. Validate if egress traffic is denied from your GKE cluster to the Private Google Access CIDR range.

23. PROFESSIONAL-CLOUD-DEVELOPER トピック 1 問題 29323. PROFESSIONAL-CLOUD-DEVELOPER Topic 1 Question 293

問題Question

あなたは、内部ユーザー向けのスケーラブルな Web アプリケーションを開発しています。あなたの組織は Google Workspace を使用しています。ユーザーのアプリケーションに対する認証を設定してから、アプリケーションを Google Cloud にデプロイする必要があります。クラウドネイティブ機能を使用する予定で、インフラストラクチャ管理の労力を最小限に抑えたいと考えています。どうすればいいでしょうか? (2つお選びください。)

  • A. Compute Engine VM を作成し、ウェブサーバーを構成し、アプリケーションを VPC にデプロイします。
  • B. アプリケーションをコンテナ化して、Cloud Run サービスとしてデプロイします。
  • C. ユーザーとパスワードのハッシュを含むテーブルを使用して Cloud SQL データベースを構成します。認証画面を追加して、内部ユーザーのみがアプリケーションにアクセスできるようにします。
  • D. Identity Aware Proxy を構成し、アプリケーションにアクセスする必要があるユーザーに role/iap.httpsResourceAccessor IAM ロールを付与します。
  • E. Identity Aware Proxy を構成し、アプリケーションにアクセスする必要があるユーザーに role/iap.tunnelResourceAccessor IAM ロールを付与します。

You are developing a scalable web application for internal users. Your organization uses Google Workspace. You need to set up authentication to the application for the users, and then deploy the application on Google Cloud. You plan to use cloud-native features, and you want to minimize infrastructure management effort. What should you do? (Choose two.)

  • A. Create a Compute Engine VM, configure a web server, and deploy the application in a VPC.
  • B. Containerize the application, and deploy it as a Cloud Run service.
  • C. Configure Cloud SQL database with a table containing the users and password hashes. Add an authentication screen to ensure that only internal users can access the application.
  • D. Configure Identity Aware Proxy, and grant the roles/iap.httpsResourceAccessor IAM role to the users that need to access the application.
  • E. Configure Identity Aware Proxy, and grant the roles/iap.tunnelResourceAccessor IAM role to the users that need to access the application.

24. PROFESSIONAL-CLOUD-DEVELOPER トピック 1 問題 30824. PROFESSIONAL-CLOUD-DEVELOPER Topic 1 Question 308

問題Question

組織には、外部アイデンティティ プロバイダー (IdP) で構成されたユーザーとグループがあります。同じ外部 IdP を利用して、すべての従業員が Google Cloud コンソールにアクセスできるようにしたいと考えています。また、ユーザーが Google Cloud コンソールにアクセスするときにユーザーの名前と写真を表示して、ログイン エクスペリエンスをパーソナライズしたいと考えています。どうすればいいでしょうか?

  • A. 外部 IdP との Workforce Identity フェデレーションを構成し、属性マッピングを設定します。
  • B. ユーザー名と写真を使用して各個人のサービス アカウントを構成し、各ユーザーにそれぞれのサービス アカウントになりすます権限を付与します。
  • C. Workload Identity フェデレーションを構成して外部 IdP トークンを取得し、これらのトークンを使用して Google Cloud コンソールにログインします。
  • D. すべてのユーザーの組織メール ID を含む Google グループを作成します。同じ名前、職場の電子メール ID、パスワードを使用して登録してサインインするようユーザーに依頼します。

Your organization has users and groups configured in an external identity provider (IdP). You want to leverage the same external IdP to allow Google Cloud console access to all employees. You also want to personalize the sign-in experience by displaying the user's name and photo when users access the Google Cloud console. What should you do?

  • A. Configure workforce identity federation with the external IdP, and set up attribute mapping.
  • B. Configure a service account for each individual by using the user name and photo, and grant permissions for each user to impersonate their respective service accounts.
  • C. Configure workload identity federation to get the external IdP tokens, and use these tokens to sign in to the Google Cloud console.
  • D. Create a Google group that includes organization email IDs for all users. Ask users to use the same name, work email ID, and password to register and sign in.

25. PROFESSIONAL-CLOUD-DEVELOPER トピック 1 問題 31025. PROFESSIONAL-CLOUD-DEVELOPER Topic 1 Question 310

問題Question

Windows OS と Cloud SQL を使用して Compute Engine インスタンスにホストされているアプリケーションをデプロイしようとしています。 Cloud SQL インスタンスへの接続に Cloud SQL Auth Proxy を使用する予定です。あなたは、Google が推奨する慣行と最小特権の原則に従う予定です。カスタム サービス アカウントはすでに作成されています。次に何をすべきでしょうか?

  • A. Cloudsql.instances.connect 権限を持つカスタム ロールを作成し、カスタム サービス アカウントに割り当てます。 Cloud SQL Auth Proxy の開始コマンドを調整して、インスタンスの接続名を指定します。
  • B. カスタム サービス アカウントに、roles/cloudsql.client ロールを付与します。 --unix-socket CLI オプションを使用するように Cloud SQL Auth Proxy 開始コマンドを調整します。
  • C. カスタム サービス アカウントに、roles/cloudsql.editor ロールを付与します。
  • D. カスタム サービス アカウントに、roles/cloudsql.viewer ロールを付与します。 Cloud SQL Auth Proxy の開始コマンドを調整して、インスタンスの接続名を指定します。

You are about to deploy an application hosted on a Compute Engine instance with Windows OS and Cloud SQL. You plan to use the Cloud SQL Auth Proxy for connectivity to the Cloud SQL instance. You plan to follow Google-recommended practices and the principle of least privilege. You have already created a custom service account. What should you do next?

  • A. Create and assign a custom role with the cloudsql.instances.connect permission to the custom service account. Adjust the Cloud SQL Auth Proxy start command to specify your instance connection name.
  • B. Grant the custom service account the roles/cloudsql.client role. Adjust the Cloud SQL Auth Proxy start command to use the --unix-socket CLI option.
  • C. Grant the custom service account the roles/cloudsql.editor role.
  • D. Grant the custom service account the roles/cloudsql.viewer role. Adjust the Cloud SQL Auth Proxy start command to specify your instance connection name.

26. PROFESSIONAL-CLOUD-DEVELOPER トピック 1 問題 32126. PROFESSIONAL-CLOUD-DEVELOPER Topic 1 Question 321

問題Question

あなたのチームは、今後のアプリケーション リリースのデータベース バックエンドとして AlloyDB を使用することを計画しています。アプリケーションは現在、AlloyDB インスタンスとは異なるプロジェクトおよびネットワークでホストされています。プロジェクトを分離したまま、アプリケーションを AlloyDB インスタンスに安全に接続する必要があります。追加の操作を最小限に抑え、Google が推奨する方法に従いたいと考えています。データベース接続用にネットワークをどのように構成すればよいでしょうか?

  • A. アプリケーション プロジェクトと AlloyDB プロジェクトの両方がサービス プロジェクトである共有 VPC プロジェクトをプロビジョニングします。
  • B. AlloyDB Auth Proxy を使用し、ポート 5433 への接続を許可するようにアプリケーション プロジェクトのファイアウォールを構成します。
  • C. AlloyDB プロジェクトからサービス アカウントをプロビジョニングします。このサービス アカウントの JSON キー ファイルを --credentials-file として使用して、AlloyDB インスタンスに接続します。
  • D. データベース チームに、アプリケーションと同じプロジェクトおよびネットワークに AlloyDB データベースをプロビジョニングするよう依頼します。

Your team plans to use AlloyDB as their database backend for an upcoming application release. Your application is currently hosted in a different project and network than the AlloyDB instances. You need to securely connect your application to the AlloyDB instance while keeping the projects isolated. You want to minimize additional operations and follow Google-recommended practices. How should you configure the network for database connectivity?

  • A. Provision a Shared VPC project where both the application project and the AlloyDB project are service projects.
  • B. Use AlloyDB Auth Proxy and configure the application project’s firewall to allow connections to port 5433.
  • C. Provision a service account from the AlloyDB project. Use this service account’s JSON key file as the --credentials-file to connect to the AlloyDB instance.
  • D. Ask the database team to provision AlloyDB databases in the same project and network as the application.

27. PROFESSIONAL-CLOUD-DEVELOPER トピック 1 問題 32527. PROFESSIONAL-CLOUD-DEVELOPER Topic 1 Question 325

問題Question

あなたは、時間に敏感な情報を含む PDF ファイルをユーザーと共有するアプリケーションを設計しています。 PDF ファイルは Cloud Storage に保存されます。ファイルへの安全なアクセスを提供する必要があります。

次の要件があります。
• ユーザーは、表示が許可されているファイルにのみアクセスできるようにする必要があります。
• ユーザーは、PDF ファイルの読み取り、書き込み、削除を 24 時間リクエストできる必要があります。

アプリケーションのすべてのユーザーが Google アカウントを持っているわけではありません。データオブジェクトへのアクセスをどのように提供すべきでしょうか?

  • A. 有効期限が 24 時間の署名付き URL を生成するようにアプリケーションを構成します。署名された URL をユーザーと共有します。ユーザーがアクセスする必要がある PDF ファイルに署名付き URL を添付します。
  • B. アプリケーションのサービス アカウントになりすますためのサービス アカウント トークン作成者の IAM ロールをユーザーに提供します。 Cloud Storage バケットにアクセスするには、Cloud Storage ユーザー IAM ロールをアプリケーションのサービス アカウントに割り当てます。アプリケーションのサービス アカウント キーを 24 時間ごとにローテーションします。
  • C. POF ファイルへのアクセスを許可するサービス アカウントを生成します。サービス アカウントのキー ファイルへのダウンロード リンクをユーザーに提供するようにアプリケーションを構成します。サービス アカウント キーの有効期限を 24 時間に設定します。サービス アカウント キー ファイルを使用して認証するようにユーザーに指示します。
  • D. PDF ファイルへのアクセスを要求するユーザーにストレージ オブジェクト ユーザー IAM ロールを割り当てます。ロールの IAM 条件を 24 時間後に期限切れになるように設定します。

You are designing an application that shares PDF files containing time-sensitive information with users. The PDF files are saved in Cloud Storage. You need to provide secure access to the files.

You have the following requirements:
• Users should only have access to files that they are allowed to view.
• Users should be able to request to read, write, or delete the PDF files for 24 hours.

Not all users of the application have a Google account. How should you provide access to data objects?

  • A. Configure the application to generate signed URLs with an expiration time of 24 hours. Share the signed URLs with users. Attach the signed URL to the PDF files that users require access to.
  • B. Provide users with the Service Account Token Creator IAM role to impersonate the application's service account. Assign the Cloud Storage User IAM role to the application's service account to access the Cloud Storage bucket. Rotate the application's service account key every 24 hours.
  • C. Generate a service account that grants access to the POF files. Configure the application to provide users with a download link to the service account's key file. Set an expiration time of 24 hours to the service account Keys. Instruct users to authenticate by using the service account key file.
  • D. Assign the Storage Object User IAM role to users that request access to the PDF files. Set an IAM condition on the role to expire after 24 hours.

28. PROFESSIONAL-CLOUD-DEVELOPER トピック 1 問題 32928. PROFESSIONAL-CLOUD-DEVELOPER Topic 1 Question 329

問題Question

あなたは、Python 3 の最新の安定バージョンを使用して、Cloud SQL データベースにデータを保存する API を開発しています。最小限の労力で、運用データベース上で CRUD 操作を安全かつ確実に実行する必要があります。どうすればいいでしょうか?

  • A. 1. Cloud Composer を使用して、Python アプリケーションから Cloud SQL データベースへの接続を管理します。
    2.composer.worker 権限を含む IAM ロールをサービス アカウントに付与します。
  • B. 1. Cloud SQL API を使用して、Python アプリケーションから Cloud SQL データベースに接続します。
    2. Cloudsql.instances.login 権限を含む IAM ロールをサービス アカウントに付与します。
  • C. 1. Python 用 Cloud SQL コネクタ ライブラリを使用して、Cloud SQL Auth Proxy 経由で Cloud SQL データベースに接続します。
    2. Cloudsql.instances.connect 権限を含む IAM ロールをサービス アカウントに付与します。
  • D. 1. Cloud SQL エミュレータを使用して、Cloud Shell から Cloud SQL データベースに接続します
    2. ユーザーに、cloudsql.instances.login 権限を含む IAM ロールを付与します。

You are using the latest stable version of Python 3 to develop an API that stores data in a Cloud SQL database. You need to perform CRUD operations on the production database securely and reliably with minimal effort. What should you do?

  • A. 1. Use Cloud Composer to manage the connection to the Cloud SQL database from your Python application.
    2. Grant an IAM role to the service account that includes the composer.worker permission.
  • B. 1. Use the Cloud SQL API to connect to the Cloud SQL database from your Python application.
    2. Grant an IAM role to the service account that includes the cloudsql.instances.login permission.
  • C. 1. Use the Cloud SQL connector library for Python to connect to the Cloud SQL database through a Cloud SQL Auth Proxy.
    2. Grant an IAM role to the service account that includes the cloudsql.instances.connect permission.
  • D. 1. Use the Cloud SQL emulator to connect to the Cloud SQL database from Cloud Shell
    2. Grant an IAM role to the user that includes the cloudsql.instances.login permission.

29. PROFESSIONAL-CLOUD-DEVELOPER トピック 1 問題 33529. PROFESSIONAL-CLOUD-DEVELOPER Topic 1 Question 335

問題Question

あなたには、社内アプリケーションのセキュリティを管理する責任があります。アプリケーションは Cloud Run にデプロイされ、Secret Manager を使用して内部データベースへのアクセスに必要なパスワードを保存します。各アプリケーションはシークレットを最大 15 分間キャッシュできます。シークレットをローテーションする方法を決定する必要があります。アプリケーションのダウンタイムを回避したい。どうすればいいでしょうか?

  • A. 新しいユーザー名とパスワードをシークレットに保存します。必要なシークレットの最新バージョンを参照し、シークレットを 15 分間キャッシュします。
  • B. アプリケーションの起動時に最新のシークレット ペイロードを取得し、アプリケーションの実行中はシークレットを使用し続けるようにアプリケーションを設計します。
  • C. 新しいパスワードをシークレットに保存します。必要なシークレットの最新バージョンを参照し、シークレットを 15 分間キャッシュします。
  • D. 新しいパスワードをシークレットに保存します。特定のシークレット バージョンを参照するようにアプリケーションを設計します。新しいバージョンを参照するようにコードを変更し、メンテナンス期間中にアプリケーションの展開をスケジュールします。

You are responsible for managing the security of internal applications in your company. The applications are deployed on Cloud Run, and use Secret Manager to store passwords needed to access internal databases. Each application can cache secrets for up to 15 minutes. You need to determine how to rotate the secrets. You want to avoid application downtime. What should you do?

  • A. Store the new username and password in the secret. Reference the latest version of any secret required, and cache the secret for 15 minutes.
  • B. Design the applications to retrieve the Latest secret payload on application startup, and continue to use the secret for the duration of the application run.
  • C. Store the new password in the secret. Reference the latest version of any secret required, and cache the secret for 15 minutes.
  • D. Store the new password in the secret. Design the applications to reference a specific secret version. Change the code to reference the new version, and schedule the deployment of the application during a maintenance window.

30. PROFESSIONAL-CLOUD-DEVELOPER トピック 1 問題 33730. PROFESSIONAL-CLOUD-DEVELOPER Topic 1 Question 337

問題Question

マイクロサービス アプリケーションを GKE にデプロイしています。 1 つのマイクロサービスは Cloud Storage バケットからファイルをダウンロードする必要があります。バケットのあるプロジェクトに対するストレージ オブジェクト閲覧者ロールを持つ IAM サービス アカウントを持っています。 Google が推奨する方法に従って、Cloud Storage バケットにアクセスするようにアプリケーションを構成する必要があります。どうすればいいでしょうか?

  • A. IAM サービス アカウントをクラスターのノード プールに割り当てます。アプリケーションのデフォルト認証情報を使用してバケットに対して認証するようにアプリケーションを構成します。
  • B. IAM サービス アカウントをクラスターのノード プールに割り当てます。対称ブロック暗号を使用して IAM サービス アカウント キー ファイルを暗号化し、暗号化されたファイルを永続ボリュームに保存します。暗号化キーを Secret Manager に保存します。
  • C. Kubernetes サービス アカウントを作成します。 Create a Kubernetes secret with a base64-encoded IAM service account key file. Annotate the Kubernetes secret with the Kubernetes service account. Assign the Kubernetes ServiceAccount to the Pods that need to access the bucket.
  • D. Kubernetes サービス アカウントを作成します。 IAM ポリシーを使用して、IAM サービス アカウントを Kubernetes サービス アカウントにバインドします。 Kubernetes ServiceAccount オブジェクトにバインドされた IAM サービス アカウントの名前を付けます。バケットにアクセスする必要があるポッドに Kubernetes ServiceAccount を割り当てます。

You are deploying a microservices application to GKE. One microservice needs to download files from a Cloud Storage bucket. You have an IAM service account with the Storage Object Viewer role on the project with the bucket. You need to configure your application to access the Cloud Storage bucket while following Google-recommended practices. What should you do?

  • A. Assign the IAM service account to the cluster’s node pool. Configure the application to authenticate to the bucket by using Application Default Credentials.
  • B. Assign the IAM service account to the cluster’s node pool. Encrypt the IAM service account key file by using a symmetric block cipher, and store the encrypted file on a persistent volume. Store the encryption key in Secret Manager.
  • C. Create a Kubernetes service account. Create a Kubernetes secret with a base64-encoded IAM service account key file. Annotate the Kubernetes secret with the Kubernetes service account. Assign the Kubernetes ServiceAccount to the Pods that need to access the bucket.
  • D. Create a Kubernetes service account. Use an IAM policy to bind the IAM service account to a Kubernetes service account. Annotate the Kubernetes ServiceAccount object with the name of the bound IAM service account. Assign the Kubernetes ServiceAccount to the Pods that need to access the bucket.

31. PROFESSIONAL-CLOUD-DEVELOPER トピック 1 問題 34331. PROFESSIONAL-CLOUD-DEVELOPER Topic 1 Question 343

問題Question

同じ Google Cloud プロジェクトで e コマース アプリケーションを開発している 3 つのチームがあります。チーム A は、アプリケーションのいくつかのコア機能を公開する RESTful API のセットを構築します。チーム B とチーム C は、Cloud Run サービスで実行されているダウンストリーム プロセスでこれらの API にリクエストを作成します。 3 つのチームのセキュリティを最大化し、管理オーバーヘッドを最小限に抑える方法で API を公開するソリューションを提案する必要があります。このソリューションをどのように設計すればよいでしょうか?

  • A. 1. チーム A はサービス アカウントを使用して Cloud API Gateway を承認します。チーム B とチーム C はそれぞれサービス アカウントを作成し、サービス アカウントのキーをエクスポートし、各キーを Secret Manager の個別のシークレットに保存します。
    2. チーム B とチーム C は、このサービス アカウント キーを使用して、API にアクセスするための OAuth トークンを作成します。
  • B. 1. チーム A は、Apigee ハイブリッドを使用して API キーを作成し、そのキーをチーム B およびチーム C と共有します。
    2. チーム B とチーム C は、API キーを Secret Manager のシークレットに保存し、この API キーを使用して API エンドポイントにアクセスします。
  • C. 1. チーム A は API キーを使用して Cloud API Gateway を承認し、そのキーをチーム B およびチーム C と共有します。
    2. チーム B とチーム C は、API キーを Secret Manager のシークレットに保存し、この API キーを使用して API エンドポイントにアクセスします。
  • D. 1. チーム A はサービス アカウントを使用して Cloud API Gateway を承認します。チーム B とチーム C はそれぞれ、API にアクセスできるサービス アカウントを作成します。
    2. チーム B とチーム C は、サービスにアタッチされているサービス アカウントを使用して、プロセスを実行している Cloud Run サービスの API にアクセスします。

There are three teams developing an ecommerce application in the same Google Cloud project. Team A will build a set of RESTful APIs that exposes some core functionalities for the application. Team B and Team C will make requests to those APIs in their downstream processes running on Cloud Run services. You need to propose a solution for exposing the APIs in a way that maximizes security and minimizes management overhead for the three teams. How should you design this solution?

  • A. 1. Team A uses service accounts to authorize Cloud API Gateway. Team B and Team C each create a service account, export their service account's key, and store each key in a separate secret in Secret Manager.
    2. Team B and Team C use this service account key to create an OAuth token to access the APIs.
  • B. 1. Team A uses Apigee hybrid to create an API key and shares that key with Team B and Team C.
    2. Team B and Team C store the API key in a secret in Secret Manager, and use this API key to access the API endpoint.
  • C. 1. Team A uses an API key to authorize Cloud API Gateway and shares the key with Team B and Team C.
    2. Team B and Team C store the API key in a secret in Secret Manager, and use this API key to access the API endpoint.
  • D. 1. Team A uses service accounts to authorize Cloud API Gateway. Team B and Team C each create a service account that has access to the APIs.
    2. Team B and Team C access the APIs in the Cloud Run service running their processes by using the service accounts attached to their service.

32. PROFESSIONAL-CLOUD-DEVELOPER トピック 1 問題 35132. PROFESSIONAL-CLOUD-DEVELOPER Topic 1 Question 351

問題Question

別のプロジェクトの Cloud SQL インスタンスに接続する必要がある Cloud Run サービスがあります。 Cloud SQL をホストしているプロジェクトで Cloud SQL クライアント IAM ロールを使用して Cloud Run サービス アカウントをプロビジョニングしました。ただし、接続をテストすると、接続は失敗します。 Google が推奨する方法に従って、接続エラーを修正したいと考えています。どうすればいいでしょうか?

  • A. Cloud Run サービス アカウントに Cloudsql.instances.connect IAM 権限を追加します。
  • B. Cloud SQL Auth Proxy の追加の API 割り当てをリクエストします。
  • C. 両方のプロジェクトで Cloud SQL Admin API を有効にします。
  • D. Cloud SQL インスタンスを Cloud Run サービスと同じプロジェクトに移行します。

You have a Cloud Run service that needs to connect to a Cloud SQL instance in a different project. You provisioned the Cloud Run service account with the Cloud SQL Client IAM role on the project that is hosting Cloud SQL. However, when you test the connection, the connection fails. You want to fix the connection failure while following Google-recommended practices. What should you do?

  • A. Add the cloudsql.instances.connect IAM permission to the Cloud Run service account.
  • B. Request additional API quota for Cloud SQL Auth Proxy,
  • C. Enable the Cloud SQL Admin API in both projects.
  • D. Migrate the Cloud SQL instance into the same project as the Cloud Run service.