Google Cloud Audit Log Fields: protoPayload Reference With Examples
Published
One LogEntry per API call against a Google Cloud resource: the log it belongs to (Admin Activity, Data Access…), when, and in protoPayload who called which method of which service on which resource, from which address, whether permission was granted and how the call ended.
Official documentation: Google Cloud: Cloud Audit Logs overview · Google Cloud: AuditLog type reference · Google Cloud: IAM audit logging examples
Sample record
Numbered lines are the fields in the table.
From the LogTriage parser test corpus — synthetic data, no real hosts or users. The first record of the sample, pretty-printed.
Explain this record field by field →
Show the sample lines as they appear in the file
{"logName":"projects/corp-prod/logs/cloudaudit.googleapis.com%2Fdata_access","timestamp":"2024-03-15T09:00:00.000Z","severity":"INFO","protoPayload":{"@type":"type.googleapis.com/google.cloud.audit.AuditLog","serviceName":"container.googleapis.com","methodName":"google.container.v1.ClusterManager.GetCluster","resourceName":"projects/corp-prod/zones/us-central1-a/clusters/prod-cluster","authenticationInfo":{"principalEmail":"[email protected]"},"requestMetadata":{"callerIp":"203.0.113.10","callerSuppliedUserAgent":"google-cloud-sdk gcloud/456.0.0"},"status":{"code":0}}}, Field reference
| Field | Type | Meaning | Why it matters for security |
|---|---|---|---|
| 1logNamee.g. projects/corp-prod/logs/cloudaudit.googleapis.com%2Factivity | string | Which audit log the entry is in. Google names four per project: cloudaudit.googleapis.com%2Factivity (Admin Activity), %2Fdata_access (Data Access), %2Fsystem_event and %2Fpolicy. | Admin Activity holds configuration changes and is always on; Data Access holds reads and, except for BigQuery, is off unless you enable it. |
| 2timestampe.g. 2024-03-15T09:00:00.000Z | date-time (UTC) | When the logged event occurred, in RFC 3339 UTC. | The basis of the timeline; receiveTimestamp, when present, is when Logging received it. |
| 3severitye.g. NOTICE | string | The entry's severity. Admin Activity entries are NOTICE, Data Access entries INFO; a failed call is ERROR. | An ERROR on a decrypt or secret read is a refused attempt — worth more attention than the INFO noise around it. |
| 4protoPayload. | string | Google: "The name of the API service performing the operation." | iam.googleapis.com and cloudresourcemanager.googleapis.com are where privilege changes happen; cloudkms and secretmanager where secrets are read. |
| 5protoPayload. | string | Google: "The name of the service method or operation. For API calls, this should be the name of the API method." | CreateServiceAccountKey, SetIamPolicy and CreateRole are the persistence and escalation steps to look for. |
| 6protoPayload. | string | Google: "The resource or collection that is the target of the operation." A scheme-less URI without the service name. | Tells you which project, bucket, key or service account was touched; a key created for a service account that never had one is persistence. |
| 7protoPayload. | string | Google: "The email address of the authenticated user (or service account on behalf of third party principal) making the request." | A service account calling IAM methods from an address outside Google Cloud, with a hand-written user agent, is a stolen key being used. |
| 8protoPayload. | IP address or "private" | Google: "The IP address of the caller. For a caller from the internet, this will be the public IPv4 or IPv6 address." Calls between Google services show private, and some VM calls gce-internal-ip. | A service account normally called from inside the project appearing from an internet address is the first sign its key leaked. |
| 9protoPayload. | string | Google: "The user agent of the caller. This information is not authenticated and should be treated accordingly." | gcloud, Terraform and client libraries identify themselves; python-requests against IAM APIs is a script someone wrote. |
| protoPayload. | string | The IAM permission that was checked. Google records one authorizationInfo element "for each {resource, permission} tuple." | The permission is what matters for escalation analysis — iam.serviceAccountKeys.create or resourcemanager.projects.setIamPolicy granted to a principal that should not have it. |
| protoPayload. | boolean | Whether the permission check succeeded. | false on sensitive permissions is an attacker discovering what a stolen identity can do. |
| 12protoPayload. | number | Google: "The status of the overall operation." A google.rpc status: 0 is success, 7 is PERMISSION_DENIED. | Code 7 bursts against several services from one principal is permission enumeration. |
Have one of your own records? Paste it into the log line explainer and each field is explained from this table, with times, codes and addresses decoded — in your browser.
What it records
Every Cloud Audit Logs entry is a LogEntry whose protoPayload is an AuditLog object. The outer fields say which log it belongs to (logName), when (timestamp) and how severe it is (severity). Inside protoPayload: the service and method called (serviceName, methodName), the target (resourceName), the caller (authenticationInfo.principalEmail, requestMetadata.callerIp and callerSuppliedUserAgent), the permission checks (authorizationInfo[], each with permission and granted) and the outcome (status).
The malicious sample is a privilege escalation by a service account whose key is being used from outside Google Cloud: it creates a custom role and changes the project’s IAM policy, lists buckets and objects, creates a new key for itself — persistence — and is refused when it tries to decrypt with a KMS key (status.code 7, PERMISSION_DENIED).
Where to get it
- Logs Explorer. Filter on
logNameandprotoPayloadfields in the console and download results as JSON. - gcloud.
gcloud logging readwith the same filter syntax, as in the example below. - Sinks. A log sink routes audit logs to BigQuery, Cloud Storage or Pub/Sub, which is how SIEMs and long-term retention receive them. Set one up at the organization level to cover every project.
- Enable Data Access logs. In IAM & Admin → Audit Logs, per service; without this most reads are never logged.
# IAM policy changes and new service account keys in the last 7 days
gcloud logging read 'logName:"cloudaudit.googleapis.com%2Factivity" AND (protoPayload.methodName="SetIamPolicy" OR protoPayload.methodName="google.iam.admin.v1.CreateServiceAccountKey")' --freshness=7d --format=json
Parsing pitfalls
- Encoded log names. The slash in the log ID is encoded as
%2F; matchcloudaudit.googleapis.com%2Factivity, not/activity. - Nested paths. Everything interesting is under
protoPayload; flattening to dotted names (protoPayload.authenticationInfo.principalEmail) makes rules portable. - Method names vary by service. IAM uses fully qualified names (
google.iam.admin.v1.CreateRole), Resource Manager plain ones (SetIamPolicy), Storage dotted ones (storage.objects.list). Match exactly what the service writes. - Arrays.
authorizationInfois a list; a rule that reads only the first element misses the permission that mattered. - Redacted callers.
callerIpcan beprivateorgce-internal-ip, and the principal email can be redacted for some callers.
Detection ideas
- Privilege escalation:
SetIamPolicy,CreateRoleorUpdateRoleby a service account, especially from an internetcallerIp— the GCP IAM escalation rule. - Persistence:
google.iam.admin.v1.CreateServiceAccountKey, particularly for a service account by itself. - Enumeration: bursts of
listmethods across Storage, Compute and IAM, and status code 7 across services from one principal. - Secret access: KMS
Decryptor Secret ManagerAccessSecretVersionfrom a principal that does not normally do it — visible only with Data Access logs on. - Stolen keys: a service account calling from an address outside your projects with a scripting user agent.
The free browser analyzer reads Cloud Audit Logs exports and runs these checks locally.
Sending GCP Cloud Audit Log to an LLM
One megabyte of this format is about 463,939 tokens on current Claude models and 253,680 on GPT models, measured with the models' own tokenizers — so a gigabyte sent raw to Claude Sonnet 5.5 costs about $928 in input tokens alone (prices of 2026-10-24). Estimate your own volume →
Detections and guides for GCP Cloud Audit Log
Frequently Asked Questions
- Why can't I see who read my Cloud Storage objects?
- Reads are recorded in Data Access audit logs, and Google states that, except for BigQuery, Data Access audit logs are disabled by default. Until someone enables them for the service in the project or organization, object reads, secret reads and KMS decrypts leave no audit record. Enable them before an incident for the services that hold sensitive data.
- What is the difference between the activity and data_access logs?
- Admin Activity (cloudaudit.googleapis.com%2Factivity) records calls that change configuration or metadata: creating keys, changing IAM policy, creating roles. It is always on and free. Data Access (cloudaudit.googleapis.com%2Fdata_access) records reads of configuration and of user data. The malicious sample shows both: the IAM changes in activity, the bucket listing and the refused KMS decrypt in data_access.
- Can I trust callerIp and the user agent?
- The callerIp is the address Google saw, except that calls between Google services are redacted to private and some VM calls to gce-internal-ip. The user agent is supplied by the caller, and Google says to treat it as unauthenticated. Use the address and principal for conclusions and the user agent as a hint.
- How do I read audit logs from the command line?
- gcloud logging read with a filter on logName and protoPayload fields returns entries as JSON, for example: gcloud logging read 'logName:"cloudaudit.googleapis.com%2Factivity" AND protoPayload.methodName="SetIamPolicy"' --freshness=7d --format=json. The output has the same field names as this page.
Analyze a GCP Cloud Audit Log file in your browser
The free analyzer detects this format, parses every field above and flags attack patterns — the file never leaves your machine. For threat-intel enrichment and an AI-written incident report, run it through LogTriage.
Investigating something right now? LogTriage checks every address in the file against threat intelligence and writes the incident report: 10 analyses a month free. The incident pack adds the in-depth AI analysis and files up to 100 MB: 25 analyses for $19, one payment, no subscription. Pricing
How this page was made. The official definitions, field names and examples on it are copied by script from the sources it links and re-checked against them on every build. The investigation advice was drafted with AI from those sources and passed a separate review before publishing. What is checked, and how · found a mistake? [email protected]