| name | cis-gcp-foundations-2.1 |
| description | Ensure That Cloud Audit Logging Is Configured Properly |
| category | cis-gcp-foundations |
| version | 4.0.0 |
| author | cyberstrike-official |
| tags | ["cis","gcp","logging","monitoring","cloud-audit","data-access"] |
| cis_id | 2.1 |
| cis_benchmark | CIS Google Cloud Platform Foundation Benchmark v4.0.0 |
| tech_stack | ["gcp"] |
| cwe_ids | [] |
| chains_with | [] |
| prerequisites | [] |
| severity_boost | {} |
Ensure That Cloud Audit Logging Is Configured Properly (Automated)
Description
It is recommended that Cloud Audit Logging is configured to track all admin activities and read, write access to user data.
Rationale
Cloud Audit Logging maintains two audit logs for each project, folder, and organization: Admin Activity and Data Access.
- Admin Activity logs contain log entries for API calls or other administrative actions that modify the configuration or metadata of resources. Admin Activity audit logs are enabled for all services and cannot be configured.
- Data Access audit logs record API calls that create, modify, or read user-provided data. These are disabled by default and should be enabled.
There are three kinds of Data Access audit log information:
- Admin read: Records operations that read metadata or configuration information. Admin Activity audit logs record writes of metadata and configuration information that cannot be disabled.
- Data read: Records operations that read user-provided data.
- Data write: Records operations that write user-provided data.
It is recommended to have an effective default audit config configured in such a way that:
- logtype is set to DATA_READ (to log user activity tracking) and DATA_WRITES (to log changes/tampering to user data).
- audit config is enabled for all the services supported by the Data Access audit logs feature.
- Logs should be captured for all users, i.e., there are no exempted users in any of the audit config sections. This will ensure overriding the audit config will not contradict the requirement.
Impact
There is no charge for Admin Activity audit logs. Enabling the Data Access audit logs might result in your project being charged for the additional logs usage.
Audit Procedure
Using Google Cloud Console
- Go to
Audit Logs by visiting https://console.cloud.google.com/iam-admin/audit.
- Ensure that Admin Read, Data Write, and Data Read are enabled for all Google Cloud services and that no exemptions are allowed.
Using Google Cloud CLI
- List the Identity and Access Management (IAM) policies for the project, folder, or organization:
gcloud organizations get-iam-policy ORGANIZATION_ID
gcloud resource-manager folders get-iam-policy FOLDER_ID
gcloud projects get-iam-policy PROJECT_ID
- Policy should have a default
auditConfigs section which has the logtype set to DATA_WRITES and for all services. Note that projects inherit settings from folders, which in turn inherit settings from the organization. When called, , the result shows only the policies set in the project, not the policies inherited from the parent folder or organization. Nevertheless, if the parent folder has Cloud Audit Logging enabled, the project does as well.