TMAegis베타
gcp 관련 규칙 더 보기

Google Cloud

TMA-GCP-1.5

Ensure That There Are Only GCP-Managed Service Account Keys for Each Service Account

보통레벨 1수동 검토gcp

설명

User-managed service accounts should not have user-managed keys. Anyone who has access to the keys will be able to access resources through the service account. GCP-managed keys are used by Cloud Platform services such as App Engine and Compute Engine. These keys cannot be downloaded. Google will keep the keys and automatically rotate them on an approximately weekly basis. User-managed keys are created, downloadable, and managed by users. They expire 10 years from creation. For user-managed keys, the user has to take ownership of key management activities which include: - Key storage - Key distribution - Key revocation - Key rotation - Protecting the keys from unauthorized users - Key recovery Even with key owner precautions, keys can be easily leaked by common development malpractices like checking keys into the source code or leaving them in the Downloads directory, or accidentally...

점검 방법

감사 방식: 수동 검토

이 권장 사항은 자동으로 점검할 수 없습니다. --include-manual 옵션을 전달하면 스캔 결과에 이 지침과 함께 표시됩니다.

From Google Cloud Console 1. Go to the IAM page in the GCP Console using https://console.cloud.google.com/iam-admin/iam 2. In the left navigation pane, click Service accounts. All service accounts and their corresponding keys are listed. 3. Click the service accounts and check if keys exist. From Google Cloud CLI List All the service accounts: gcloud iam service-accounts list Identify user-managed service accounts which have an account EMAIL ending with iam.gserviceaccount.com For each user-managed service account, list the keys managed by the user: gcloud iam service-accounts keys list --iam-account=<Service Account> -- managed-by=user No keys should be listed.

조치 방법

조치 방식: 가이드 또는 인프라 패치

From Google Cloud Console 1. Go to the IAM page in the GCP Console using https://console.cloud.google.com/iam-admin/iam 2. In the left navigation pane, click Service accounts. All service accounts and their corresponding keys are listed. 3. Click the service account. 4. Click the edit and delete the keys. From Google Cloud CLI To delete a user managed Service Account Key, gcloud iam service-accounts keys delete --iam-account=<user-managed-service- account-EMAIL> <KEY-ID> Prevention: You can disable service account key creation through the Disable service account key creation Organization policy by visiting https://console.cloud.google.com/iam-admin/orgpolicies/iam- disableServiceAccountKeyCreation. Learn more at: https://cloud.google.com/resource- manager/docs/organization-policy/restricting-service-accounts In addition, if you do not need to have service accounts in your project, you can also prevent the creation of service accounts through the Disable service account creation Organization policy: https://console.cloud.google.com/iam- admin/orgpolicies/iam-disableServiceAccountCreation.

속성

운영 체제
모두
태그
cloudcryptogcp
참고 자료
CIS Google Cloud Platform Foundation Benchmark v5.0.0 - 1.5 Ensure That There Are Only GCP-Managed Service Account Keys for Each Service Account