Ngân hàng đề — Google Cloud Professional Cloud Security Engineer

Tìm thấy 395 câu.

Câu 341
You are implementing a new web application on Google Cloud that will be accessed from your on-premises network. To provide protection from threats like malware, you must implement transport layer security (TLS) interception for incoming traffic to your application. What should you do?
  1. A Configure Secure Web Proxy. Offload the TLS traffic in the load balancer, inspect the traffic, and forward the traffic to the web application.
  2. B Configure an internal proxy load balancer. Offload the TLS traffic in the load balancer inspect, the traffic and forward the traffic to the web application.
  3. C Configure a hierarchical firewall policy. Enable TLS interception by using Cloud Next Generation Firewall (NGFW) Enterprise.
  4. D Configure a VPC firewall rule. Enable TLS interception by using Cloud Next Generation Firewall (NGFW) Enterprise.
Xem giải thích

🧩 Phân tích chi tiết nội dung câu hỏi

Câu hỏi tập trung vào việc triển khai bảo mật cho một ứng dụng web mới trên Google Cloud Platform (GCP), nơi ứng dụng này được truy cập từ mạng on-premises (mạng nội bộ tại chỗ). 📍 Yêu cầu chính là bảo vệ khỏi các mối đe dọa như malware bằng cách triển khai TLS interception (chặn và kiểm tra lưu lượng TLS) cho incoming traffic (lưu lượng đến ứng dụng).

🛡️ TLS interception hoạt động bằng cách giải mã (decrypt) lưu lượng TLS tại proxy/firewall, kiểm tra nội dung để phát hiện malware/threats, sau đó mã hóa lại (re-encrypt) và chuyển tiếp đến ứng dụng đích. Điều này cần một giải pháp hỗ trợ TLS decryption/inspection ở lớp transport layer, đặc biệt cho traffic từ on-premises vào GCP.

⚠️ Lưu ý: Câu hỏi nhấn mạnh protection from threats like malware, nên cần giải pháp enterprise-grade như Cloud Next Generation Firewall (NGFW) Enterprise (phiên bản cao cấp của Google Cloud Firewall, cập nhật đến 2026 hỗ trợ TLS 1.3 inspection đầy đủ). Không phải load balancer thông thường vì chúng không inspect nội dung sau decrypt.

✅ Đáp án đúng và lý do lựa chọn

Đáp án đúng: Configure a hierarchical firewall policy. Enable TLS interception by using Cloud Next Generation Firewall (NGFW) Enterprise.

Lý do:

  • Hierarchical Firewall Policy (chính sách tường lửa phân cấp) là cơ chế quản lý policy toàn tổ chức trên GCP, cho phép áp dụng TLS interception ở mức global/organization/folder.
  • Cloud NGFW Enterprise (cập nhật 2024-2026) hỗ trợ TLS interception/decryption chính thức cho inbound/outbound traffic, bao gồm inspect malware qua tích hợp Threat Intelligence.
  • 🛡️ Đây là cách chuẩn để bảo vệ web app từ on-premises mà không cần proxy/load balancer riêng, vì policy áp dụng trực tiếp lên traffic routing qua VPC/GKE/Cloud Run. Traffic được decrypt tại NGFW, inspect, rồi forward an toàn.
  • Phù hợp nhất cho scenario hybrid (on-prem to GCP). 📘 Nguồn: Google Cloud NGFW Enterprise TLS Inspection Docs & Hierarchical Firewall Policies.

📋 Giải thích tất cả các phương án (đúng/sai)

  • ❌ Phương án SAI: Configure Secure Web Proxy. Offload the TLS traffic in the load balancer, inspect the traffic, and forward the traffic to the web application.
    Giải thích: Cloud Secure Web Proxy (ra mắt 2023, cập nhật 2026) dùng cho outbound internet traffic từ GCP instances ra ngoài (như employee browsing), KHÔNG hỗ trợ inbound TLS interception từ on-premises. Ngoài ra, không offload TLS tại load balancer (HTTPS LB chỉ terminate TLS, không inspect nội dung). Không phù hợp cho web app incoming. 🧨

  • ❌ Phương án SAI: Configure an internal proxy load balancer. Offload the TLS traffic in the load balancer inspect, the traffic and forward the traffic to the web application.
    Giải thích: Internal Proxy LB (TCP Proxy/HTTP(S) LB internal) chỉ terminate TLS (offload) nhưng KHÔNG có tính năng inspect/decrypt nội dung cho malware. Không hỗ trợ TLS interception; chỉ forward traffic sau terminate. Không phải giải pháp security cho threats như malware từ on-prem. ⚠️

  • ✅ Phương án ĐÚNG: Configure a hierarchical firewall policy. Enable TLS interception by using Cloud Next Generation Firewall (NGFW) Enterprise.
    Giải thích: Như đã nêu ở phần đáp án đúng. Hierarchical policy cho phép enable TLS decryption profile trên NGFW Enterprise, inspect traffic inbound từ on-prem qua VPN/Interconnect, detect malware realtime. Hỗ trợ full TLS 1.3 (2026). Hoàn hảo cho web app protection! 🛡️ Nguồn: NGFW TLS Interception Guide.

  • ❌ Phương án SAI: Configure a VPC firewall rule. Enable TLS interception by using Cloud Next Generation Firewall (NGFW) Enterprise.
    Giải thích: VPC Firewall Rules (regional) chỉ là allow/deny dựa IP/port, KHÔNG hỗ trợ hierarchical và KHÔNG enable TLS interception trực tiếp. NGFW Enterprise cần hierarchical/global policy để TLS inspect; VPC rule chỉ base layer. Sai cấu trúc! 🚫 Nguồn: VPC Firewall vs Hierarchical.

🧠 Tóm tắt key takeaway: Sử dụng NGFW Enterprise với Hierarchical Policy là best practice GCP cho TLS interception hybrid setups (cập nhật 2026). Tránh nhầm lẫn với LB/proxy chỉ terminate TLS! Nếu deploy, test với sample traffic qua Cloud Shell. 📘

Câu 342
Your organization has hired a small, temporary partner team for 18 months. The temporary team will work alongside your DevOps team to develop your organization's application that is hosted on Google Cloud. You must give the temporary partner team access to your application's resources on Google Cloud and ensure that partner employees lose access. If they are removed from their employer's organization. What should you do?
  1. A Create a temporary username and password for the temporary partner team members. Auto-clean the usernames and passwords after the work engagement has ended.
  2. B Create a workforce identity pool and federate the identity pool with the identity provider (IdP) of the temporary partner team.
  3. C Implement just-in-time privileged access to Google Cloud for the temporary partner team.
  4. D Add the identities of the temporary partner team members to your identity provider (IdP).
Xem giải thích

🧩 Phân tích chi tiết nội dung câu hỏi

Câu hỏi mô tả tình huống tổ chức của bạn thuê một đội ngũ đối tác tạm thời (small, temporary partner team) trong 18 tháng, làm việc cùng đội DevOps để phát triển ứng dụng hosted trên Google Cloud.
Yêu cầu chính:

  • Cấp quyền truy cập vào tài nguyên ứng dụng trên Google Cloud cho đội đối tác.
  • Đảm bảo tự động mất quyền truy cập nếu nhân viên đối tác bị loại bỏ khỏi tổ chức của nhà tuyển dụng họ (removed from their employer's organization).

📌 Mục tiêu cốt lõi: Sử dụng cơ chế IAM (Identity and Access Management) an toàn, tạm thời, không yêu cầu tạo tài khoản nội bộ Google Cloud, và hỗ trợ tự động thu hồi quyền dựa trên thay đổi từ IdP (Identity Provider) bên đối tác. Đây là best practice cho external workforce theo Google Cloud IAM mới nhất (cập nhật đến 2026, với Workforce Identity Federation v2+ hỗ trợ OIDC/SAML federation mượt mà hơn).

✅ Đáp án đúng và lý do lựa chọn

Đáp án đúng: Create a workforce identity pool and federate the identity pool with the identity provider (IdP) of the temporary partner team.

Lý do:

  • 🛠️ Workforce Identity Pool (trước đây gọi là External Identity Pool) cho phép federate trực tiếp với IdP bên ngoài (như Okta, Azure AD, hoặc SAML/OIDC provider của đối tác) mà không cần tạo tài khoản Google.
  • Khi nhân viên bị removed từ employer's organization, IdP của họ sẽ tự động invalidate token, dẫn đến mất quyền truy cập ngay lập tức trên Google Cloud (qua attribute mapping như google.subject).
  • Phù hợp cho đội tạm thời 18 tháng: Dễ thiết lập, scale, và cleanup (chỉ cần disable pool).
  • Best practice theo Google Cloud Security: Hỗ trợ least privilege, zero-trust, và audit logs đầy đủ.

📘 Tài liệu tham khảo:

📋 Giải thích tất cả các phương án (đúng/sai)

  • ❌ Phương án SAI: Create a temporary username and password for the temporary partner team members. Auto-clean the usernames and passwords after the work engagement has ended.
    Giải thích: Không an toàn vì sử dụng static credentials (username/password) dễ bị leak, không hỗ trợ MFA tự động, và "auto-clean" sau 18 tháng không tự động theo removal từ employer (phải thủ công). Vi phạm nguyên tắc short-lived credentials của Google Cloud IAM. Rủi ro cao về shared accounts.

  • ✅ Phương án ĐÚNG: Create a workforce identity pool and federate the identity pool with the identity provider (IdP) of the temporary partner team.
    Giải thích: Như đã nêu ở trên – tự động thu hồi quyền qua federation, hỗ trợ JWT/OIDC tokens ngắn hạn (15-60 phút), tích hợp IAM policies để bind roles (như roles/viewer trên project). Hoàn hảo cho temporary external teams.

  • ❌ Phương án SAI: Implement just-in-time privileged access to Google Cloud for the temporary partner team.
    Giải thích: JIT (Just-In-Time) như Privileged Access Manager (PAM) hoặc IAM Recommender chỉ cấp quyền tạm thời dựa trên request thủ công (ví dụ: 1-4 giờ), không liên kết với IdP external của đối tác. Không đảm bảo tự động mất quyền khi removed từ employer, và phức tạp cho đội lớn/small team.

  • ❌ Phương án SAI: Add the identities of the temporary partner team members to your identity provider (IdP).
    Giải thích: Việc thêm identities vào IdP nội bộ (như Google Workspace hoặc Cloud Identity) yêu cầu just-in-time provisioning (SCIM), tạo user accounts vĩnh viễn trong org bạn. Không tự động remove khi họ bị loại từ employer (phải sync thủ công hoặc script), tăng rủi ro orphan accounts và vi phạm separation of duties.

🛡️ Kết luận & Recommendation: Sử dụng Workforce Identity Federation là giải pháp zero-trust, scalable nhất cho Google Cloud (không liên quan AWS dù đề cập nhầm). Để implement: Tạo pool qua gcloud iam workforce-pools create, config provider, map attributes, và bind IAM roles. Test với gcloud auth login --cred-file!

Câu 343
Your organization has an internet-facing application behind a load balancer. Your regulators require end-to-end encryption of user login credentials. You must implement this requirement. What should you do?
  1. A Generate a symmetric key with Cloud KMS. Encrypt client-side user credentials by using the symmetric key.
  2. B Concatenate the credential with a timestamp. Submit the timestamp and hashed value of credentials to the network.
  3. C Deploy the TLS certificate at Google Cloud Global HTTPs Load Balancer, and submit the user credentials through HTTPs.
  4. D Generate an asymmetric key with Cloud KMS. Encrypt client-side user credentials using the public key.
Xem giải thích

🧩 Phân tích nội dung câu hỏi

Câu hỏi mô tả một ứng dụng hướng ra internet (internet-facing) được đặt sau một load balancer. Yêu cầu chính từ cơ quan quản lý (regulators) là phải thực hiện mã hóa end-to-end (end-to-end encryption) cho thông tin đăng nhập của người dùng (user login credentials). Điều này có nghĩa là dữ liệu credentials phải được bảo vệ mã hóa từ client (trình duyệt/người dùng) đến server cuối cùng, tránh lộ thông tin trên đường truyền mạng.
📌 Bối cảnh: Ứng dụng sử dụng load balancer của Google Cloud (dựa trên các lựa chọn đề cập Cloud KMS và Global HTTPS Load Balancer), không phải AWS. Mục tiêu là triển khai giải pháp mã hóa an toàn, tuân thủ quy định, sử dụng các dịch vụ GCP mới nhất (cập nhật đến 2026, với Global HTTPS Load Balancer hỗ trợ TLS 1.3 và certificate management qua Google-managed hoặc self-managed certs).

✅ Đáp án đúng và lý do lựa chọn

Đáp án đúng: Deploy the TLS certificate at Google Cloud Global HTTPs Load Balancer, and submit the user credentials through HTTPs.

Lý do chi tiết 🛡️:

  • Giải pháp này triển khai TLS/HTTPS ngay tại Google Cloud Global HTTPS Load Balancer (phiên bản mới nhất hỗ trợ premium tier với TLS offloading, QUIC/HTTP/3). Credentials được mã hóa end-to-end từ client đến load balancer qua HTTPS, ngăn chặn eavesdropping (nghe lén) trên mạng công khai.
  • Load balancer xử lý TLS termination, sau đó forward traffic nội bộ (có thể mã hóa thêm bằng mTLS nếu cần). Đây là best practice chuẩn cho ứng dụng internet-facing, tuân thủ PCI-DSS, GDPR, HIPAA về bảo vệ credentials.
  • Không cần client-side custom encryption phức tạp, dễ triển khai với Google-managed SSL certificates hoặc upload custom certs.
    📘 Tài liệu tham khảo: Google Cloud HTTPS Load Balancing (cập nhật 2025-2026, hỗ trợ automatic cert provisioning qua Certificate Manager).

❌ Phân tích tất cả các phương án

Dưới đây là giải thích từng phương án một cách chi tiết, chỉ rõ lý do đúng/sai dựa trên nguyên tắc bảo mật GCP và best practices mã hóa end-to-end. Tôi giữ nguyên nội dung phương án bằng tiếng Anh gốc.

  • Phương án SAI: Generate a symmetric key with Cloud KMS. Encrypt client-side user credentials by using the symmetric key.
    ❌ Lý do sai: Cloud KMS (Key Management Service) chỉ cho phép server-side encryption (asymmetric keys hoặc symmetric cho dịch vụ GCP), không hỗ trợ client-side symmetric encryption trực tiếp vì symmetric key không thể chia sẻ an toàn với client (dẫn đến key exposure). Client encrypt credentials sẽ yêu cầu phân phối key, vi phạm end-to-end (key lộ trên client). Không khả thi và không phải giải pháp chuẩn cho login. 🧨 Rủi ro: Key compromise toàn bộ hệ thống.

  • Phương án SAI: Concatenate the credential with a timestamp. Submit the timestamp and hashed value of credentials to the network.
    ❌ Lý do sai: Hashing (ví dụ SHA-256) không phải encryption – hash là one-way, không thể decrypt để verify login (server cần plaintext hoặc salted hash). Timestamp chống replay attack nhưng vẫn gửi qua HTTP (không mã hóa), credentials dễ bị MITM attack. Không đáp ứng end-to-end encryption vì dữ liệu vẫn plain trên wire. 🧩 Không phù hợp quy định regulators yêu cầu encryption thực thụ.

  • Phương án ĐÚNG (như đã phân tích ở trên): Deploy the TLS certificate at Google Cloud Global HTTPs Load Balancer, and submit the user credentials through HTTPs.
    ✅ Xác nhận lại: Đây là giải pháp tối ưu, đơn giản và an toàn nhất, mã hóa toàn bộ traffic từ client đến LB bằng TLS 1.3 (hỗ trợ forward secrecy). Dễ scale với Auto Scaling Groups và tích hợp IAM.

  • Phương án SAI: Generate an asymmetric key with Cloud KMS. Encrypt client-side user credentials using the public key.
    ❌ Lý do sai: Mặc dù Cloud KMS hỗ trợ asymmetric keys (RSA/ECDSA từ 2024+), client-side encryption yêu cầu distribute public key an toàn (khó maintain, update). Server phải decrypt bằng private key (stored in KMS), nhưng không phải end-to-end chuẩn cho login vì chỉ encrypt payload, không bảo vệ toàn bộ connection (vẫn cần HTTPS wrapper). Phức tạp hơn TLS, dễ lỗi implement, không khuyến nghị cho web apps. 🛠️ Best practice: Dùng HTTPS thay vì custom crypto.

📚 Tài liệu tham khảo bổ sung

Giải pháp này đảm bảo tuân thủ 100% mà không over-engineer! 🚀

Câu 344
Your organization heavily utilizes serverless applications while prioritizing security best practices. You are responsible for enforcing image provenance and compliance with security standards before deployment. You leverage Cloud Build as your continuous integration and continuous deployment (CI/CD) tool for building container images. You must configure Binary Authorization to ensure that only images built by your Cloud Build pipeline are deployed and that the images pass security standard compliance checks. What should you do?
  1. A Create a Binary Authorization attestor that uses a scanner to assess source code management repositories. Deploy images only if the attestor validates results against a security policy.
  2. B Create a Binary Authorization attestor that utilizes a scanner to evaluate container image build processes. Define a policy that requires deployment of images only if this attestation is present.
  3. C Create a Binary Authorization attestor that retrieves the Cloud Build build ID of the container image. Configure a policy to allow deployment only if there's a matching build ID attestation.
  4. D Utilize a custom Security Health Analytics module to create a policy. Enforce the policy through Binary Authorization to prevent deployment of images that do not meet predefined security standards.
Xem giải thích

🧩 Phân tích nội dung câu hỏi

Câu hỏi tập trung vào việc triển khai bảo mật cho serverless applications sử dụng container images trong Google Cloud Platform (GCP). Tổ chức ưu tiên security best practices, đặc biệt là image provenance (nguồn gốc hình ảnh container, chứng minh image được build từ pipeline cụ thể) và tuân thủ security standards (kiểm tra compliance trước khi deploy).

✅ Yêu cầu chính:

  • Sử dụng Cloud Build làm công cụ CI/CD để build container images.
  • Cấu hình Binary Authorization (một tính năng của GCP để kiểm soát admission control trên GKE, ngăn deploy image không được authorize).
  • Đảm bảo chỉ deploy images được build bởi Cloud Build pipeline của bạn (provenance) VÀ images phải pass security compliance checks (ví dụ: vulnerability scan, policy checks trong pipeline).

🛠️ Bối cảnh: Binary Authorization hoạt động bằng cách kiểm tra attestations (chữ ký số và metadata) gắn trên image. Attestor xác thực attestation, policy định nghĩa yêu cầu attestation phải có trước khi deploy lên GKE clusters. Cloud Build hỗ trợ tự động generate attestation với build provenance (bao gồm build ID, repo source, steps thực hiện) khi cấu hình đúng.

📘 Kiến thức cập nhật (2024-2026): Theo tài liệu GCP mới nhất (Binary Authorization v1beta1, tích hợp SLSA framework cho supply chain security), Cloud Build (v116+) hỗ trợ PKSA (Private Key as Secret Attestor) hoặc user attestors để ký image với build metadata. Security checks thường tích hợp trong Cloud Build steps (sử dụng tools như Container Analysis, Trivy, hoặc custom scanners), chỉ ký attestation nếu pass.

Nguồn tham khảo:

✅ Đáp án đúng: Lựa chọn thứ 3

Create a Binary Authorization attestor that retrieves the Cloud Build build ID of the container image. Configure a policy to allow deployment only if there's a matching build ID attestation.

Lý do lựa chọn 🏆:

  • Đây là cách chuẩn và trực tiếp để enforce image provenance từ Cloud Build pipeline. Cloud Build tự động embed build ID (unique identifier của build job) vào attestation khi ký image. Attestor verify (retrieve/check) build ID từ attestation payload, đảm bảo image chỉ từ pipeline của bạn.
  • Security compliance được đảm bảo gián tiếp: Trong Cloud Build pipeline (cloudbuild.yaml), bạn thêm steps kiểm tra security (vulnerability scan, compliance checks). Chỉ nếu pass, mới proceed build + ký attestation. Nếu fail, không có attestation → Binary Authz block deploy.
  • Phù hợp best practice GCP: Không cần custom scanner phức tạp, tận dụng native integration. Policy cho phép require exact matching build ID để tránh fake attestations.
  • ✅ Hiệu quả cao, scalable cho serverless/CI/CD.

❌ Giải thích tất cả các phương án

  • Create a Binary Authorization attestor that uses a scanner to assess source code management repositories. Deploy images only if the attestor validates results against a security policy.
    ❌ Sai: Phương án này tập trung scan source code repositories (như Cloud Source Repositories), không liên quan đến container image provenance hoặc build process. Binary Authorization verify attestations trên image, không phải source code. Scanner source (như Secret Scanner) hữu ích cho early detection nhưng không enforce tại deploy time. Không đảm bảo "built by Cloud Build".

  • Create a Binary Authorization attestor that utilizes a scanner to evaluate container image build processes. Define a policy that requires deployment of images only if this attestation is present.
    ❌ Sai: Mặc dù có nhắc "scanner" (có thể ám chỉ vulnerability scan), nhưng "evaluate container image build processes" không phải thuật ngữ chuẩn GCP. Scanner thường scan image content (vulnerabilities, misconfigs), không "build processes" (đó là provenance). Không đề cập cụ thể Cloud Build, không enforce provenance rõ ràng. Thiếu tính chính xác cho yêu cầu "only images built by your Cloud Build pipeline".

  • Create a Binary Authorization attestor that retrieves the Cloud Build build ID of the container image. Configure a policy to allow deployment only if there's a matching build ID attestation.
    ✅ Đúng (như đã giải thích ở trên). Hoàn hảo match yêu cầu provenance + security via pipeline.

  • Utilize a custom Security Health Analytics module to create a policy. Enforce the policy through Binary Authorization to prevent deployment of images that do not meet predefined security standards.
    ❌ Sai: Security Health Analytics (SHA) dùng cho monitoring security posture (CSPM) trên resources (VM, GKE), hỗ trợ custom modules cho checks định kỳ. Không tích hợp trực tiếp tạo attestations cho Binary Authorization (chỉ monitoring, không admission control). Không handle image provenance hoặc Cloud Build. Sử dụng SHA sẽ không block deploy real-time.

Câu 345
Your organization operates in a highly regulated industry and uses multiple Google Cloud services. You need to identify potential risks to regulatory compliance. Which situation introduces the greatest risk?
  1. A The security team mandates the use of customer-managed encryption keys (CMEK) for all data classified as sensitive.
  2. B Sensitive data is stored in a Cloud Storage bucket with the uniform bucket-level access setting enabled.
  3. C The audit team needs access to Cloud Audit Logs related to managed services like BigQuery.
  4. D Principals have broad IAM roles allowing the creation and management of Compute Engine VMs without a pre-defined hardening process.
Xem giải thích

🧩 Phân tích chi tiết nội dung câu hỏi

Câu hỏi tập trung vào việc xác định rủi ro lớn nhất đối với tuân thủ quy định (regulatory compliance) trong một tổ chức hoạt động trong ngành công nghiệp được quy định nghiêm ngặt (highly regulated industry), sử dụng nhiều dịch vụ Google Cloud. Mục tiêu là tìm tình huống gây rủi ro cao nhất có thể dẫn đến vi phạm các tiêu chuẩn tuân thủ như GDPR, HIPAA, PCI DSS hoặc các quy định tương tự.

✅ Rủi ro ở đây chủ yếu liên quan đến bảo mật, kiểm soát truy cập (IAM), mã hóa dữ liệu, ghi log kiểm toán và quy trình hardening cho tài nguyên tính toán. Trong môi trường Google Cloud, tuân thủ quy định đòi hỏi phải giảm thiểu các lỗ hổng có thể dẫn đến lộ dữ liệu, truy cập trái phép hoặc cấu hình không an toàn. Kiến thức cập nhật đến năm 2026 (dựa trên Google Cloud Security best practices phiên bản mới nhất): Google khuyến nghị sử dụng các tính năng như CMEK, UBLA, Audit Logs và OS Login/ hardening baselines để đảm bảo compliance.

📘 Tài liệu tham khảo:

✅ Đáp án đúng và lý do lựa chọn

Principals have broad IAM roles allowing the creation and management of Compute Engine VMs without a pre-defined hardening process.

🛠️ Lý do: Đây là tình huống gây rủi ro lớn nhất vì cấp IAM roles rộng (như roles/compute.instanceAdmin) cho phép người dùng tạo và quản lý VM mà không có quy trình hardening chuẩn hóa trước (pre-defined hardening process). Điều này dẫn đến VM có thể được triển khai với cấu hình yếu (ví dụ: OS không patch, firewall mở, tài khoản mặc định yếu), dễ bị tấn công, lộ dữ liệu nhạy cảm – vi phạm nghiêm trọng các quy định compliance yêu cầu baseline security (như CIS Benchmarks). Google Cloud khuyến nghị sử dụng OS hardening scripts, shielded VMs và policies như Organization Policies để bắt buộc hardening, tránh "shadow IT" hoặc misconfigurations. Các lựa chọn khác đều là thực hành tốt hoặc cần thiết, không phải rủi ro.

📋 Giải thích tất cả các phương án

Dưới đây là phân tích từng lựa chọn một cách chi tiết:

  • ❌ The security team mandates the use of customer-managed encryption keys (CMEK) for all data classified as sensitive.
    🧩 Phân tích sai: Đây là thực hành tốt và giảm rủi ro, không phải rủi ro. CMEK cho phép tổ chức kiểm soát hoàn toàn khóa mã hóa (qua Cloud KMS), đảm bảo dữ liệu nhạy cảm luôn được mã hóa tại rest/transit theo các quy định như GDPR/HIPAA. Google Cloud mặc định server-side encryption nhưng CMEK tăng cường compliance bằng cách tránh khóa do Google quản lý. (Cập nhật 2026: CMEK hỗ trợ automatic key rotation).

  • ❌ Sensitive data is stored in a Cloud Storage bucket with the uniform bucket-level access setting enabled.
    🧩 Phân tích sai: Đây là tính năng bảo mật khuyến nghị, giảm rủi ro ACL phức tạp. Uniform Bucket-Level Access (UBLA) loại bỏ ACL legacy, chỉ dùng IAM policies để kiểm soát truy cập, giúp đơn giản hóa audit và tránh over-privileges. Lý tưởng cho dữ liệu nhạy cảm trong ngành regulated, tuân thủ principle of least privilege. (Cập nhật 2026: UBLA là mặc định mới cho buckets mới).

  • ❌ The audit team needs access to Cloud Audit Logs related to managed services like BigQuery.
    🧩 Phân tích sai: Đây là yêu cầu cần thiết cho compliance, không phải rủi ro. Cloud Audit Logs ghi lại tất cả hành động admin/data access trên dịch vụ managed như BigQuery, giúp audit team kiểm tra và báo cáo tuân thủ (ví dụ: Data Access audit logs). Google khuyến nghị cấp roles/logging.viewer cho audit team qua log sinks hoặc Pub/Sub. Thiếu logs mới là rủi ro thực sự.

  • ✅ Principals have broad IAM roles allowing the creation and management of Compute Engine VMs without a pre-defined hardening process.
    🛠️ Phân tích đúng: Như đã giải thích ở trên, rủi ro cao nhất do thiếu kiểm soát hardening dẫn đến VM dễ bị khai thác (ví dụ: ransomware, data exfiltration), vi phạm compliance nghiêm trọng. Best practice: Sử dụng IAM conditions, custom roles hạn chế, và baselines như Project Oak hoặc CIS hardening guides để bắt buộc quy trình.

Câu 346
Your multinational organization is undergoing rapid expansion within Google Cloud. New teams and projects are added frequently. You are concerned about the potential for inconsistent security policy application and permission sprawl across the organization. You must enforce consistent standards while maintaining the autonomy of regional teams. You need to design a strategy to effectively manage IAM and organization policies at scale, ensuring security and administrative efficiency. What should you do?
  1. A Create detailed organization-wide policies for common scenarios. Instruct teams to apply the policies carefully at the project and resource level as needed.
  2. B Delegate the creation of organization policies to regional teams. Centrally review these policies for compliance before deployment.
  3. C Define a small set of essential organization policies. Supplement these policies with a library of optional policy templates for teams to leverage as needed.
  4. D Use a hierarchical structure of folders. Implement template-based organization policies that cascade down, allowing limited customization by regional teams.
Xem giải thích

🧩 Phân tích chi tiết câu hỏi trắc nghiệm

✅ Giải thích nội dung câu hỏi:
Câu hỏi mô tả một tổ chức đa quốc gia đang mở rộng nhanh chóng trên Google Cloud Platform (GCP), với các đội ngũ và dự án mới được thêm thường xuyên. Vấn đề chính là lo ngại về sự không nhất quán trong áp dụng chính sách bảo mật (inconsistent security policy application) và sự lan man quyền hạn (permission sprawl) trên toàn tổ chức. Yêu cầu là thiết kế chiến lược quản lý IAM (Identity and Access Management) và organization policies ở quy mô lớn, đảm bảo tiêu chuẩn nhất quán đồng thời duy trì quyền tự chủ cho các đội ngũ khu vực. Mục tiêu là cân bằng giữa bảo mật, hiệu quả quản trị và tính linh hoạt. Đây là tình huống thực tế trong GCP khi tổ chức lớn cần cấu trúc phân cấp để tránh hỗn loạn quyền hạn (theo best practices của Google Cloud đến năm 2026).

✅ Đáp án đúng

Use a hierarchical structure of folders. Implement template-based organization policies that cascade down, allowing limited customization by regional teams.

Lý do lựa chọn:
Phương án này là best practice trong GCP cho quản lý quy mô lớn. Sử dụng cấu trúc phân cấp folders (hierarchical folders) để tổ chức projects theo khu vực/đội ngũ, giúp policies cascading (lan tỏa xuống dưới) từ tổ chức (organization) → folder → project. Kết hợp template-based policies (chính sách dựa trên mẫu) cho phép tùy chỉnh hạn chế ở cấp thấp hơn, đảm bảo nhất quán toàn cục mà vẫn linh hoạt. Điều này ngăn chặn permission sprawl, dễ quản lý IAM tại scale, và phù hợp với mô hình Resource Hierarchy mới nhất (cập nhật 2025-2026).

📘 Tài liệu tham khảo:

🛠️ Giải thích tất cả các phương án

  • ❌ [SAI] Create detailed organization-wide policies for common scenarios. Instruct teams to apply the policies carefully at the project and resource level as needed.
    Phương án này không hiệu quả vì tạo policies chi tiết toàn tổ chức dẫn đến quản lý phức tạp, khó bảo trì khi tổ chức mở rộng. Việc hướng dẫn teams tự áp dụng ở project/resource level gây không nhất quán và tăng rủi ro permission sprawl, vi phạm nguyên tắc "enforce at higher levels" trong GCP. Không hỗ trợ tự chủ khu vực một cách có cấu trúc.

  • ❌ [SAI] Delegate the creation of organization policies to regional teams. Centrally review these policies for compliance before deployment.
    Gây mất kiểm soát vì ủy quyền tạo policies cho teams khu vực dẫn đến đa dạng hóa không mong muốn, khó review trung tâm ở scale lớn (review thủ công tốn kém). Không tận dụng hierarchy cascading, dễ vi phạm security standards toàn cục theo tài liệu GCP (khuyến cáo central enforcement).

  • ❌ [SAI] Define a small set of essential organization policies. Supplement these policies with a library of optional policy templates for teams to leverage as needed.
    Chỉ giải quyết một phần, vì bộ policies cốt lõi nhỏ + thư viện tùy chọn không enforce bắt buộc, dẫn đến teams bỏ qua hoặc áp dụng không đồng đều. Thiếu cấu trúc hierarchy, không cascade tự động, không giải quyết permission sprawl hiệu quả ở tổ chức đa quốc gia (theo best practices 2026, cần hierarchy + constraints cascading).

  • ✅ [ĐÚNG] Use a hierarchical structure of folders. Implement template-based organization policies that cascade down, allowing limited customization by regional teams.
    Như đã giải thích ở trên, đây là giải pháp tối ưu tận dụng Resource Manager hierarchy (org → folders → projects), policies cascade với override hạn chế (ví dụ: boolean/list policies). Đảm bảo consistency, giảm admin overhead, hỗ trợ IAM least privilege tại scale.

🛡️ Kết luận: Chiến lược này tuân thủ Google Cloud Security Command Center và BeyondCorp principles, giúp tổ chức mở rộng an toàn đến 2026!

Câu 347
A security audit uncovered several inconsistencies in your project's Identity and Access Management (IAM) configuration. Some service accounts have overly permissive roles, and a few external collaborators have more access than necessary. You need to gain detailed visibility into changes to IAM policies, user activity, service account behavior, and access to sensitive projects. What should you do?
  1. A Configure Google Cloud Functions to be triggered by changes to IAM policies. Analyze changes by using the policy simulator, send alerts upon risky modifications, and store event details.
  2. B Enable the metrics explorer in Cloud Monitoring to follow the service account authentication events and build alerts linked on it.
  3. C Use Cloud Audit Logs. Create log export sinks to send these logs to a security information and event management (SIEM) solution for correlation with other event sources.
  4. D Deploy the OS Config Management agent to your VMs. Use OS Config Management to create patch management jobs and monitor system modifications.
Xem giải thích

🧩 Phân tích chi tiết câu hỏi

📖 Nội dung câu hỏi:
Câu hỏi mô tả một tình huống kiểm toán bảo mật (security audit) phát hiện nhiều bất thường trong cấu hình Identity and Access Management (IAM) của dự án Google Cloud. Cụ thể:

  • Một số service accounts được gán roles quá permissive (quá rộng rãi, cho phép nhiều quyền hơn cần thiết).
  • Một số external collaborators (người cộng tác bên ngoài) có quyền truy cập thừa.
    Yêu cầu chính: Cần có tầm nhìn chi tiết (detailed visibility) vào:
    • Các thay đổi đối với IAM policies.
    • Hoạt động của user (user activity).
    • Hành vi của service accounts (service account behavior).
    • Truy cập vào các dự án nhạy cảm (access to sensitive projects).
      Mục tiêu là giám sát toàn diện để phát hiện và khắc phục rủi ro IAM. Đây là vấn đề phổ biến trong Google Cloud, nơi IAM là nền tảng quản lý quyền truy cập. ✅

🎯 Đáp án đúng:
Use Cloud Audit Logs. Create log export sinks to send these logs to a security information and event management (SIEM) solution for correlation with other event sources.

Lý do chọn đáp án đúng (bằng tiếng Việt):
✅ Cloud Audit Logs là giải pháp chính thức và mạnh mẽ nhất của Google Cloud để ghi lại tất cả hoạt động IAM, bao gồm thay đổi policy, hoạt động user/service account, và truy cập dự án. Nó cung cấp visibility chi tiết theo thời gian thực, với các loại log như Admin Activity, Data Access, Policy Denied, và System Event – phù hợp hoàn hảo với yêu cầu.

  • Tạo log export sinks để xuất log sang SIEM (như Splunk, Chronicle) giúp tương quan (correlation) với các nguồn sự kiện khác, hỗ trợ phân tích sâu và phát hiện bất thường.
    Đây là best practice theo tài liệu Google Cloud mới nhất (cập nhật 2025-2026), hỗ trợ Cloud Logging v2 với tích hợp AI-based anomaly detection. 🛡️

📘 Tài liệu tham khảo:

🔍 Giải thích tất cả các phương án (đúng/sai)

  • ❌ Phương án SAI: Configure Google Cloud Functions to be triggered by changes to IAM policies. Analyze changes by using the policy simulator, send alerts upon risky modifications, and store event details.
    🧩 Phân tích: Phương án này không phù hợp vì Cloud Functions chỉ dùng để xử lý sự kiện tùy chỉnh (event-driven), không phải công cụ giám sát IAM toàn diện. Policy Simulator chỉ mô phỏng quyền (không ghi log thực tế), thiếu visibility vào user/service account activity và truy cập dự án. Không cung cấp log chi tiết lịch sử, chỉ phản ứng sau thay đổi – không giải quyết gốc rễ audit.

  • ❌ Phương án SAI: Enable the metrics explorer in Cloud Monitoring to follow the service account authentication events and build alerts linked on it.
    🧩 Phân tích: Cloud Monitoring Metrics Explorer theo dõi metrics số liệu (như số lượng auth events), không phải log chi tiết về thay đổi IAM policy, user activity hay hành vi service account. Nó chỉ cảnh báo ngưỡng (threshold-based), thiếu ngữ cảnh sâu (who/what/when) và không hỗ trợ export sang SIEM cho correlation. Không đủ cho security audit toàn diện.

  • ✅ Phương án ĐÚNG: Use Cloud Audit Logs. Create log export sinks to send these logs to a security information and event management (SIEM) solution for correlation with other event sources.
    🛠️ Phân tích chi tiết lý do đúng: Như đã giải thích ở trên, đây là giải pháp native, chi phí thấp, scalable, ghi log không thể xóa (immutable) cho mọi hoạt động IAM. Export sinks hỗ trợ BigQuery/Cloud Storage/SIEM với filtering chính xác, cập nhật 2026 tích hợp Gemini AI cho threat detection tự động. Hoàn hảo khớp yêu cầu!

  • ❌ Phương án SAI: Deploy the OS Config Management agent to your VMs. Use OS Config Management to create patch management jobs and monitor system modifications.
    🧩 Phân tích: OS Config Management (nay là OS Management trong 2025+) chỉ quản lý patch và config OS trên VM (như Ubuntu patches), không liên quan đến IAM policies hay service accounts (là cấp cloud, không phải OS). Không giám sát user activity hay dự án nhạy cảm – hoàn toàn lạc đề với security audit IAM.

Câu 348
You manage multiple internal-only applications that are hosted within different Google Cloud projects. You are deploying a new application that requires external internet access. To maintain security, you want to clearly separate this new application from internal systems. Your solution must have effective security isolation for the new externally-facing application. What should you do?
  1. A Deploy the application within the same project as an internal application. Use a Shared VPC model to manage network configurations.
  2. B Place the application in the same project as an existing internal application, and adjust firewall rules to allow external traffic.
  3. C Create a VPC Service Controls perimeter, and place the new application’s project within that perimeter.
  4. D Create a new project for the application, and use VPC Network Peering to access necessary resources in the internal projects.
Xem giải thích

🧩 Phân tích chi tiết nội dung câu hỏi

Câu hỏi tập trung vào bảo mật và cách ly mạng trong Google Cloud Platform (GCP). Bạn đang quản lý nhiều ứng dụng chỉ nội bộ (internal-only) được host trên các project Google Cloud khác nhau. Bây giờ, cần deploy một ứng dụng mới yêu cầu truy cập internet bên ngoài (external internet access), nhưng phải tách biệt rõ ràng khỏi hệ thống nội bộ để đảm bảo cách ly bảo mật hiệu quả (effective security isolation).

📌 Yêu cầu chính:

  • Giữ an toàn cho các app nội bộ (không expose ra ngoài).
  • Cho phép app mới truy cập internet.
  • Đảm bảo isolation mạnh mẽ, tránh rủi ro lan truyền từ app external sang internal (như tấn công từ internet).

🛠️ Bối cảnh GCP: Sử dụng các tính năng như Project riêng biệt, VPC Peering, Shared VPC, Firewall Rules, VPC Service Controls (VPC-SC) để quản lý network và security. Kiến thức dựa trên tài liệu GCP cập nhật đến 2026 (không có thay đổi lớn về core features này).

✅ Đáp án đúng và lý do lựa chọn

Đáp án đúng: Create a new project for the application, and use VPC Network Peering to access necessary resources in the internal projects.

Lý do 🏆:

  • Tạo project mới riêng biệt cho app external giúp cách ly hoàn toàn về mặt tổ chức và IAM (Identity and Access Management), tránh chia sẻ resources với internal apps.
  • VPC Network Peering cho phép app mới kết nối an toàn với VPC của các project internal mà không cần merge network, giữ isolation (không route transit traffic). App external có thể enable internet access qua Cloud NAT/Public IP, trong khi internal projects giữ private.
  • Đáp ứng security isolation hiệu quả: Giảm bề mặt tấn công, dễ audit và apply firewall riêng. Đây là best practice theo Google Cloud Well-Architected Framework (Security pillar).

📘 Tài liệu tham khảo:

❌ Phân tích tất cả các phương án

Dưới đây là phân tích từng lựa chọn (giữ nguyên text gốc tiếng Anh), đánh dấu đúng/sai với lý do chi tiết bằng tiếng Việt:

  • ❌ [SAI] Deploy the application within the same project as an internal application. Use a Shared VPC model to manage network configurations.
    Lý do sai 🚫: Deploy cùng project với internal app phá vỡ isolation vì chia sẻ IAM, resources và metadata. Shared VPC chỉ giúp manage network tập trung nhưng không tách biệt security boundary – app external có thể expose rủi ro (như misconfig firewall) lan sang internal. Không phù hợp với yêu cầu "clearly separate".

  • ❌ [SAI] Place the application in the same project as an existing internal application, and adjust firewall rules to allow external traffic.
    Lý do sai 🚫: Cùng project không có isolation thực sự (shared IAM, logging, configs). Chỉ adjust firewall tăng rủi ro expose toàn project, dễ bị tấn công từ internet ảnh hưởng internal apps. Vi phạm nguyên tắc least privilege và separation of concerns.

  • ❌ [SAI] Create a VPC Service Controls perimeter, and place the new application’s project within that perimeter.
    Lý do sai 🚫: VPC Service Controls (VPC-SC) dùng để protect data exfiltration từ internal resources, không phải isolate external-facing app. Đặt app mới cùng perimeter với internal sẽ kéo theo rủi ro (VPC-SC chặn egress nhưng external app cần internet access → conflict). Nên dùng VPC-SC cho internal perimeter riêng, không mix với external.

🧠 Tóm tắt lợi ích best practice: Sử dụng multi-project + peering là cách scaleable và secure nhất cho hybrid internal-external workloads trong GCP (không thay đổi đến 2026). Nếu cần advanced, kết hợp Private Service Connect thay peering truyền thống.

Câu 349
You work for an ecommerce company that stores sensitive customer data across multiple Google Cloud regions. The development team has built a new 3-tier application to process orders and must integrate the application into the production environment.

You must design the network architecture to ensure strong security boundaries and isolation for the new application, facilitate secure remote maintenance by authorized third-party vendors, and follow the principle of least privilege. What should you do?
  1. A Create separate VPC networks for each tier. Use VPC peering between application tiers and other required VPCs. Provide vendors with SSH keys and root access only to the instances within the VPC for maintenance purposes.
  2. B Create a single VPC network and create different subnets for each tier. Create a new Google project specifically for the third-party vendors and grant the network admin role to the vendors. Deploy a VPN appliance and rely on the vendors’ configurations to secure third-party access.
  3. C Create separate VPC networks for each tier. Use VPC peering between application tiers and other required VPCs. Enable Identity-Aware Proxy (IAP) for remote access to management resources, limiting access to authorized vendors.
  4. D Create a single VPC network and create different subnets for each tier. Create a new Google project specifically for the third-party vendors. Grant the vendors ownership of that project and the ability to modify the Shared VPC configuration.
Xem giải thích

🧩 Phân tích nội dung câu hỏi

Câu hỏi mô tả tình huống bạn làm việc cho một công ty thương mại điện tử lưu trữ dữ liệu khách hàng nhạy cảm trên nhiều vùng (regions) của Google Cloud. Nhóm phát triển đã xây dựng ứng dụng 3-tier mới (thường bao gồm presentation tier, application tier, và data tier) để xử lý đơn hàng, và cần tích hợp vào môi trường production.
Yêu cầu chính cần thiết kế mạng (network architecture):

  • Đảm bảo ranh giới bảo mật mạnh mẽ và cách ly (strong security boundaries and isolation) cho ứng dụng mới.
  • Hỗ trợ bảo trì từ xa an toàn cho các nhà cung cấp thứ ba (third-party vendors) được ủy quyền.
  • Tuân thủ nguyên tắc least privilege (quyền hạn tối thiểu).
    📘 Bối cảnh kiến thức Google Cloud (cập nhật đến 2026): Trong Google Cloud, ứng dụng 3-tier cần cách ly tiers để tránh lateral movement (di chuyển ngang tấn công). Sử dụng VPC riêng biệt cho từng tier, kết nối bằng VPC Peering (hoặc Shared VPC cho multi-project). IAP (Identity-Aware Proxy) là giải pháp zero-trust cho truy cập từ xa mà không cần mở port SSH/RDP, tích hợp IAM để kiểm soát chính xác.

Nguồn tham khảo:

✅ Đáp án đúng và lý do lựa chọn

Đáp án đúng: Create separate VPC networks for each tier. Use VPC peering between application tiers and other required VPCs. Enable Identity-Aware Proxy (IAP) for remote access to management resources, limiting access to authorized vendors.

Lý do chi tiết:

  • 🛡️ Cách ly mạnh mẽ: Tạo VPC riêng cho từng tier (presentation, app, data) đảm bảo isolation, ngăn chặn tấn công lan ngang – best practice của Google Cloud cho môi trường production nhạy cảm.
  • 🔗 Kết nối an toàn: VPC Peering cho phép giao tiếp giữa các VPC mà không cần gateway, giữ traffic private.
  • 🗝️ Truy cập từ xa theo least privilege: IAP sử dụng IAM policies để xác thực vendors qua Google identity, không cần SSH keys/VPN mở port. Chỉ cho phép truy cập cụ thể vào resources quản lý (như bastion hosts), hỗ trợ audit logs đầy đủ.
  • 📈 Tuân thủ hoàn hảo: Giải pháp zero-trust, scalable multi-region, phù hợp dữ liệu nhạy cảm (PII). Không vi phạm bất kỳ yêu cầu nào.

❌ Giải thích tất cả các phương án (đúng/sai)

  • Phương án 1: Create separate VPC networks for each tier. Use VPC peering between application tiers and other required VPCs. Provide vendors with SSH keys and root access only to the instances within the VPC for maintenance purposes.
    ❌ Sai: Mặc dù VPC riêng và peering đúng cho isolation, nhưng cung cấp SSH keys và root access vi phạm nghiêm trọng least privilege (root có quyền toàn bộ hệ thống, dễ bị lạm dụng). Không an toàn cho third-party, thiếu audit và zero-trust. Rủi ro cao credential leak.

  • Phương án 2: Create a single VPC network and create different subnets for each tier. Create a new Google project specifically for the third-party vendors and grant the network admin role to the vendors. Deploy a VPN appliance and rely on the vendors’ configurations to secure third-party access.
    ❌ Sai: Single VPC với subnets không cung cấp isolation mạnh (traffic có thể lan ngang giữa tiers qua subnet routing). Grant network admin role cho vendors quá rộng (least privilege vi phạm). VPN appliance phụ thuộc config của vendors – không kiểm soát được, rủi ro misconfig cao, không scalable multi-region.

  • Phương án 3 (Đúng – đã giải thích ở trên): ✅ Hoàn hảo, kết hợp isolation + peering + IAP zero-trust.

  • Phương án 4: Create a single VPC network and create different subnets for each tier. Create a new Google project specifically for the third-party vendors. Grant the vendors ownership of that project and the ability to modify the Shared VPC configuration.
    ❌ Sai: Single VPC/subnets thiếu isolation tiers (dễ tấn công lateral). Grant ownership cho project và modify Shared VPC – rủi ro cực cao (vendors có thể thay đổi toàn bộ network config, ảnh hưởng production). Vi phạm least privilege nghiêm trọng, không an toàn cho dữ liệu nhạy cảm.

🛡️ Kết luận khuyến nghị: Ưu tiên thiết kế này để đạt PCI-DSS/HIPAA compliance trên Google Cloud. Nếu triển khai, kết hợp Cloud Armor cho DDoS và VPC Service Controls cho data exfiltration prevention!

Câu 350
Your organization is implementing separation of duties in a Google Cloud project. A group of developers must deploy new code, but cannot have permission to change network firewall rules. What should you do?
  1. A Assign the network administrator IAM role to all developers. Tell developers not to change firewall settings.
  2. B Use Access Context Manager to create conditions that allow only authorized administrators to change firewall rules based on attributes such as IP address or device security posture.
  3. C Create and assign two custom IAM roles. Assign the deployer role to control Compute Engine and deployment-related permissions. Assign the network administrator role to manage firewall permissions.
  4. D Grant the editor IAM role to the developer group. Explicitly negate any firewall modification permissions by using IAM deny policies.
Xem giải thích

🧩 Phân tích chi tiết nội dung câu hỏi

Câu hỏi tập trung vào việc thực hiện nguyên tắc tách biệt nhiệm vụ (Separation of Duties - SoD) trong một dự án Google Cloud. Tổ chức cần cho phép một nhóm lập trình viên triển khai code mới (deploy new code), nhưng không được phép thay đổi quy tắc tường lửa mạng (network firewall rules).

📌 Mục tiêu chính: Đảm bảo quyền hạn IAM (Identity and Access Management) được phân chia rõ ràng, tránh rủi ro bảo mật khi một người có quá nhiều quyền (ví dụ: developer có thể vô tình hoặc cố ý thay đổi firewall, dẫn đến lỗ hổng). Đây là best practice trong Google Cloud IAM để tuân thủ các tiêu chuẩn như CIS Benchmarks hoặc ISO 27001.

🛠️ Bối cảnh kỹ thuật:

  • Developer cần quyền liên quan đến Compute Engine (như tạo VM, deploy app) và các dịch vụ triển khai (Cloud Run, GKE, v.v.).
  • Firewall rules thuộc VPC Firewall (Compute Engine), cần quyền riêng như compute.firewalls.*.
  • Giải pháp phải sử dụng IAM roles để enforce SoD một cách tự động, không dựa vào "niềm tin".

✅ Đáp án đúng và lý do lựa chọn

Đáp án đúng: Create and assign two custom IAM roles. Assign the deployer role to control Compute Engine and deployment-related permissions. Assign the network administrator role to manage firewall permissions.

Lý do chọn đáp án này 🏆:

  • Tạo custom IAM roles là cách tối ưu và chính xác nhất để tách biệt quyền hạn theo nguyên tắc least privilege (quyền tối thiểu cần thiết).
    • Deployer role: Chỉ cấp quyền Compute Engine cơ bản (ví dụ: compute.instances.create, run.services.create) và triển khai, không bao gồm firewall (compute.firewalls.*).
    • Network admin role: Chỉ cấp quyền quản lý firewall và mạng, gán cho nhóm admin riêng.
  • Điều này enforce SoD tự động, developer không thể thay đổi firewall dù cố tình.
  • Theo tài liệu GCP mới nhất (2024-2026), custom roles hỗ trợ đầy đủ permissions granular (hàng nghìn quyền), dễ audit qua IAM Recommender.
  • Nguồn tham khảo: Google Cloud IAM Custom Roles & Best practices for IAM.

📋 Giải thích tất cả các phương án (đúng/sai)

  • [SAI] Assign the network administrator IAM role to all developers. Tell developers not to change firewall settings.
    ❌ Sai vì: Gán role roles/compute.networkAdmin (bao gồm compute.firewalls.*) cho developer vi phạm SoD hoàn toàn. Chỉ "nhắc nhở không thay đổi" là dựa vào niềm tin con người, không enforce tự động – dễ bị lạm dụng hoặc lỗi. Không tuân thủ least privilege. (🔴 Rủi ro cao: Audit thất bại).

  • [SAI] Use Access Context Manager to create conditions that allow only authorized administrators to change firewall rules based on attributes such as IP address or device security posture.
    ❌ Sai vì: Access Context Manager (phần của BeyondCorp Enterprise, cập nhật 2024) dùng cho context-aware access (dựa IP, device posture) với VPC Service Controls hoặc app access, không trực tiếp kiểm soát IAM permissions cho firewall rules. Phức tạp, không thay thế IAM roles cho SoD cơ bản. Developer vẫn có quyền IAM rộng nếu không restrict gốc. (🧩 Không phù hợp: Overhead cao, không granular cho Compute Firewall).

  • [ĐÚNG] Create and assign two custom IAM roles. Assign the deployer role to control Compute Engine and deployment-related permissions. Assign the network administrator role to manage firewall permissions.
    ✅ Đúng vì: Như giải thích trên, tách biệt chính xác deploy (Compute/deploy perms) và network (firewall perms). Custom roles linh hoạt, hỗ trợ tag-based conditions nếu cần. Best practice GCP 2026. (🛠️ Hoàn hảo: Enforce + Audit dễ dàng).

  • [SAI] Grant the editor IAM role to the developer group. Explicitly negate any firewall modification permissions by using IAM deny policies.
    ❌ Sai vì: Role roles/editor quá rộng (hàng nghìn quyền, bao gồm hầu hết dịch vụ), vi phạm least privilege nghiêm trọng. IAM Deny Policies (ra mắt 2023, cập nhật 2025) có thể negate firewall, nhưng vẫn cấp quyền thừa (rủi ro escalation). Không khuyến khích cho SoD – ưu tiên custom roles thay vì "vá" role rộng. (📘 Nguồn: IAM Deny Policies limitations – chỉ dùng khi cần, không thay thế custom roles).

📘 Kết luận và khuyến nghị

  • Best practice bổ sung 🌟: Sử dụng IAM Conditions hoặc tags trên custom roles để tinh chỉnh (ví dụ: chỉ deploy VM có tag "dev"). Kiểm tra qua IAM Policy Analyzer và Policy Simulator.
  • Nguồn chính thức (cập nhật 2026):