Benchmark: IAM
Description
This section contains recommendations for configuring IAM resources.
Usage
Install the mod:
mkdir dashboardscd dashboardspowerpipe mod initpowerpipe mod install github.com/turbot/steampipe-mod-gcp-compliance
Start the Powerpipe server:
steampipe service startpowerpipe server
Open http://localhost:9033 in your browser and select IAM.
Run this benchmark in your terminal:
powerpipe benchmark run gcp_compliance.benchmark.all_controls_iam
Snapshot and share results via Turbot Pipes:
powerpipe benchmark run gcp_compliance.benchmark.all_controls_iam --share
Controls
- Prevent public users from having access to resources via IAM
- Ensure API keys are rotated every 90 days
- Ensure API keys are restricted to only APIs that application needs access
- Ensure API keys are restricted to use by only specified Hosts and Apps
- Check if service account keys are older than 100 days
- Ensure that there are only GCP-managed service account keys for each service account
- Ensure user-managed/external keys for service accounts are rotated every 90 days or less
- Ensure that Service Account has no Admin privileges
- Ensure that Separation of duties is enforced while assigning KMS related roles to users
- Ensure that IAM users are not assigned the Service Account User or Service Account Token Creator roles at project level
- Ensure that Separation of duties is enforced while assigning service account related roles to users
- Only allow members from my domain to be added to IAM roles