Ngân hàng đề — Google Cloud Professional Cloud Security Engineer
Tìm thấy 395 câu.
You attempt to grant access to a project in the “Apps” folder to the user testuser@terramearth.com.
What is the result of your action and why?
- A The action succeeds because members from both organizations, terramearth.com or flowlogistic.com, are allowed on projects in the “Apps” folder.
- B The action succeeds and the new member is successfully added to the project's Identity and Access Management (IAM) policy because all policies are inherited by underlying folders and projects.
- C The action fails because a constraints/iam.allowedPolicyMemberDomains organization policy must be defined on the current project to deactivate the constraint temporarily.
- D The action fails because a constraints/iam.allowedPolicyMemberDomains organization policy is in place and only members from the flowlogistic.com organization are allowed.
Xem giải thích
🧩 Giải thích chi tiết nội dung câu hỏi
Câu hỏi này xoay quanh chính sách tổ chức (Organization Policy) trong Google Cloud Platform (GCP), cụ thể là ràng buộc constraints/iam.allowedPolicyMemberDomains. Đây là cơ chế kiểm soát các domain (tổ chức) được phép thêm thành viên vào IAM policy của tài nguyên con (như project).
-
Cấu trúc môi trường GCP:
- Organization node (cấp cao nhất): Áp dụng policy cho phép thành viên từ domain terramearth.com.
- Folder "Apps" (thuộc organization node): Áp dụng policy cho phép thành viên từ domain flowlogistic.com, và có thuộc tính
inheritFromParent: false📌 (nghĩa là KHÔNG kế thừa policy từ parent - organization node). - Các project nằm trong folder "Apps".
-
Hành động thực hiện: Cố gắng cấp quyền truy cập cho user testuser@terramearth.com vào một project trong folder "Apps".
-
Vấn đề cốt lõi 🛠️: Policy ở folder "Apps" với
inheritFromParent: falsesẽ ghi đè hoàn toàn policy từ organization node. Do đó, project chỉ chấp nhận thành viên từ flowlogistic.com, không phải terramearth.com. Hành động sẽ thất bại.
Kiến thức cập nhật (tính đến 2026): Theo tài liệu GCP mới nhất, ràng buộc iam.allowedPolicyMemberDomains vẫn hoạt động như vậy (không thay đổi lớn từ 2023-2026). Policy ở cấp thấp hơn với inheritFromParent: false chặn kế thừa từ parent.
📘 Tài liệu tham khảo:
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: The action fails because a constraints/iam.allowedPolicyMemberDomains organization policy is in place and only members from the flowlogistic.com organization are allowed.
Lý do 🏆:
- Policy ở folder "Apps" chỉ định rõ cho phép flowlogistic.com và inheritFromParent: false, nên project con KHÔNG kế thừa policy từ organization node (terramaearth.com).
- User testuser@terramearth.com thuộc domain không được phép → Hành động thất bại ngay lập tức khi thêm vào IAM policy của project.
- Đây là thiết kế bảo mật của GCP để kiểm soát chặt chẽ domain IAM theo hierarchy.
❌ Phân tích tất cả các phương án (đúng/sai)
-
Phương án 1: The action succeeds because members from both organizations, terramearth.com or flowlogistic.com, are allowed on projects in the “Apps” folder.
❌ Sai vì: Policy ở folder "Apps" vớiinheritFromParent: falseKHÔNG kết hợp (merge) các domain từ parent. Nó thay thế hoàn toàn, chỉ cho phép flowlogistic.com. Không có "cả hai" domain được phép. -
Phương án 2: The action succeeds and the new member is successfully added to the project's Identity and Access Management (IAM) policy because all policies are inherited by underlying folders and projects.
❌ Sai vì: Không phải tất cả policy đều kế thừa. Thuộc tínhinheritFromParent: falseở folder "Apps" chặn kế thừa từ organization node, nên project chỉ tuân theo policy của folder (flowlogistic.com). -
Phương án 3: The action fails because a constraints/iam.allowedPolicyMemberDomains organization policy must be defined on the current project to deactivate the constraint temporarily.
❌ Sai vì: Không cần định nghĩa policy trên project để deactivate. Policy từ folder đã áp dụng trực tiếp lên project con (do hierarchy). Deactivate cần thay đổi policy ở folder hoặc organization, không phải project. -
Phương án 4 (Đúng): The action fails because a constraints/iam.allowedPolicyMemberDomains organization policy is in place and only members from the flowlogistic.com organization are allowed.
✅ Đúng vì: Như giải thích trên, policy folder vớiinheritFromParent: falsegiới hạn chỉ flowlogistic.com, chặn terramearth.com trên project. Hành động thất bại do vi phạm ràng buộc IAM domain.
What should you do?
- A Configure the bastion host with OS Login enabled and allow connection to port 5601 at VPC firewall. Log in to the bastion host from the Google Cloud console by using SSH-in-browser and then to the web application.
- B Modify the VPC routing with the default route point to the default internet gateway. Modify the VPC Firewall rule to allow access from the internet 0.0.0.0/0 to port 5601 on the application instance.
- C Configure Secure Shell Access (SSH) bastion host in a public network, and allow only the bastion host to connect to the application on port 5601. Use a bastion host as a jump host to connect to the application.
- D Configure an HTTP Load Balancing instance that points to the managed group with Identity-Aware Proxy (IAP) protection with Google credentials. Modify the VPC firewall to allow access from IAP network range.
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 quản trị (administrative application) đang chạy trên máy ảo (VM) thuộc nhóm quản lý (managed instance group) trong Virtual Private Cloud (VPC), lắng nghe tại cổng 5601 (thường là giao diện web của Kibana hoặc tương tự). Hiện tại, VM không có quyền truy cập internet. Yêu cầu là tiếp xúc giao diện web này cho người dùng, đồng thời thực thi xác thực và phân quyền bằng Google credentials (tức là sử dụng tài khoản Google/IAM của GCP một cách an toàn).
Mục tiêu chính:
- ✅ Bảo mật cao, không mở trực tiếp ra internet.
- ✅ Sử dụng cơ chế native của Google Cloud để auth/authz.
- 🛡️ Tránh rủi ro lộ cổng trực tiếp, tuân thủ nguyên tắc least privilege.
Đây là tình huống điển hình trong Google Cloud Platform (GCP), tập trung vào zero-trust security với Identity-Aware Proxy (IAP). (Lưu ý: Dù đề cập "AWS" có thể là nhầm lẫn, nội dung hoàn toàn thuộc GCP với các khái niệm VPC, MIG, IAP.)
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Configure an HTTP Load Balancing instance that points to the managed group with Identity-Aware Proxy (IAP) protection with Google credentials. Modify the VPC firewall to allow access from IAP network range.
Lý do:
- 🛡️ HTTP(S) Load Balancer kết hợp IAP là giải pháp chuẩn và an toàn nhất của GCP để expose ứng dụng web nội bộ mà không cần public IP trực tiếp trên VM.
- IAP sử dụng Google credentials (OAuth 2.0 + IAM) để xác thực/nghĩa vụ người dùng trước khi proxy traffic đến backend (managed instance group).
- Chỉ cần mở VPC firewall cho dải IP của IAP (không phải 0.0.0.0/0), đảm bảo traffic từ IAP proxy (không lộ VM ra internet).
- Hỗ trợ managed instance group làm backend, auto-scaling và health checks.
- 📈 Cập nhật đến 2026: IAP vẫn là best practice (từ GCP 2024+ tích hợp Cloud Armor cho WAF nâng cao).
Nguồn tham khảo:
🛠️ Giải thích chi tiết tất cả các phương án
Dưới đây là phân tích từng lựa chọn một, giữ nguyên văn bản gốc tiếng Anh. Mỗi phương án được đánh giá đúng/sai với lý do cụ thể:
-
❌ [SAI] Configure the bastion host with OS Login enabled and allow connection to port 5601 at VPC firewall. Log in to the bastion host from the Google Cloud console by using SSH-in-browser and then to the web application.
- Lý do sai: Bastion host + OS Login chỉ phù hợp cho SSH truy cập terminal, không phải web interface (cổng 5601 TCP/HTTP). Người dùng phải SSH thủ công rồi port-forward (phức tạp, không scale), không enforce Google credentials tự động cho web. Rủi ro cao nếu mở firewall rộng, không phải giải pháp native cho web app.
-
❌ [SAI] Modify the VPC routing with the default route point to the default internet gateway. Modify the VPC Firewall rule to allow access from the internet 0.0.0.0/0 to port 5601 on the application instance.
- Lý do sai: Mở default route + firewall 0.0.0.0/0 trực tiếp expose VM ra internet không an toàn, vi phạm zero-trust. Không có cơ chế auth Google credentials (chỉ firewall IP-based), dễ bị tấn công DDoS/brute-force. VM hiện không có internet, nhưng cách này buộc public IP – anti-pattern trong GCP.
-
❌ [SAI] Configure Secure Shell Access (SSH) bastion host in a public network, and allow only the bastion host to connect to the application on port 5601. Use a bastion host as a jump host to connect to the application.
- Lý do sai: Tương tự lựa chọn 1, bastion SSH chỉ cho terminal jump, không hỗ trợ web browser trực tiếp. Bastion public tăng attack surface (dù chỉ allow bastion-to-app), vẫn yêu cầu port-forward thủ công (ví dụ:
ssh -L 5601:target:5601 bastion). Không tích hợp Google credentials cho web auth, không scale cho nhiều user.
- Lý do sai: Tương tự lựa chọn 1, bastion SSH chỉ cho terminal jump, không hỗ trợ web browser trực tiếp. Bastion public tăng attack surface (dù chỉ allow bastion-to-app), vẫn yêu cầu port-forward thủ công (ví dụ:
-
✅ [ĐÚNG] Configure an HTTP Load Balancing instance that points to the managed group with Identity-Aware Proxy (IAP) protection with Google credentials. Modify the VPC firewall to allow access from IAP network range.
- Lý do đúng: Như đã giải thích ở trên. Giải pháp end-to-end secure: LB public-facing → IAP auth (Google login) → Proxy đến MIG qua firewall IAP IPs (35.199.128.0/17, 35.191.128.0/17, etc.). Hỗ trợ HTTPS, session stickiness, và monitoring. Best practice 2026 với IAP TCP forwarding nếu cần non-HTTP.
Tóm tắt lợi ích tổng quát: ✅ IAP + LB giảm latency, hỗ trợ global access, tích hợp Cloud Audit Logs. Tránh bastion phức tạp hoặc public exposure. Nếu implement, dùng gcloud CLI: gcloud compute backend-services create ... --iap=enabled.
Hy vọng phân tích này giúp bạn ôn thi Professional Cloud Security Engineer! 🚀
What should you do?
- A Assign a BigQuery Data Viewer role along with an IAM condition that limits the access to specified working hours.
- B Run a gsutil script that assigns a BigQuery Data Viewer role, and remove it only during the specified working hours.
- C Assign a BigQuery Data Viewer role to a service account that adds and removes the users daily during the specified working hours.
- D Configure Cloud Scheduler so that it triggers a Cloud Functions instance that modifies the organizational policy constraint for BigQuery during the specified working hours.
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 bảo mật truy cập dữ liệu trong Google Cloud Platform (GCP), cụ thể là BigQuery – một dịch vụ kho dữ liệu lớn. Công ty có người dùng truy cập dữ liệu từ một bảng BigQuery, và yêu cầu là đảm bảo họ chỉ có thể truy cập trong giờ làm việc (working hours).
📌 Mục tiêu chính: Triển khai cơ chế kiểm soát truy cập tự động, dựa trên thời gian, mà không cần can thiệp thủ công hàng ngày. Điều này liên quan đến IAM (Identity and Access Management) trong GCP, nơi cần sử dụng các chính sách quyền hạn điều kiện hóa (IAM conditions) để giới hạn thời gian truy cập mà không làm gián đoạn hoạt động kinh doanh.
🛠️ Bối cảnh kỹ thuật: BigQuery sử dụng các role như BigQuery Data Viewer (roles/bigquery.dataViewer) để cho phép đọc dữ liệu. GCP hỗ trợ IAM conditions dựa trên ngôn ngữ CEL (Common Expression Language), cho phép kiểm tra điều kiện như request.time để giới hạn giờ (ví dụ: từ 9h sáng đến 5h chiều). Đây là tính năng cập nhật mới nhất đến năm 2026, được khuyến nghị cho các kịch bản bảo mật thời gian thực (time-bound access).
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Assign a BigQuery Data Viewer role along with an IAM condition that limits the access to specified working hours.
Lý do (🧩 Phân tích chi tiết):
- Phương án này sử dụng IAM conditions – tính năng mạnh mẽ của GCP IAM, cho phép gắn điều kiện thời gian trực tiếp vào role mà không cần thay đổi quyền hạn thường xuyên.
- Ví dụ biểu thức CEL:
request.time >= '09:00:00Z' && request.time < '17:00:00Z'(có thể điều chỉnh múi giờ). - ✅ Ưu điểm: Tự động, không tốn tài nguyên, dễ quản lý tại cấp dataset/table/project, và tuân thủ nguyên tắc least privilege (quyền tối thiểu). Không gây gián đoạn truy cập hợp lệ.
- 📘 Nguồn tham khảo: GCP IAM Conditions Documentation và BigQuery IAM Best Practices (cập nhật 2025-2026).
📋 Giải thích tất cả các phương án (Đúng/Sai)
Dưới đây là phân tích từng lựa chọn giữ nguyên văn bản gốc bằng tiếng Anh, kèm giải thích chi tiết bằng tiếng Việt với lý do đúng/sai:
-
Assign a BigQuery Data Viewer role along with an IAM condition that limits the access to specified working hours.
✅ Đúng (như đã giải thích ở trên). Đây là cách tối ưu, tự động và được GCP khuyến nghị, sử dụng CEL expressions để kiểm tra thời gian yêu cầu mà không cần script hay scheduler. -
Run a gsutil script that assigns a BigQuery Data Viewer role, and remove it only during the specified working hours.
❌ Sai. Gsutil là công cụ CLI để quản lý Cloud Storage, không phù hợp cho IAM BigQuery (sử dụng gcloud iam thay thế). Phương án này yêu cầu chạy script thủ công/lặp lại, dễ lỗi, tốn thời gian, và không tự động hóa thực sự (phải trigger thủ công ngoài giờ làm việc). Không scalable cho nhiều user. -
Assign a BigQuery Data Viewer role to a service account that adds and removes the users daily during the specified working hours.
❌ Sai. Sử dụng service account để add/remove user hàng ngày là phức tạp, tốn kém (cần script tự động + cron job), vi phạm nguyên tắc zero-trust vì vẫn cấp quyền rộng. Dễ gây downtime nếu script lỗi, và không hiệu quả cho số lượng user lớn. GCP không khuyến khích cách này so với IAM conditions. -
Configure Cloud Scheduler so that it triggers a Cloud Functions instance that modifies the organizational policy constraint for BigQuery during the specified working hours.
❌ Sai. Organizational Policy (Org Policy) dùng cho chính sách tổ chức toàn cầu (như disable public access), không linh hoạt cho thời gian cụ thể trên BigQuery table. Cloud Scheduler + Cloud Functions tạo overhead lớn, phức tạp triển khai, và có thể ảnh hưởng toàn tổ chức. Không chính xác cho yêu cầu "access data in a BigQuery table" (cấp độ thấp hơn org policy).
🏆 Kết luận và khuyến nghị
✅ Tóm tắt: IAM conditions là giải pháp tốt nhất cho time-based access trong GCP đến năm 2026.
🛠️ Khuyến nghị thực hành: Test IAM condition trên môi trường dev trước, sử dụng gcloud beta projects add-iam-policy-binding với --condition. Theo dõi audit logs qua Cloud Audit Logs để verify.
📘 Tài liệu bổ sung: GCP Security Best Practices và BigQuery Security (phiên bản mới nhất 2026).
- A Enable Private Google Access for the private subnet.
- B Configure Private Service Connect for the private subnet's Virtual Private Cloud (VPC) and allocate an IP range for the Compute Engine instances.
- C Reserve and assign static external IP addresses for the Compute Engine instances.
- D Create a Cloud NAT gateway for the region where the private subnet is configured.
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 tình huống bảo mật và kết nối mạng trong Google Cloud Platform (GCP):
Bạn đã đặt một số Compute Engine instances (máy ảo) vào một private subnet (subnet riêng tư, không có địa chỉ IP công khai). Mục tiêu là cho phép các instances này truy cập các dịch vụ Google Cloud như Cloud Storage mà không đi qua internet công khai (tránh rủi ro bảo mật và độ trễ).
🛠️ Vấn đề cốt lõi: Private subnet không có route ra internet, nên cần cơ chế nội bộ để kết nối an toàn với dịch vụ GCP qua Private IP (không dùng public IP hoặc NAT). Đây là tính năng Private Google Access – một giải pháp tiêu chuẩn trong VPC để instances private access API endpoints và dịch vụ GCP qua mạng riêng.
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Enable Private Google Access for the private subnet.
📘 Lý do:
- Private Google Access cho phép Compute Engine instances trong private subnet gửi traffic đến các dịch vụ Google APIs và dịch vụ (như Cloud Storage) qua private IP range (IP của Google: 199.36.153.4/30 trở lên), hoàn toàn nội bộ VPC, không cần public IP hay internet.
- Đây là giải pháp đơn giản, tối ưu nhất, chỉ cần enable tại subnet level (hoặc VPC level). Không yêu cầu cấu hình phức tạp khác.
- Cập nhật 2026: Tính năng này vẫn là best practice trong VPC Networking (xem docs GCP VPC 2024+).
🧩 Nguồn tham khảo: Cloud VPC Docs - Private Google Access.
📋 Giải thích tất cả các phương án (đúng/sai)
-
Phương án 1: Enable Private Google Access for the private subnet.
✅ Đúng vì: Đây chính là giải pháp chuẩn của GCP để private instances access Google services (APIs, Cloud Storage) qua private endpoints. Traffic đi qua VPC peering với Google's service producer, không traverse internet. Enable tại subnet → instances dùng DNS private resolution tự động. Hoàn hảo cho yêu cầu! -
Phương án 2: Configure Private Service Connect for the private subnet's Virtual Private Cloud (VPC) and allocate an IP range for the Compute Engine instances.
❌ Sai vì: Private Service Connect (PSC) dùng để connect tới third-party services hoặc multi-producer qua private endpoint, không phải cho Google APIs gốc như Cloud Storage. PSC yêu cầu config endpoint service phức tạp, allocate IP range riêng, overkill và không cần thiết cho trường hợp này. (PSC phù hợp hơn cho published services từ producer khác). -
Phương án 3: Reserve and assign static external IP addresses for the Compute Engine instances.
❌ Sai vì: Gán static external IP sẽ expose instances ra internet công khai, buộc traffic phải traverse internet để access bất kỳ dịch vụ nào – trái ngược yêu cầu "without traversing the internet". Private subnet không hỗ trợ external IP trực tiếp, và cách này kém bảo mật. -
Phương án 4: Create a Cloud NAT gateway for the region where the private subnet is configured.
❌ Sai vì: Cloud NAT dùng để outbound traffic từ private instances ra internet (NAT masquerade qua public IP). Nó không hỗ trợ access Google services qua private path; traffic vẫn đi public nếu không config riêng. Phù hợp cho egress internet, không phải internal Google access.
🛠️ Tóm tắt best practice: Luôn enable Private Google Access cho private subnets cần access GCP services. Kết hợp Private DNS nếu cần resolve API endpoints đúng (như storage.googleapis.com → private IP). Không có thay đổi lớn đến 2026 theo AWS/GCP docs!
📘 Nguồn bổ sung: GCP Networking Best Practices, Private Service Connect Docs.
- A Implement vulnerability scanning as part of the Cloud Build process. If any medium or higher vulnerabilities are detected, manually rebuild the image with updated components.
- B Perform manual vulnerability checks post-build, but before Cloud Run deployment. Implement a manual security-engineer-driven remediation process.
- C Configure Binary Authorization on Cloud Run to enforce image signatures. Create policies to allow deployment only for images passing a defined vulnerability threshold.
- D Utilize a vulnerability scanner during the Cloud Build stage and set Artifact Registry permissions to block images containing vulnerabilities above "medium."
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 bảo mật chuỗi cung ứng (supply chain security) trong môi trường Google Cloud Platform (GCP), cụ thể là quy trình CI/CD cho ứng dụng containerized. Tổ chức sử dụng:
- Cloud Build: Để xây dựng (build) image container.
- Artifact Registry: Để lưu trữ image.
- Cloud Run: Để triển khai (deploy) ứng dụng serverless container.
Yêu cầu chính: Ngăn chặn việc triển khai (deploy) container có lỗ hổng bảo mật (vulnerabilities) với điểm CVSS > "medium" lên môi trường production. CVSS là hệ thống chấm điểm lỗ hổng (Common Vulnerability Scoring System), nơi "medium" thường tương ứng điểm 4.0-6.9. Giải pháp phải tự động hóa, enforceable và tích hợp chặt chẽ để tránh deploy thủ công bypass quy trình. Đây là best practice theo Google Cloud Security best practices (cập nhật 2025-2026), nhấn mạnh Binary Authorization cho policy enforcement tại runtime deploy.
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Configure Binary Authorization on Cloud Run to enforce image signatures. Create policies to allow deployment only for images passing a defined vulnerability threshold.
Lý do chi tiết 🛡️:
- Binary Authorization (Binauthz) là dịch vụ GCP chuyên enforce policy attestation trước khi deploy image lên Cloud Run/GKE. Nó kiểm tra digital signatures từ các attestor đáng tin cậy (như Grafeas hoặc Container Analysis).
- Tích hợp Container Analysis (vulnerability scanning) để tạo attestation notes với threshold CVSS (ví dụ: chỉ pass nếu không có vuln > medium).
- Tự động chặn deploy nếu image không pass policy, không phụ thuộc manual intervention.
- Hỗ trợ Cloud Run đầy đủ từ 2023, cập nhật 2026 với enhanced policy cho CVSS v4.0.
- Đây là giải pháp zero-trust, declarative theo NIST SP 800-218 (Secure Software Development), ngăn bypass hiệu quả.
📋 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 giữ nguyên văn bản gốc tiếng Anh, đánh dấu ✅/❌ và giải thích hoàn toàn bằng tiếng Việt dựa trên docs GCP mới nhất (2026):
-
[SAI] Implement vulnerability scanning as part of the Cloud Build process. If any medium or higher vulnerabilities are detected, manually rebuild the image with updated components.
❌ Sai vì: Scanning trong Cloud Build (qua Container Analysis hoặc third-party như Trivy) chỉ phát hiện vuln, nhưng manual rebuild không tự động hóa và dễ bị bypass (ai đó có quyền có thể deploy image cũ trực tiếp lên Cloud Run). Không enforce tại deploy stage, vi phạm nguyên tắc "shift-left nhưng vẫn cần gatekeeper". -
[SAI] Perform manual vulnerability checks post-build, but before Cloud Run deployment. Implement a manual security-engineer-driven remediation process.
❌ Sai vì: Hoàn toàn manual, phụ thuộc security engineer, dẫn đến chậm trễ, lỗi con người và không scale cho production. Không có cơ chế enforceable policy, dễ bỏ qua trong CI/CD nhanh, trái với GCP recommendation về automation (Security Command Center best practices). -
[ĐÚNG] Configure Binary Authorization on Cloud Run to enforce image signatures. Create policies to allow deployment only for images passing a defined vulnerability threshold.
✅ Đúng vì: Như giải thích trên, Binary Authorization tích hợp attestation-based policy với Container Analysis scanning. Image phải có valid signature chứng minh pass vuln threshold (CVSS > medium blocked). Enforce tại admission control của Cloud Run, tự động chặn deploy. Best practice cho 2026 với support CVSS v4 và multi-attestor. -
[SAI] Utilize a vulnerability scanner during the Cloud Build stage and set Artifact Registry permissions to block images containing vulnerabilities above "medium."
❌ Sai vì: Artifact Registry không hỗ trợ IAM permissions dựa trên vuln scan (permissions chỉ dựa role-based như Storage Admin). Scanner chỉ tag metadata (qua Container Analysis), không block upload/deploy. Không enforce tại Cloud Run, image vẫn có thể pull/deploy thủ công.
📘 Tài liệu tham khảo (cập nhật 2026)
- Binary Authorization docs: cloud.google.com/binary-authorization – Hướng dẫn config policy cho Cloud Run & CVSS threshold.
- Container Analysis & Vulnerability Scanning: cloud.google.com/container-analysis – Tích hợp CVSS scoring.
- Cloud Run Security: cloud.google.com/run/docs/securing/binary-authorization – Example policy cho vuln gate.
- GCP Security Best Practices: cloud.google.com/architecture/framework/security/overview – Nhấn mạnh supply chain security.
Giải pháp này đảm bảo tự động, không thể bypass, phù hợp Professional Cloud Security Engineer certification! 🚀
- A Change Cloud Run configuration to require authentication. Assign the role of Cloud Run Invoker to the group of privileged users.
- B Create a group of privileged users in Cloud Identity. Assign the role of Cloud Run User to the group directly on the Cloud Run service.
- C Change the Ingress Control configuration of Cloud Run to internal and create firewall rules to allow only access from known IP addresses.
- D Activate Identity-Aware Proxy (IAP) on the Application Load Balancer backend. Assign the role of IAP-secured Web App User to the group of privileged users.
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ả một ứng dụng web chạy trên Cloud Run (dịch vụ serverless container của Google Cloud), được expose ra internet thông qua Application Load Balancer (ALB - cân bằng tải ứng dụng của Google Cloud).
Yêu cầu chính:
- Đảm bảo chỉ người dùng privileged (đặc quyền) trong tổ chức mới truy cập được ứng dụng.
- Giải pháp phải hỗ trợ truy cập qua trình duyệt với Single Sign-On (SSO) – tức là đăng nhập một lần qua trình duyệt mà không cần xử lý auth phức tạp.
🛠️ Bối cảnh kỹ thuật (cập nhật đến 2026): Cloud Run mặc định cho phép public access, nhưng khi kết hợp với Load Balancer external, cần lớp bảo mật như Identity-Aware Proxy (IAP) để kiểm soát truy cập dựa trên identity (như Google Workspace hoặc Cloud Identity). IAP tích hợp SSO tự nhiên qua OAuth2 và hỗ trợ browser-based access. Không dùng IAP, các cách auth trực tiếp trên Cloud Run sẽ không hiệu quả vì traffic đi qua Load Balancer.
📘 Tài liệu tham khảo:
- Google Cloud IAP Documentation (cập nhật 2025: IAP hỗ trợ Cloud Run fully via Load Balancer).
- Cloud Run Security Best Practices (phiên bản mới nhất 2026: Khuyến nghị IAP cho external web apps với SSO).
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Activate Identity-Aware Proxy (IAP) on the Application Load Balancer backend. Assign the role of IAP-secured Web App User to the group of privileged users.
Lý do:
✅ IAP là giải pháp chính thức của Google Cloud để bảo mật web apps/external services qua Load Balancer, hỗ trợ SSO qua trình duyệt (OAuth2 với Google Identity). Bật IAP trên backend của ALB sẽ chặn traffic không auth, chỉ cho phép users có role IAP-secured Web App User (roles/iap.httpsResourceAccessor) truy cập. Group privileged users (từ Cloud Identity/Google Workspace) được assign role này – hoàn hảo khớp yêu cầu. Không ảnh hưởng performance Cloud Run và scale tự động.
📋 Giải thích tất cả các phương án (đúng/sai)
-
[SAI] Change Cloud Run configuration to require authentication. Assign the role of Cloud Run Invoker to the group of privileged users.
❌ Sai vì: Require authentication trên Cloud Run chỉ hoạt động cho direct invocations (không qua Load Balancer). Với ALB external, traffic bypass auth Cloud Run và đi thẳng đến service – role Cloud Run Invoker (roles/run.invoker) vô hiệu. Không hỗ trợ SSO browser chuẩn (chỉ API keys hoặc service accounts), vi phạm yêu cầu chính. -
[SAI] Create a group of privileged users in Cloud Identity. Assign the role of Cloud Run User to the group directly on the Cloud Run service.
❌ Sai vì: Role Cloud Run User (legacy, nay là Cloud Run Admin - roles/run.admin) dành cho quản trị service (deploy/update), không phải invoke/access app. Assign trực tiếp trên service không chặn public traffic qua ALB. Không hỗ trợ SSO browser, chỉ IAM policy cơ bản – không phù hợp external web app. -
[SAI] Change the Ingress Control configuration of Cloud Run to internal and create firewall rules to allow only access from known IP addresses.
❌ Sai vì: Ingress internal chỉ cho phép traffic nội bộ VPC (không expose internet), cần VPC Connector phức tạp + firewall rules chỉ dựa IP (không verify identity). Hoàn toàn không hỗ trợ SSO browser – users phải dùng VPN hoặc static IP, không linh hoạt cho privileged org users.
🛡️ Kết luận: IAP là best practice cho scenario này, đảm bảo zero-trust access với SSO mượt mà! Nếu deploy thực tế, dùng gcloud CLI: gcloud iap web enable --resource-type=compute-engine-backend-service.
- A Enable Cloud Audit Logs for the resources that the service account interacts with. Review the logs for further evidence of unauthorized activity.
- B Review Cloud Audit Logs for activity related to the service account. Focus on the time period of the suspicious login attempt.
- C Run a vulnerability scan to identify potentially exploitable weaknesses in systems that use the service account.
- D Check Event Threat Detection in Security Command Center for any related alerts. Cross-reference your findings with Cloud Audit Logs.
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ả một tình huống bảo mật khẩn cấp trong Google Cloud Platform (GCP): Trong quá trình kiểm tra bảo mật định kỳ, đội ngũ phát hiện một nỗ lực đăng nhập đáng ngờ nhằm giả mạo (impersonate) một tài khoản dịch vụ (service account) có quyền cao nhưng được sử dụng thường xuyên, từ một địa chỉ IP không xác định. Nhiệm vụ là điều tra hiệu quả để phản ứng với sự cố bảo mật tiềm ẩn này.
🛠️ Mục tiêu chính: Tập trung vào các công cụ GCP chuyên dụng để phát hiện và xác minh nhanh chóng hành vi bất thường liên quan đến service account, thay vì các biện pháp chung chung hoặc không kịp thời. Service account trong GCP thường được audit chặt chẽ qua Cloud Audit Logs, và các công cụ như Security Command Center (SCC) giúp tự động hóa phát hiện mối đe dọa.
📘 Kiến thức cập nhật (đến 2026): Theo tài liệu GCP mới nhất (Security Command Center Premium tier, Event Threat Detection - ETD), SCC có khả năng phát hiện các cuộc tấn công impersonation service account qua machine learning và rule-based alerts. Cloud Audit Logs ghi nhận mọi hành động của service account (bao gồm login attempts), luôn enabled mặc định cho Admin Activity và Data Access ở mức dự án/folder/organization.
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Check Event Threat Detection in Security Command Center for any related alerts. Cross-reference your findings with Cloud Audit Logs.
Lý do:
- Event Threat Detection (ETD) trong Security Command Center (SCC) là công cụ tự động hóa hàng đầu để phát hiện suspicious login attempts và impersonation của service account từ IP lạ (dựa trên ML và heuristics, cập nhật 2024-2026). Nó tạo alerts ngay lập tức cho các hành vi như "anomalous login" hoặc "privilege escalation".
- Cross-reference với Cloud Audit Logs giúp xác minh chi tiết (timestamp, IP, user agent), đảm bảo điều tra toàn diện và nhanh chóng – phù hợp nhất cho incident response theo best practices NIST và GCP.
- Đây là cách hiệu quả nhất (effective investigate), tránh bỏ sót alerts tự động. ✅
❌ Giải thích tất cả các phương án (đúng/sai)
Dưới đây là phân tích chi tiết từng lựa chọn, giữ nguyên văn bản gốc bằng tiếng Anh:
-
[SAI] Enable Cloud Audit Logs for the resources that the service account interacts with. Review the logs for further evidence of unauthorized activity.
❌ Sai vì: Cloud Audit Logs đã được enable mặc định cho service account (Admin Activity luôn bật, Data Access có thể tùy chỉnh nhưng không cần enable sau sự cố). Việc enable sau khi sự cố xảy ra không thu thập được dữ liệu quá khứ (logs chỉ lưu 400 ngày max). Không giải quyết trực tiếp suspicious login attempt mà chỉ review chung chung, chậm và không hiệu quả cho incident response. -
[SAI] Review Cloud Audit Logs for activity related to the service account. Focus on the time period of the suspicious login attempt.
❌ Sai vì: Mặc dù hữu ích để kiểm tra chi tiết (protocols/methods/access), đây không phải bước đầu tiên hiệu quả nhất. Audit Logs yêu cầu query thủ công (qua Logs Explorer), dễ bỏ sót nếu không có alerts tự động. SCC/ETD cung cấp context sẵn (anomaly detection), nên chỉ review logs là không toàn diện và kém hiệu quả hơn cross-reference. -
[SAI] Run a vulnerability scan to identify potentially exploitable weaknesses in systems that use the service account.
❌ Sai vì: Vulnerability scan (như qua SCC Vulnerabilities hoặc Forseti) tập trung vào lỗ hổng phần mềm/config, không liên quan trực tiếp đến login attempt từ IP lạ hoặc impersonation. Đây là bước phòng ngừa dài hạn, không phải điều tra tức thì cho incident (có thể mất hàng giờ/ngày, không giúp xác minh sự cố ngay). -
[ĐÚNG] Check Event Threat Detection in Security Command Center for any related alerts. Cross-reference your findings with Cloud Audit Logs.
✅ Đúng vì: Như đã giải thích ở trên, kết hợp ETD/SCC (phát hiện tự động) + Audit Logs (xác minh sâu) là quy trình chuẩn GCP incident response cho service account threats. Hiệu quả cao, nhanh chóng và theo best practices.
📚 Tài liệu tham khảo
- Security Command Center & Event Threat Detection: GCP Docs - Event Threat Detection (cập nhật 2025: hỗ trợ impersonation detection cho service accounts).
- Cloud Audit Logs: GCP Docs - Audit Logs for Service Accounts (luôn enabled cho high-priv accounts).
- Best Practices Incident Response: GCP Security Best Practices & NIST SP 800-61 (2024 revision).
- Certification Reference: Google Cloud Professional Cloud Security Engineer study guide (2026 edition, Whizlabs/Google Cloud Skills Boost).
🛡️ Khuyến nghị bổ sung: Sau điều tra, kích hoạt SCC Premium, thiết lập alerting qua Pub/Sub/Cloud Functions, và rotate keys của service account ngay lập tức!
- A Explain that using platform-as-a-service (PaaS) transfers security concerns to Google. Describe the need for strict API usage limits to protect against unexpected usage and billing spikes.
- B Explain the security aspects of the code that transforms user-uploaded images using Google's service. Define Cloud IAM for fine-grained access control within the development team.
- C Explain Google's shared responsibility model. Focus the configuration review on Identity and Access Management (IAM) permissions, secure data upload/download procedures, and monitoring logs for any potential malicious activity.
- D Explain the development of custom network firewalls around the image classification service for deep intrusion detection and prevention. Describe vulnerability scanning tools for known vulnerabilities.
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 trách nhiệm bảo mật (security responsibilities) khi tổ chức đang sử dụng một mô hình phân loại hình ảnh (image classification model) đang hoạt động trên dịch vụ AI được quản lý (managed AI service) của Google Cloud. Bạn đang tham gia phiên đánh giá cấu hình (configuration review) với các bên liên quan (stakeholders), và cần mô tả rõ ràng các trách nhiệm bảo mật liên quan đến mô hình này.
📘 Bối cảnh chính:
- Đây là dịch vụ PaaS (Platform-as-a-Service) như Vertex AI hoặc AutoML trên Google Cloud (cập nhật đến 2026, Vertex AI là dịch vụ chính cho AI/ML managed).
- Mô hình shared responsibility model của Google Cloud áp dụng: Google chịu trách nhiệm bảo mật hạ tầng (infrastructure), còn khách hàng chịu trách nhiệm về dữ liệu, truy cập, cấu hình IAM, quy trình upload/download an toàn, và giám sát (monitoring).
- Mục tiêu: Nhấn mạnh những gì khách hàng cần kiểm soát trong review, không phải các yếu tố Google đã lo.
🛠️ Kiến thức cập nhật: Theo tài liệu Google Cloud mới nhất (2026), shared responsibility model được mô tả chi tiết tại Google Cloud Security Whitepaper và Vertex AI Security. Khách hàng phải focus vào IAM, VPC Service Controls, logging qua Cloud Audit Logs, và quy trình dữ liệu an toàn.
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Explain Google's shared responsibility model. Focus the configuration review on Identity and Access Management (IAM) permissions, secure data upload/download procedures, and monitoring logs for any potential malicious activity.
Lý do chọn 🟢:
- Phương án này chính xác mô tả mô hình shared responsibility của Google Cloud, nơi Google lo hạ tầng managed service (như Vertex AI), còn tổ chức phải chịu trách nhiệm chính về IAM permissions (quyền truy cập tinh chỉnh), quy trình upload/download dữ liệu an toàn (tránh rò rỉ dữ liệu nhạy cảm), và giám sát logs (sử dụng Cloud Logging/Audit Logs để phát hiện hoạt động đáng ngờ).
- Trong configuration review, đây là các điểm cốt lõi cần thảo luận với stakeholders, phù hợp với best practices bảo mật AI/ML trên Google Cloud (ví dụ: enable logging cho model predictions và access).
📋 Giải thích tất cả các phương án (đúng/sai)
Dưới đây là phân tích từng phương án một, giữ nguyên văn bản gốc bằng tiếng Anh. Mỗi giải thích sử dụng ✅ (đúng) hoặc ❌ (sai), kèm lý do chi tiết bằng tiếng Việt dựa trên tài liệu Google Cloud 2026.
-
[SAI] Explain that using platform-as-a-service (PaaS) transfers security concerns to Google. Describe the need for strict API usage limits to protect against unexpected usage and billing spikes.
❌ Sai vì: PaaS như Vertex AI không chuyển giao toàn bộ trách nhiệm bảo mật cho Google. Theo shared responsibility model, khách hàng vẫn phải lo dữ liệu, IAM, và cấu hình. Phần quota API limits chỉ liên quan đến billing/DoS, không phải bảo mật cốt lõi của model (xem Google Cloud Shared Responsibility). -
[SAI] Explain the security aspects of the code that transforms user-uploaded images using Google's service. Define Cloud IAM for fine-grained access control within the development team.
❌ Sai vì: Với managed AI service, không cần code custom để transform images (Google xử lý managed). Focus vào "security of code" là không phù hợp; IAM cho dev team chỉ là phần nhỏ, không phải trọng tâm review bảo mật model hoạt động (review nên rộng hơn về data/end-users, theo Vertex AI Best Practices). -
[ĐÚNG] Explain Google's shared responsibility model. Focus the configuration review on Identity and Access Management (IAM) permissions, secure data upload/download procedures, and monitoring logs for any potential malicious activity.
✅ Đúng vì: Như đã giải thích ở trên, đây là tóm tắt chính xác trách nhiệm khách hàng trong shared model. IAM, secure procedures (như Signed URLs cho upload), và logs (Cloud Audit Logs) là các yếu tố bắt buộc review để phát hiện lạm dụng model (tài liệu: Google Cloud Security Command Center). -
[SAI] Explain the development of custom network firewalls around the image classification service for deep intrusion detection and prevention. Describe vulnerability scanning tools for known vulnerabilities.
❌ Sai vì: Managed service như Vertex AI không yêu cầu custom firewalls (Google dùng VPC Service Controls và Armor cho protection). Vulnerability scanning là trách nhiệm Google cho hạ tầng; khách hàng không cần implement deep packet inspection (xem Google Cloud Armor và BeyondCorp Enterprise).
Tài liệu tham khảo chính 📚:
- Google Cloud Shared Responsibility Model
- Vertex AI Security Overview (2026 update)
- Cloud IAM Best Practices
Hy vọng phân tích này giúp bạn hiểu rõ! 🚀 Nếu cần thêm chi tiết, hãy hỏi nhé.
- A Use Cloud Asset Inventory to generate a report of the configuration of all storage buckets. Examine the Lifecycle management policy settings and ensure that they are set correctly.
- B Set up a CloudRun Job with Cloud Scheduler to execute a script that searches for and removes flies older than 365 days from your Cloud Storage.
- C Enable the Autoclass feature to manage all aspects of bucket storage classes.
- D Define a lifecycle policy JSON with an action on SetStorageClass to COLDLINE with an age condition of 365 and matchStorageClass STANDARD.
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 quản lý dữ liệu trong Google Cloud Storage (GCS) buckets với yêu cầu giữ nguyên các objects (không xóa) nhưng tự động giảm chi phí lưu trữ bằng cách hạ cấp storage class. Cụ thể:
- Các objects cũ hơn 365 ngày cần được chuyển từ STANDARD (lớp lưu trữ nhanh, đắt) sang COLDLINE (lớp lưu trữ lạnh, rẻ hơn cho dữ liệu ít truy cập).
- Giải pháp phải tự động, không thủ công, và phù hợp với lifecycle management của GCS để tránh can thiệp liên tục.
- Đây là tình huống phổ biến trong chiến lược tối ưu hóa chi phí (cost optimization) theo Google Cloud Well-Architected Framework, đặc biệt với dữ liệu retention dài hạn. Kiến thức cập nhật đến 2026: GCS hỗ trợ lifecycle rules linh hoạt hơn với Autoclass và nearline/coldline, nhưng lifecycle policy vẫn là chuẩn mực cho rule-based automation.
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Define a lifecycle policy JSON with an action on SetStorageClass to COLDLINE with an age condition of 365 and matchStorageClass STANDARD.
Lý do lựa chọn (chi tiết):
- 🛠️ Lifecycle policy của GCS chính là công cụ tự động hóa hoàn hảo để thay đổi storage class dựa trên điều kiện tuổi (age) và lớp hiện tại (matchStorageClass).
- Rule này sẽ scan tự động các objects >365 ngày trong STANDARD class và set sang COLDLINE mà không xóa dữ liệu, đúng yêu cầu retention.
- JSON config chính xác:
{"action": {"type": "SetStorageClass", "storageClass": "COLDLINE"}, "condition": {"age": 365, "matchesStorageClass": ["STANDARD"]}}. - Tiết kiệm chi phí: STANDARD ~$0.02/GB/tháng, COLDLINE ~$0.004/GB/tháng (giá 2026, vùng US).
- Áp dụng qua gsutil hoặc Console:
gsutil lifecycle set config.json gs://bucket-name.
📋 Giải thích tất cả các phương án (đúng/sai)
Dưới đây là phân tích từng lựa chọn một cách chi tiết, giữ nguyên văn bản gốc tiếng Anh. Mỗi phương án được đánh giá dựa trên tính phù hợp, tự động hóa và retention.
-
Use Cloud Asset Inventory to generate a report of the configuration of all storage buckets. Examine the Lifecycle management policy settings and ensure that they are set correctly.
❌ Sai vì: Phương án này chỉ kiểm tra/report (audit) config hiện tại qua Cloud Asset Inventory (CAI), không tự động thực thi thay đổi storage class. CAI dùng cho compliance/security auditing (như IAM policies), không phải automation. Không giải quyết "automatically downgrade", chỉ là bước thủ công kiểm tra. -
Set up a CloudRun Job with Cloud Scheduler to execute a script that searches for and removes flies older than 365 days from your Cloud Storage.
❌ Sai vì: Sử dụng Cloud Run + Scheduler để chạy script xóa (removes files) vi phạm yêu cầu retention objects. Script tự viết (gsutil ls/rm) tốn kém (chi phí compute), không scale tốt, và có lỗi chính tả "flies" (files). Không dùng lifecycle native, vi phạm best practice serverless automation của GCS. -
Enable the Autoclass feature to manage all aspects of bucket storage classes.
❌ Sai vì: Autoclass (ra mắt 2022, cập nhật 2026) tự động tối ưu class dựa trên access pattern (hot/cold), không dựa trên age 365 ngày cố định. Nó có thể chuyển sang Coldline/Archive nhưng không chính xác match yêu cầu "older than 365 days + STANDARD", và chỉ áp dụng cho new buckets. Không control granular như lifecycle rule. -
Define a lifecycle policy JSON with an action on SetStorageClass to COLDLINE with an age condition of 365 and matchStorageClass STANDARD.
✅ Đúng vì: Như giải thích trên, đây là giải pháp chính xác, native và tự động của GCS Object Lifecycle Management. Đáp ứng đầy đủ: retention + downgrade + điều kiện cụ thể.
📘 Tài liệu tham khảo (cập nhật 2026)
- Chính thức GCP Docs: Object Lifecycle Management – Chi tiết JSON rules và SetStorageClass action.
- gsutil Reference: Lifecycle Commands.
- Pricing & Best Practices: Storage Classes & Well-Architected Cost Optimization.
- Autoclass so sánh: Autoclass Docs – Xác nhận hạn chế không match age-based rule.
Hy vọng phân tích này giúp bạn ôn thi Professional Cloud Security Engineer hiệu quả! 🚀 Nếu cần thêm ví dụ code JSON, hãy hỏi nhé!
- A Enable Secure Web Proxy. Create a proxy subnet for each region that Secure Web Proxy will be deployed. Deploy an SSL certificate to Certificate Manager. Create a Secure Web Proxy policy and rules that allow access to Google Cloud services.
- B Enable Workforce Identity Federation. Create a workforce identity pool and specify the on-premises identity provider as a workforce identity pool provider. Create an attribute mapping to map the on-premises identity provider token to a Google STS token. Create an IAM binding that binds the required role(s) to the external identity by specifying the project ID, workload identity pool, and attribute that should be matched.
- C Enable Identity-Aware Proxy (IAP). Configure IAP by specifying the groups and service accounts that should have access to the application. Grant these identities the IAP-secured web app user role.
- D Enable Workload Identity Federation. Create a workload identity pool and specify the on-premises identity provider as a workload identity pool provider. Create an attribute mapping to map the on-premises identity provider token to a Google STS token. Create a service account with the necessary permissions for the workload. Grant the external identity the Workload Identity user role on the service account.
Xem giải thích
🧩 Phân tích chi tiết câu hỏi trắc nghiệm
📖 Nội dung câu hỏi:
Câu hỏi mô tả tình huống tổ chức của bạn đang sử dụng một identity provider (IdP) trung tâm để quản lý truy cập cho cả con người (human) và máy móc (machine). Bạn muốn tận dụng hệ thống quản lý danh tính hiện có này để cho phép các ứng dụng on-premises (ứng dụng chạy trên hạ tầng nội bộ, không phải trên Google Cloud) truy cập vào Google Cloud mà không cần hardcode credentials (không mã hóa cứng thông tin xác thực như service account keys vào code, giúp tránh rủi ro bảo mật).
🛠️ Mục tiêu chính: Kích hoạt federation (liên kết danh tính) giữa IdP on-premises và Google Cloud, sử dụng token từ IdP để trao đổi lấy token truy cập Google STS (Security Token Service), từ đó gọi API Google Cloud an toàn. Đây là best practice cho workload authentication (xác thực máy móc) theo mô hình zero-trust.
✅ Bối cảnh liên quan: Google Cloud IAM hỗ trợ Workload Identity Federation (WIF) cho các workload ngoài GCP (như on-premises, AWS, Azure), cập nhật mới nhất đến 2026 vẫn giữ nguyên cơ chế này với cải tiến về OIDC providers và attribute conditions (xem tài liệu chính thức).
✅ Đáp án đúng:
Enable Workload Identity Federation. Create a workload identity pool and specify the on-premises identity provider as a workload identity pool provider. Create an attribute mapping to map the on-premises identity provider token to a Google STS token. Create a service account with the necessary permissions for the workload. Grant the external identity the Workload Identity user role on the service account.
🧠 Lý do chọn đáp án này (bằng tiếng Việt):
Phương án này hoàn hảo vì nó sử dụng Workload Identity Federation (WIF) – giải pháp dành riêng cho machine-to-machine authentication (xác thực workload/máy móc từ bên ngoài GCP). Quy trình bao gồm:
- Tạo workload identity pool và chỉ định IdP on-premises làm provider (hỗ trợ OIDC, SAML, etc.).
- Attribute mapping để map token từ IdP sang Google STS token (OIDC token exchange).
- Tạo service account (SA) với quyền cần thiết trên GCP resources.
- Gán role Workload Identity User cho external identity trên SA, cho phép workload impersonate SA mà không cần key.
🛡️ Lợi ích: Tránh lưu trữ credentials lâu dài, hỗ trợ rotation tự động, phù hợp cho on-premises apps. Đây là recommended approach theo Google Cloud Security best practices (cập nhật 2024-2026).
📘 Tài liệu tham khảo:
- Workload Identity Federation Overview
- Configuring Workload Identity Federation
- Google Cloud Skills Boost: Professional Cloud Security Engineer course (module IAM Federation, cập nhật 2025).
❌ Phân tích tất cả các phương án (đúng/sai)
-
❌ Phương án SAI: Enable Secure Web Proxy. Create a proxy subnet for each region that Secure Web Proxy will be deployed. Deploy an SSL certificate to Certificate Manager. Create a Secure Web Proxy policy and rules that allow access to Google Cloud services.
🧩 Giải thích sai: Secure Web Proxy (trước đây là Cloud Armor Secure Web Proxy) là công cụ proxy web traffic để lọc và bảo vệ truy cập web (HTTP/HTTPS), không liên quan đến identity federation hay xác thực machine cho API calls. Nó dùng cho web apps, không phải on-premises apps gọi GCP services. Không giải quyết vấn đề hardcode credentials. -
❌ Phương án SAI: Enable Workforce Identity Federation. Create a workforce identity pool and specify the on-premises identity provider as a workforce identity pool provider. Create an attribute mapping to map the on-premises identity provider token to a Google STS token. Create an IAM binding that binds the required role(s) to the external identity by specifying the project ID, workload identity pool, and attribute that should be matched.
🧩 Giải thích sai: Workforce Identity Federation dành cho human users (người dùng lực lượng lao động, như nhân viên), không phải machine/workload. Nó dùng workforce identity pool cho external IdPs (như Active Directory, Okta) để truy cập console/UI/apps. Ở đây cần machine access (on-premises apps), nên phải dùng Workload Identity Federation với service account, không phải direct IAM binding cho external identity. -
❌ Phương án SAI: Enable Identity-Aware Proxy (IAP). Configure IAP by specifying the groups and service accounts that should have access to the application. Grant these identities the IAP-secured web app user role.
🧩 Giải thích sai: IAP là context-aware access cho web applications (bảo vệ apps bằng IAM policies, yêu cầu login qua Google hoặc IdP). Nó dùng cho protecting inbound access TO apps, không phải cho outbound access FROM on-premises apps TO GCP services. Không hỗ trợ token exchange cho API calls mà không hardcode creds. -
✅ Phương án ĐÚNG: Enable Workload Identity Federation. Create a workload identity pool and specify the on-premises identity provider as a workload identity pool provider. Create an attribute mapping to map the on-premises identity provider token to a Google STS token. Create a service account with the necessary permissions for the workload. Grant the external identity the Workload Identity user role on the service account.
🛠️ Xác nhận đúng (tóm tắt lại): Như đã giải thích ở trên, đây là quy trình chuẩn cho workload federation. Hỗ trợ IdP như Active Directory Federation Services (ADFS), Okta, Auth0 trên on-premises.
🎯 Kết luận: Câu hỏi kiểm tra sự phân biệt giữa Workload vs Workforce Identity Federation – kiến thức cốt lõi cho Professional Cloud Security Engineer. Sử dụng WIF giúp đạt compliance cao hơn (FedRAMP, PCI-DSS). Nếu triển khai thực tế, test với gcloud iam workload-identity-pools create!