Prepare and test your skills

Prepare and test your skills

Configure Data Access Logs and Exemptions means turning on detailed read and data visibility only where it is needed and reducing noise where it is not. Cloud Audit Logs (opens in a new tab) is the system that records who did what, where, and when in Google Cloud. Each project, folder, and organization has audit log streams, and Data Access audit logs are the stream that records reads of configuration or metadata and user-driven calls that create, modify, or read user-provided data.
Types of Audit Logs in Cloud Audit Logs are categories based on the kind of action performed. Understanding the three main types explains why Data Access logs need special configuration.
In Cloud Logging, the protoPayload field of each entry holds an AuditLog object with the audit data. Cloud Audit Logs records actions taken by members of a Google Cloud organization, while Access Transparency logs record actions taken by Google personnel.
Why Data Access Logs Are Disabled by Default is explained by volume, cost, and noise. Admin Activity logs are always enabled because configuration changes are relatively low volume and critical for security. Data Access logs can grow very large because they capture frequent read and data operations, with BigQuery as the exception that enables them by default.
That volume creates cost and quota consequences. Data Access logs are subject to usage limits and quotas, and large volumes can incur storage and ingestion costs. Data Access audit logs also do not record access to resources that are publicly shared to All Users or All Authenticated Users, or that can be accessed without logging into Google Cloud, Google Workspace, Cloud Identity, or Drive Enterprise.
Exam tip: Admin Activity logs are always enabled, while Data Access logs are disabled by default except for BigQuery.
Enabling Data Access Logs for Specific Services means configuring logging per service so visibility is added only where it is required. When Data Access logs are enabled for a specific Google Cloud service, that service starts writing Data Access entries to Cloud Logging for its projects, folders, or organization. Disabling data sharing stops new events of that type from being sent, while existing logs remain through their retention periods.
This per-service choice balances compliance and operational transparency against volume. A team might enable Data Access logs for storage or database services that hold sensitive user data, while leaving them disabled for services where read visibility is not required. Because the logs flow from the service to Cloud Logging in the same organization, IAM permissions control who can view them through the Logging API, Logs Explorer, and Google Cloud CLI.
Managing Volume with Exemptions and Exclusion Filters means keeping high-value audit evidence while dropping low-value noise. A principal-based exemption excludes a specific principal, such as a service account that generates high-volume automated reads, from generating Data Access logs. The service still logs Data Access activity for all other principals, so audit coverage remains for human users and sensitive workloads.
Exclusion filters on log sinks provide a related control for routing and storage. After sharing is enabled, such as when Google Workspace shares its audit logs with Google Cloud, specific logs can be excluded from storage or export by setting up a sink with an exclusion filter. Together, per-service enablement, principal exemptions, and sink exclusions let teams manage log volume and optimize storage costs while maintaining necessary visibility.
Viewing, Retaining, and Exporting Audit Logs describes how audit evidence is stored, reviewed, and kept for longer analysis. Audit log entries are stored in Cloud Logging for a specified retention period and can be viewed through Logs Explorer, the Logging API, the Google Cloud CLI, or the Google Cloud console Activity page. To view Admin Activity audit logs, a user must have at least the Logs Viewer role or the basic Viewer role.
For longer retention or centralized review, log entries can be exported to other destinations. Aggregated exports can collect entries from all projects, folders, and billing accounts of an organization into one sink.
| Export destination | Purpose |
|---|---|
| Cloud Storage | Retain log entries beyond the default retention period for compliance |
| BigQuery | Analyze large audit datasets and compare current activity to past behavior |
| Pub/Sub | Stream log entries to other tools, including security monitoring workflows |
Logs that have aged out of Cloud Logging are visible only in the export destination, which makes export planning part of troubleshooting and audit strategy.
Categorize and Identify Audit Log Types means sorting resource interactions into Admin Activity, Data Access, System Event, and Policy Denied logs. Cloud Audit Logs (opens in a new tab) records each interaction as a LogEntry with audit data in its protoPayload field. Each category answers a different question: who changed configuration, who accessed data, what Google Cloud systems changed on their own, and what access was denied by policy.
Resources that can be accessed without logging into a Google Cloud account, Google Workspace, Cloud Identity, or Drive Enterprise account do not generate audit logs. When audit logs are generated, the log name shows which project, folder, billing account, or organization owns the logs and which category they belong to.
Admin Activity audit logs track administrative operations on resources. This category is identified by cloudaudit.googleapis.com/activity in the log name. These logs cover actions such as creating service accounts, creating service account keys, setting IAM policies, and creating, updating, or deleting resources.
In Logs Explorer, these logs are commonly queried with log_id("cloudaudit.googleapis.com/activity") combined with a resource type and method name, such as SetIamPolicy or CreateServiceAccount. Admin Activity logs capture configuration changes that are critical for security review.
Data Access audit logs record interactions that access data in Google Cloud services. These logs are written to the Google Cloud project whose data is accessed and are stored in the _Default log bucket unless routed elsewhere. Except for BigQuery, Data Access audit logs are disabled by default because they can generate large volumes of data.
To record Data Access audit logs for other Google Cloud services, you must explicitly enable them. Enabling them might result in additional log usage charges for the project, so Data Access logs are the main category that requires manual activation to capture resource interactions.
System Event audit logs are entries written by Google Cloud systems and managed service agents that modify the configuration of resources. System Event audit logs are not driven by direct user action. For example, a System Event audit log is written when virtual machines are automatically added to or removed from managed instance groups due to autoscaling.
System Event audit logs are always written, and you cannot configure, exclude, or disable them. Detailed information about which activities generate System Event logs for each service is listed in the Google Cloud services with audit logs reference.
Policy Denied audit logs are entries written when a Google Cloud service denies access to a user or service account because of a security policy violation. This category provides visibility into attempted access that was blocked, rather than access that succeeded. Policy Denied audit logs are generated by default, and the Google Cloud project is charged for log storage.
You cannot disable Policy Denied audit logs, but you can use exclusion filters to prevent Policy Denied audit logs from being stored in Cloud Logging. Detailed information about which activities generate Policy Denied logs for each service is listed in the Google Cloud services with audit logs reference.
How Default Behavior Compares Across Log Types shows which logs need manual activation and which cannot be turned off. Data Access logs depend on explicit enablement, while System Event and Policy Denied logs are generated automatically with different controls for storage.
Four audit log types compared side by side on default state, configurability and cost, showing Admin Activity and System Event always on and free versus Data Access off by default and Policy Denied on by default, both chargeable.
| Log type | What triggers the log | Default and control |
|---|---|---|
| Data Access | Access to data in the project whose data is accessed | Disabled by default, except for BigQuery; you must explicitly enable it for other services |
| System Event | Change made by Google Cloud systems or managed service agents, not by direct user action | Always written; cannot be configured, excluded, or disabled |
| Policy Denied | Denied access to a user or service account due to a security policy violation | Generated by default and charged for storage; cannot be disabled, but can be excluded from storage with exclusion filters |
Exam tip: Data Access logs require manual activation except for BigQuery, while System Event and Policy Denied logs are always generated and cannot be disabled.
Manage IAM Permissions for Audit Logging means using Identity and Access Management (IAM) to control who can read audit log data and who can change logging configuration. Identity and Access Management (IAM) (opens in a new tab) grants permissions only when a role is assigned to a principal on a project, folder, or organization. A principal can be a Google Account for a person or a service account for an application or compute workload.
This separation protects both privacy and integrity. Viewers can investigate activity without changing the logging setup, and only highly trusted administrators can change what gets logged. Because Cloud Audit Logs entries are immutable, IAM becomes the main control for keeping log history trustworthy while still available for security and compliance review.
Principals, Roles, and Audit Log Data describes the relationship between who requests access, what role they hold, and which logs they can see. An administrator grants a predefined role such as Logs Viewer or Private Logs Viewer, or creates a custom role with specific permissions, and the principal can then read only the log types allowed by that role. The same model applies to configuration, where changing audit behavior requires administrative roles on the resource that owns the logs.
Cloud Audit Logs produces four log types for each project, folder, and organization:
Roles That Control Who Can View Audit Logs split access by log type and storage bucket. Logs Viewer (roles/logging.viewer) grants read-only access to Admin Activity, Policy Denied, and System Event audit logs. Private Logs Viewer (roles/logging.privateLogViewer) grants access to all logs in the _Required and _Default buckets, including Data Access logs.
| Role | Logs that can be viewed | Limit |
|---|---|---|
Logs Viewer (roles/logging.viewer) | Admin Activity, Policy Denied, and System Event audit logs | Cannot view Data Access audit logs that are in the _Default bucket |
Private Logs Viewer (roles/logging.privateLogViewer) | All logs in the _Required and _Default buckets, including Data Access logs | Includes the permissions in Logs Viewer plus Data Access read permissions |
A related role, Logs View Accessor (roles/logging.viewAccessor), is also used in some workflows to grant view access to logs. Choose Logs Viewer when the person only needs operational and administrative history, and choose Private Logs Viewer only when the person must also see potentially sensitive Data Access logs.
Exam tip: Logs Viewer cannot view Data Access logs in the _Default bucket; viewing those logs requires Private Logs Viewer.
Roles That Control Who Can Configure Audit Logging depend on IAM policy ownership, not on logging viewer roles. At the project level, configuring Data Access audit logs for Google Cloud resources requires the roles/owner IAM role, because the change updates the project's IAM policy with an auditConfigs section. Roles such as Project IAM Admin (roles/resourcemanager.projectIamAdmin) are used to manage access to projects, folders, and organizations, including granting and changing these sensitive permissions.
Data Access logging is enabled per service by adding an audit configuration for that service and its log types. For example, the configuration for Google Cloud Storage uses service: storage.googleapis.com with logType: ADMIN_READ, logType: DATA_WRITE, and logType: DATA_READ. The update is applied through an ordered IAM policy workflow:
gcloud projects get-iam-policy PROJECT_ID > /tmp/policy.yaml to save the project's IAM policy to a file.auditConfigs section for the target service, while preserving the bindings: and etag: sections without changes.gcloud projects set-iam-policy PROJECT_ID /tmp/policy.yaml to apply the change, and repeat from reading the policy if the command reports a conflict with another change.Preserving bindings and etag matters because the policy file controls all access to the project. Changing or removing those sections by mistake can make the project unusable, while the etag field protects against overwriting a concurrent policy change.
Keeping Logging Configurations Secure depends on least privilege for both human users and service accounts. Production workloads should use a dedicated service account granted only the minimum roles needed, rather than reusing the Compute Engine default service account with broad permissions such as Editor. The organization policy constraint iam.automaticIamGrantsForDefaultServiceAccounts can prevent default service accounts from automatically receiving the Editor role, and Policy Simulator can be used to review the impact before replacing broad roles with less permissive ones.
IAM changes themselves are tracked by audit logs, which closes the loop on integrity. Admin Activity audit logs record events such as SetIamPolicy, creation of a service account, and creation of a service account key, while Policy Denied audit logs show denied access attempts. If access patterns change after a breach or production incident, these logs show who made the policy change, where the activity occurred, and when it happened.
_Default bucket.roles/owner role because the change updates the project's IAM policy with an auditConfigs section.Admin Activity audit logs record API calls or other actions that modify the configuration or metadata of resources while Data Access audit logs record API calls that read configuration or metadata plus user-driven calls that create, modify, or read user-provided resource data. Admin Activity audit logs are always enabled because configuration changes are low volume and critical for security, while Data Access audit logs are disabled by default except for BigQuery because they can grow very large and incur storage and ingestion costs.
Private Logs Viewer is required to view Data Access audit logs in the _Default bucket because Logs Viewer grants read-only access only to Admin Activity, Policy Denied, and System Event audit logs. Private Logs Viewer grants access to all logs in the _Required and _Default buckets, including Data Access logs.
Audit log volume can be managed by enabling Data Access audit logs only for specific services that require visibility and by using principal-based exemptions and exclusion filters on log sinks to reduce noise. A principal-based exemption excludes a specific principal such as a service account that generates high-volume automated reads from generating Data Access logs while the service still logs activity for all other principals, and an exclusion filter on a sink excludes specific logs from storage or export.
An organization is preparing for an IT security audit of their Google Cloud environment. During the initial review, the cloud administrator verifies that administrative actions that modify resource configurations—such as creating Compute Engine instances and updating IAM policies—are already visible in Cloud Logging. However, the compliance team also requires recording user-driven API calls that read resource configurations or read and write application data within services like Cloud Storage.
Which audit log type must be explicitly enabled to capture these user resource interactions?
Data Access audit logs
Admin Activity audit logs
System Event audit logs
Policy Denied audit logs
Last updated