- 필수 기능
- 시작하기
- Glossary
- 표준 속성
- Guides
- Agent
- 통합
- 개방형텔레메트리
- 개발자
- Administrator's Guide
- API
- Datadog Mobile App
- CoScreen
- Cloudcraft
- 앱 내
- 서비스 관리
- 인프라스트럭처
- 애플리케이션 성능
- APM
- Continuous Profiler
- 스팬 시각화
- 데이터 스트림 모니터링
- 데이터 작업 모니터링
- 디지털 경험
- 소프트웨어 제공
- 보안
- AI Observability
- 로그 관리
- 관리
Verify that users have the Service Account User (iam.serviceAccountUser
) and Service Account Token Creator (iam.serviceAccountTokenCreator
) roles for a specific service account rather than at the project level.
A service account is a special Google account that belongs to an application or a virtual machine (VM), instead of to an individual end user. Application/VM-Instance uses the service account to call the service’s Google API so that users aren’t directly involved. In addition to being an identity, a service account is a resource that has IAM policies attached to it. These policies determine who can use the service account.
Users with IAM roles to update the App Engine and Compute Engine instances (such as App Engine Deployer or Compute Instance Admin) can effectively run code as the service accounts used to run these instances, and indirectly gain access to all the resources for which the service accounts have access. Similarly, SSH access to a Compute Engine instance may also provide the ability to execute code as that instance/service account.
Based on business needs, there can be multiple user-managed service accounts configured for a project. Granting the iam.serviceAccountUser
or iam.serviceAccountTokenCreator
roles to a user for a project gives the user access to all service accounts in the project, including service accounts that may be created in the future. These roles can result in an elevation of privileges when someone uses a service account and corresponding Compute Engine instances.
In order to implement least privileges best practices, IAM users should not be assigned the Service Account User or Service Account Token Creator roles at the project level. Instead, these roles should be assigned to a user for a specific service account, giving that user access to the service account. The Service Account User role allows a user to bind a service account to a long-running job service, whereas the Service Account Token Creator role allows a user to directly impersonate (or assert) the identity of a service account.
After revoking Service Account User or Service Account Token Creator roles at the project level from all impacted user accounts, these roles should be assigned to users for specific service accounts according to business needs.
Role: Service Account User
.Service Account User
for every user
listed as a result of the filter.Role: Service Account Token Creator
.Service Account Token Creator
for
every user listed as a result of the filter.roles/iam.serviceAccountUser
or roles/iam.serviceAccountTokenCreator
.
For example, you can use the iam.json file shown below as follows:{
"bindings": [
{
"members": [ "serviceAccount:our-project-123@appspot.gserviceaccount.com",
],
"role": "roles/appengine.appViewer" },
{
"members": [
"user:email1@gmail.com"
],
"role": "roles/owner"
},
{
"members": [
"serviceAccount:our-project-123@appspot.gserviceaccount.com",
"serviceAccount:123456789012-compute@developer.gserviceaccount.com" ],
"role": "roles/editor"
}
],
"etag": "BwUjMhCsNvY="
}
gcloud projects set-iam-policy PROJECT_ID iam.json
By default, users do not have the Service Account User or Service Account Token Creator role assigned at the project level.
A user-managed key cannot be created on GCP-Managed Service Accounts.