API Keys audit logging

This document describes audit logging for API keys. Google Cloud services write audit logs that record administrative activities and accesses within your Google Cloud resources. For an overview of audit logs with information about the different types of audit logs, see Cloud Audit Logs overview.

This page was last generated on 2024-05-09 14:59:40 UTC.

Service name

API keys audit logs use the service name apikeys.googleapis.com.

Methods by permission type

Methods that check DATA_READ, DATA_WRITE, and ADMIN_READ permission types are Data Access audit logs. Methods that check ADMIN_WRITE permission types are Admin Activity audit logs.

Permission type Methods
ADMIN_READ google.api.apikeys.v2.ApiKeys.GetKeyString
ADMIN_WRITE google.api.apikeys.v2.ApiKeys.CreateKey
google.api.apikeys.v2.ApiKeys.DeleteKey
google.api.apikeys.v2.ApiKeys.UndeleteKey
google.api.apikeys.v2.ApiKeys.UpdateKey
google.longrunning.Operations.GetOperation

Audit logs per API interface

For information about which permissions are evaluated and how for each method, see the Identity and Access Management documentation for API keys.

google.api.apikeys.v2.ApiKeys

Details about audit logs associated with methods belonging to google.api.apikeys.v2.ApiKeys.

google.api.apikeys.v2.ApiKeys.CreateKey

  • Method: google.api.apikeys.v2.ApiKeys.CreateKey
  • Audit log Type: Admin Activity
  • Permissions:
    • serviceusage.apiKeys.create - ADMIN_WRITE
  • Method is a Long Running Operation or Streaming: Long Running Operation
  • Filter for this method: protoPayload.methodName="google.api.apikeys.v2.ApiKeys.CreateKey"

google.api.apikeys.v2.ApiKeys.DeleteKey

  • Method: google.api.apikeys.v2.ApiKeys.DeleteKey
  • Audit log Type: Admin Activity
  • Permissions:
    • serviceusage.apiKeys.delete - ADMIN_WRITE
  • Method is a Long Running Operation or Streaming: Long Running Operation
  • Filter for this method: protoPayload.methodName="google.api.apikeys.v2.ApiKeys.DeleteKey"

google.api.apikeys.v2.ApiKeys.GetKeyString

  • Method: google.api.apikeys.v2.ApiKeys.GetKeyString
  • Audit log Type: Data Access
  • Permissions:
    • apikeys.keys.getKeyString - ADMIN_READ
  • Method is a Long Running Operation or Streaming: No.
  • Filter for this method: protoPayload.methodName="google.api.apikeys.v2.ApiKeys.GetKeyString"

google.api.apikeys.v2.ApiKeys.UndeleteKey

  • Method: google.api.apikeys.v2.ApiKeys.UndeleteKey
  • Audit log Type: Admin Activity
  • Permissions:
    • apikeys.keys.undelete - ADMIN_WRITE
  • Method is a Long Running Operation or Streaming: Long Running Operation
  • Filter for this method: protoPayload.methodName="google.api.apikeys.v2.ApiKeys.UndeleteKey"

google.api.apikeys.v2.ApiKeys.UpdateKey

  • Method: google.api.apikeys.v2.ApiKeys.UpdateKey
  • Audit log Type: Admin Activity
  • Permissions:
    • serviceusage.apiKeys.update - ADMIN_WRITE
  • Method is a Long Running Operation or Streaming: Long Running Operation
  • Filter for this method: protoPayload.methodName="google.api.apikeys.v2.ApiKeys.UpdateKey"

google.longrunning.Operations

Details about audit logs associated with methods belonging to google.longrunning.Operations.

google.longrunning.Operations.GetOperation

  • Method: google.longrunning.Operations.GetOperation
  • Audit log Type: Admin Activity
  • Permissions:See IAM documentation for permissions.
  • Method is a Long Running Operation or Streaming: No.
  • Filter for this method: protoPayload.methodName="google.longrunning.Operations.GetOperation"

Methods that don't produce audit logs

Generally methods don't produce audit logs because they are high volume and doing so would be very expensive, or because the method has low auditing value, or because another audit or platform log already provides coverage for what the method does.

The following methods don't produce audit logs:

  • google.api.apikeys.v2.ApiKeys.GetKey
  • google.api.apikeys.v2.ApiKeys.ListKeys
  • google.api.apikeys.v2.ApiKeys.LookupKey