Professional Cloud Security EngineerConfiguring access within a cloud solution environmentEasy

A security engineer is designing an access control strategy for a new Google Cloud project. The project will host several microservices, each requiring distinct permissions to interact with various Google Cloud services like Cloud Storage, Cloud SQL, and Pub/Sub. The engineer wants to adhere to the principle of least privilege and ensure that each microservice only has the necessary permissions to perform its specific tasks. How should the engineer configure access for these microservices?

  1. AGrant global project-level roles like 'Editor' to all microservices to simplify permission management.
  2. BCreate a separate service account for each microservice and grant each service account only the specific roles required for that microservice.
  3. CCreate a single service account for the entire project and grant it all necessary permissions for all microservices.
  4. DUse a single user account with project owner privileges and share its credentials across all microservices.
Show answer & explanation

Correct answer: B. Create a separate service account for each microservice and grant each service account only the specific roles required for that microservice.

Creating a separate service account for each microservice and granting only the required roles adheres to the principle of least privilege, which is a fundamental security best practice. This minimizes the blast radius if one microservice's credentials are compromised.

Why the other options are wrong

  • A. Granting broad project-level roles like 'Editor' violates the principle of least privilege and provides unnecessary access to microservices.
  • C. This violates the principle of least privilege by granting excessive permissions to a single entity, increasing the risk if compromised.
  • D. Sharing user account credentials is a severe security risk and violates best practices for service-to-service authentication.

Principle of Least Privilege

A security concept in which a user or entity is given only the minimum levels of access or permissions needed to perform its job function.

  • Minimizes the attack surface.
  • Reduces the impact of a security breach.
  • Requires careful access management.

Memory trick: Grant only the 'key' needed, not the whole 'ring'.

More Configuring access within a cloud solution environment questions