To ensure security, compliance, and effective troubleshooting, enable Data Access audit logs for your API Gateway APIs. API Gateway provides two main types of audit logs:
- Admin Activity audit logs: These logs capture operations that modify the configuration or metadata of resources, such as updating or deleting APIs or API gateways. Admin Activity audit logs are enabled by default and cannot be turned off.
- Data Access audit logs: These logs track operations not covered by Admin Activity logs. Data Access audit logs include the following sub-types:
- - ADMIN_READ: Logs operations that read metadata or configuration information. This is useful for auditing who has read-only access to the configurations or settings of your API Gateway resources.
- - DATA_READ: Logs operations that read user-provided data. This is useful for tracking read interactions with your API Gateway resources.
- - DATA_WRITE: Logs operations that write user-provided data. This is critical for tracking changes to your API Gateway configuration and resources.
optimisation
efficiency
excellence
Enabling Data Access audit logs for API Gateway APIs is crucial for ensuring compliance, strengthening security, promoting accountability, and streamlining troubleshooting efforts. By actively monitoring and analyzing activity for your API Gateway resources, you can gain valuable insights that enable swift detection and response to potential security threats. In Google Cloud Platform (GCP), Data Access audit logs capture API calls that access resource configurations or metadata, along with user-initiated API calls that create, modify, or read data provided by users.
Audit
To determine if Data Access audit logs are enabled for your API Gateway APIs, perform the following operations:
Remediation / Resolution
To enable Data Access audit logs for your API Gateway APIs, perform the following operations:
References
- Google Cloud Platform (GCP) Documentation
- Cloud Audit Logs overview
- API Gateway audit logging
- Enable Data Access audit logs
- GCP Command Line Interface (CLI) Documentation
- gcloud projects list
- gcloud projects get-iam-policy
- gcloud projects set-iam-policy