This document describes the audit logs created by Cloud Earth Engine as part of Cloud Audit Logs.
Google Cloud services write audit logs to help you answer the questions, "Who did what, where, and when?" within your Google Cloud resources.
Your Google Cloud projects contain only the audit logs for resources that are directly within the Cloud project. Other Google Cloud resources, such as folders, organizations, and billing accounts, contain the audit logs for the entity itself.
For a general overview of Cloud Audit Logs, see
Available audit logs
The following types of audit logs are available for the Earth Engine API:
Admin Activity audit logs
Includes "admin write" operations that write metadata or configuration information.
You can't disable Admin Activity audit logs.
Data Access audit logs
Includes "admin read" operations that read metadata or configuration information. Also includes "data read" and "data write" operations that read or write user-provided data.
To receive Data Access audit logs, you must explicitly enable them.
For fuller descriptions of the audit log types, see Types of audit logs.
The following summarizes which API operations correspond to each audit log type in Earth Engine:
|Audit logs category
|Admin Activity audit logs
|Data Access (ADMIN_READ) audit logs
|Data Access (DATA_READ) audit logs
|Data Access (DATA_WRITE) audit logs
|Data Access (DATA_WRITE or DATA_READ) audit logs
CopyAsset produces a DATA_READ audit log in the source project, and a DATA_WRITE audit log in the destination project.
MoveAsset produces DATA_READ and DATA_WRITE audit logs in the source project, and a DATA_WRITE audit log in the destination project.
Audit log format
Audit log entries include the following objects:
The log entry itself, which is an object of type
LogEntry. Useful fields include the following:
logNamecontains the resource ID and audit log type.
resourcecontains the target of the audited operation.
timeStampcontains the time of the audited operation.
protoPayloadcontains the audited information.
- The audit logging data, which is an
AuditLogobject held in the
protoPayloadfield of the log entry.
- Optional service-specific audit information, which is a service-specific object. For earlier integrations, this object is held in the
serviceDatafield of the
AuditLogobject; later integrations use the
For other fields in these objects, and how to interpret them, review Understand audit logs.
Cloud Audit Logs log names include resource identifiers indicating the Cloud project or other Google Cloud entity that owns the audit logs, and whether the log contains Admin Activity, Data Access, Policy Denied, or System Event audit logging data.
The following are the audit log names, including variables for the resource identifiers:
projects/PROJECT_ID/logs/cloudaudit.googleapis.com%2Factivity projects/PROJECT_ID/logs/cloudaudit.googleapis.com%2Fdata_access folders/FOLDER_ID/logs/cloudaudit.googleapis.com%2Factivity folders/FOLDER_ID/logs/cloudaudit.googleapis.com%2Fdata_access billingAccounts/BILLING_ACCOUNT_ID/logs/cloudaudit.googleapis.com%2Factivity billingAccounts/BILLING_ACCOUNT_ID/logs/cloudaudit.googleapis.com%2Fdata_access organizations/ORGANIZATION_ID/logs/cloudaudit.googleapis.com%2Factivity organizations/ORGANIZATION_ID/logs/cloudaudit.googleapis.com%2Fdata_access
Earth Engine audit logs use the service name
For a list of all the Cloud Logging API service names and their corresponding monitored resource type, see Map services to resources.
Earth Engine audit logs use the resource type
audited_resource for all audit logs.
For a list of all the Cloud Logging monitored resource types and descriptive information, see Monitored resource types.
Enable audit logging
Data Access audit logs are disabled by default and aren't written unless explicitly enabled (the exception is Data Access audit logs for BigQuery, which can't be disabled).
For information about enabling some or all of your Data Access audit logs, see Configure Data Access audit logs.
Permissions and roles
IAM permissions and roles determine your ability to access audit logs data in Google Cloud resources.
When deciding which Logging-specific permissions and roles apply to your use case, consider the following:
- The Logs Viewer role (
roles/logging.viewer) gives you read-only access to Admin Activity, Policy Denied, and System Event audit logs. If you have just this role, you cannot view Data Access audit logs that are in the
The Private Logs Viewer role (
roles/logging.privateLogViewer) includes the permissions contained in
roles/logging.viewer, plus the ability to read Data Access audit logs in the
Note that if these private logs are stored in user-defined buckets, then any user who has permissions to read logs in those buckets can read the private logs. For more information about log buckets, see Routing and storage overview.
For more information about the IAM permissions and roles that apply to audit logs data, see Access control with IAM.
To query for audit logs, you need to know the audit log name, which includes the resource identifier of the Cloud project, folder, billing account, or organization for which you want to view audit logging information. In your query, you can further specify other indexed
LogEntry fields, such as
resource.type. For more information on querying, see Build queries in the Logs Explorer.
You can view audit logs in Cloud Logging by using the console, the Google Cloud CLI, or the Logging API.
For example, to view all the project-level audit logs for Earth Engine, use the following query, supplying a valid resource identifier in each of the log names:
logName=("projects/PROJECT_ID/logs/cloudaudit.googleapis.com%2Factivity" OR "projects/PROJECT_ID/logs/cloudaudit.googleapis.com%2Fdata_access") protoPayload.serviceName="earthengine.googleapis.com"
Route audit logs
You can route audit logs to supported destinations in the same way that you can route other kinds of logs. Here are some reasons you might want to route your audit logs:
- To keep audit logs for a longer period of time or to use more powerful search capabilities, you can route copies of your audit logs to Cloud Storage, BigQuery, or Pub/Sub. Using Pub/Sub, you can route to other applications, other repositories, and to third parties.
- To manage your audit logs across an entire organization, you can create aggregated sinks that can route logs from any or all Cloud projects in the organization.
- If your enabled Data Access audit logs are pushing your Cloud projects over your log allotments, you can create sinks that exclude the Data Access audit logs from Logging.
For instructions about routing logs, see Configure and manage sinks.
For information about Cloud Logging pricing, see Google Cloud's operations suite pricing: Cloud Logging.