IAM misconfigurations

User assigned with ‘Service Account User’ or ‘Service Account Token Creator’ roles at project level

Description

Granting the 'iam.serviceAccountUser' or 'iam.serviceAserviceAccountTokenCreatorccountUser' 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. This can result in elevation of privileges by using service accounts 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.
  • Recommended Mitigation

    Service Account User or Service Account Token Creator roles should be assigned to a user for a specific service account, giving that user access to the service account