Question

Difficulty: EasyCreating and Managing Service Accounts

You are managing identity configuration in a Google Cloud project with the ID `finance-analytics-prod`. You need to create a new user-managed service account named `app-scanner` to run an internal data inspection tool. Which TWO of the following statements regarding the creation and default attributes of this service account are correct?

  1. The service account email address will automatically be generated in the format `[email protected]`.Answer
  2. You can create the service account using the CLI command `gcloud iam service-accounts create app-scanner --display-name="App Scanner"`.Answer
  3. C
    Newly created user-managed service accounts are automatically granted the primitive Owner role (`roles/owner`) on the project.
  4. D
    Creating a service account automatically generates and downloads a persistent JSON private key file to your local machine.
  5. E
    To create a service account in a project, you must first enable the IAM API at the Organization level rather than in the target project.

Answer

The statement specifying that the service account email is formatted as `[email protected]` and the statement specifying the `gcloud iam service-accounts create` command are both correct.
User-managed service accounts in Google Cloud are assigned an email address structured as `[SA_NAME]@[PROJECT_ID].iam.gserviceaccount.com`. Furthermore, the standard gcloud command to provision a service account is `gcloud iam service-accounts create [SA_NAME]`.

Step-by-Step Solution

1
Identify the standard email naming convention for Google Cloud user-managed service accounts.
User-managed service account emails follow `[SA-NAME]@[PROJECT-ID].iam.gserviceaccount.com`.
This provides a globally unique identity identifier within Google Cloud IAM.
2
Verify the correct `gcloud` command for service account creation.
`gcloud iam service-accounts create app-scanner --display-name="App Scanner"` is valid syntax.
The `gcloud iam service-accounts create` command registers a new user-managed service account in the active project.
3
Evaluate default permissions and security behaviors of new service accounts.
Service accounts are created with zero permissions and no default key export files.
Google Cloud enforces default secure configurations, requiring explicit IAM role binding.

Key Concept

Creating User-Managed Service Accounts and Default IAM Properties
Rate this question