Learning center

Identify the denied principal in a Google Cloud audit log

Use the audit log for the failed method to distinguish the identity that called the service from the identity that delegated to it. Keep the principal and the delegation chain as separate fields in the incident receipt.

Suppose a fictional export reports a Cloud Storage 403. The relevant audit entry identifies the service account exporter in protoPayload.authenticationInfo.principalEmail, plus a delegating principal in serviceAccountDelegationInfo. Locate the authorizationInfo entry for the expected permission and resource. When the permission entry reports granted: false, investigate authorization for the service account that made the Storage request. If token creation itself failed, inspect the earlier IAM Credentials call and its principal instead. Cloud Audit Logs identity and redaction ยท AuditLog fields

Use the service's recorded method, target and time together to find that entry. Some log types require configuration and some failures redact caller information. Preserve the uncertainty when the entry lacks the principal. A current application configuration alone cannot fill that gap.

Trace another denied request.

One month of free code review.

New organizations get one calendar month of hosted code review for private and public GitHub repositories. No card or cloud connection required. Eligibility and fair-use terms.

Start free with GitHub

Related reading