TMAegis
Aturan lainnya untuk gcp

TMA-GCP-1.6

Ensure That Service Account Has No Admin Privileges

SedangLevel 1Tinjauan manualgcp

Deskripsi

A service account is a special Google account that belongs to an application or a VM, instead of to an individual end-user. The application uses the service account to call the service's Google API so that users aren't directly involved. It's recommended not to use admin access for ServiceAccount. Service accounts represent service-level security of the Resources (application or a VM) which can be determined by the roles assigned to it. Enrolling ServiceAccount with Admin rights gives full access to an assigned application or a VM. A ServiceAccount Access holder can perform critical actions like delete, update change settings, etc. without user intervention. For this reason, it's recommended that service accounts not have Admin rights.

Cara pemeriksaan

Metode audit: Tinjauan manual

Rekomendasi ini tidak dapat diperiksa secara otomatis. Pemindaian akan menampilkannya beserta petunjuk ini saat Anda memberikan opsi --include-manual.

From Google Cloud Console 1. Go to IAM & admin/IAM using https://console.cloud.google.com/iam- admin/iam 2. Under the IAM Tab look for VIEW BY PRINCIPALS 3. Filter PRINCIPALS using type : Service account 4. Look for the Service Account with the nomenclature: SERVICE_ACCOUNT_NAME@PROJECT_ID.iam.gserviceaccount.com 5. Ensure that there are no such Service Accounts with roles containing *Admin or *admin or role matching Editor or role matching Owner under Role column. From Google Cloud CLI 1. Get the policy that you want to modify, and write it to a JSON file: gcloud projects get-iam-policy PROJECT_ID --format json > iam.json 2. The contents of the JSON file will look similar to the following. Note that role of members group associated with each serviceaccount does not contain *Admin or *admin or does not match roles/editor or does not match roles/owner. This recommendation is only applicable to User-Managed user-created service accounts. These accounts have the nomenclature: SERVICE_ACCOUNT_NAME@PROJECT_ID.iam.gserviceaccount.com. Note that some Google-managed, Google-created service accounts have the same naming format, and should be excluded (e.g., appsdev-apps-dev-script- auth@...

Cara perbaikan

Metode perbaikan: Panduan atau patch infrastruktur

From Google Cloud Console 1. Go to IAM & admin/IAM using https://console.cloud.google.com/iam- admin/iam 2. Under the IAM Tab look for VIEW BY PRINCIPALS 3. Filter PRINCIPALS using type : Service account 4. Look for the Service Account with the Principal nomenclature: SERVICE_ACCOUNT_NAME@PROJECT_ID.iam.gserviceaccount.com 5. Identify User-Managed user created service account with roles containing *Admin or *admin or role matching Editor or role matching Owner under Role Column. 6. Click on Edit (Pencil Icon) for the Service Account, it will open all the roles which are assigned to the Service Account. 7. Click the Delete bin icon to remove the role from the Principal (service account in this case) From Google Cloud CLI gcloud projects get-iam-policy PROJECT_ID --format json > iam.json 1. Using a text editor, Remove Role which contains roles/*Admin or roles/*admin or matched roles/editor or matches 'roles/owner`. Add a role to the bindings array that defines the group members and the role for those members. For example, to grant the role roles/appengine.appViewer to the ServiceAccount which is roles/editor, you would change the example shown below as follows: { "bindings": [ { "...

Properti

Sistem operasi
Apa saja
Tag
cloudgcp
Referensi
CIS Google Cloud Platform Foundation Benchmark v5.0.0 - 1.6 Ensure That Service Account Has No Admin Privileges