What are Data Access Logs in Google Cloud Platform?
Data Access Logs record who accessed your data and what actions they performed. They help track and audit data usage for security and compliance.
Click to reveal answer
beginner
Which Google Cloud service stores Data Access Logs?
Cloud Audit Logs stores Data Access Logs, capturing API calls that read or modify data in your Google Cloud resources.
Click to reveal answer
intermediate
How do Data Access Logs differ from Admin Activity Logs?
Admin Activity Logs record changes to configuration or metadata, while Data Access Logs record read or write actions on the actual data.
Click to reveal answer
intermediate
Why should you enable Data Access Logs only when needed?
Because Data Access Logs can generate a large volume of logs, increasing storage costs and complexity. Enable them selectively for important resources.
Click to reveal answer
beginner
Name two ways to view Data Access Logs in GCP.
You can view Data Access Logs in the Cloud Logging console or export them to BigQuery for detailed analysis.
Click to reveal answer
What type of actions do Data Access Logs record in GCP?
AReading or modifying data
BChanging resource configurations
CBilling transactions
DNetwork traffic
✗ Incorrect
Data Access Logs capture actions that read or modify data, unlike Admin Activity Logs which track configuration changes.
Where are Data Access Logs stored in Google Cloud?
ACloud Functions
BCloud Storage buckets
CCloud Audit Logs
DCloud SQL
✗ Incorrect
Cloud Audit Logs is the service that stores Data Access Logs in GCP.
Why might enabling Data Access Logs increase costs?
AThey require additional compute resources
BThey generate many log entries increasing storage and processing costs
CThey slow down network traffic
DThey increase API call charges
✗ Incorrect
Data Access Logs can produce a large volume of logs, which increases storage and analysis costs.
Which of these is NOT a use of Data Access Logs?
AAuditing who accessed data
BTracking data read and write operations
CSupporting compliance requirements
DMonitoring configuration changes
✗ Incorrect
Monitoring configuration changes is done by Admin Activity Logs, not Data Access Logs.
How can you analyze Data Access Logs beyond the Cloud Logging console?
AExport logs to BigQuery for querying
BSend logs to Cloud DNS
CStore logs in Cloud Spanner
DUse Cloud Run to process logs
✗ Incorrect
Exporting logs to BigQuery allows detailed querying and analysis of Data Access Logs.
Explain what Data Access Logs are and why they are important in Google Cloud.
Think about who accessed data and what they did.
You got /3 concepts.
Describe best practices for enabling and managing Data Access Logs in GCP.
Consider cost and volume of logs.
You got /4 concepts.
Practice
(1/5)
1. What is the main purpose of data access logs in Google Cloud?
easy
A. To reduce storage costs
B. To record who accessed or changed your cloud data
C. To automatically backup your data
D. To increase the speed of data processing
Solution
Step 1: Understand what data access logs record
Data access logs track user actions on cloud data, such as access or changes.
Step 2: Identify the main purpose
The main goal is to monitor and audit who accessed or modified data for security and compliance.
Final Answer:
To record who accessed or changed your cloud data -> Option B
Quick Check:
Data access logs = record access and changes [OK]
Hint: Logs track data access and changes, not performance or cost [OK]
Common Mistakes:
Confusing logs with backup or performance tools
Thinking logs reduce costs automatically
Assuming logs speed up data processing
2. Which of the following is the correct way to enable data access logs for a Google Cloud service?
easy
A. Install a logging agent on your local machine
B. Create a firewall rule to allow logging
C. Use Cloud Storage lifecycle rules
D. Enable audit logs in Cloud IAM & Admin for the service
Solution
Step 1: Identify how to enable data access logs
Data access logs are enabled by configuring audit logs in Cloud IAM & Admin for the specific service.
Step 2: Eliminate unrelated options
Firewall rules, local agents, and storage lifecycle rules do not enable audit logging.
Final Answer:
Enable audit logs in Cloud IAM & Admin for the service -> Option D
Quick Check:
Audit logs enabled via IAM & Admin [OK]
Hint: Audit logs are enabled in IAM & Admin, not by firewall or agents [OK]
Common Mistakes:
Confusing firewall rules with logging setup
Thinking local agents enable cloud audit logs
Using storage lifecycle rules for logging
3. Given this filter for a logging sink: resource.type="bigquery_resource" AND protoPayload.methodName="tableservice.insert" What logs will this sink collect?
medium
A. All Cloud Storage bucket creations
B. All BigQuery query executions
C. All BigQuery table creation events
D. All Compute Engine VM starts
Solution
Step 1: Analyze the filter components
The filter targets resource type 'bigquery_resource' and method 'tableservice.insert', which means table creation in BigQuery.
Step 2: Match filter to log events
This filter collects logs about BigQuery tables being created, not queries or other services.
Final Answer:
All BigQuery table creation events -> Option C
Quick Check:
Filter matches BigQuery table inserts [OK]
Hint: Look for resource type and method name to identify event type [OK]
Common Mistakes:
Confusing table creation with query execution
Mixing BigQuery with Cloud Storage or Compute Engine
Ignoring methodName in filter
4. You created a logging sink to export data access logs to BigQuery but see no data arriving. What is a likely cause?
medium
A. Data access logs are disabled in the project
B. BigQuery dataset is in a different region
C. The sink uses a Cloud Storage bucket instead of BigQuery
D. The sink filter excludes data access logs
Solution
Step 1: Check if data access logs are enabled
If data access logs are disabled, no logs will be generated or exported.
Step 2: Consider other causes
While filters and regions matter, the most common cause is logs not enabled at all.
Final Answer:
Data access logs are disabled in the project -> Option A
Quick Check:
Logs must be enabled to export data [OK]
Hint: Verify logs are enabled before checking sinks [OK]
Common Mistakes:
Assuming filter or region is always the problem
Confusing sink destination with log generation
Not enabling data access logs in IAM & Admin
5. You want to audit all data access to Cloud Storage buckets in your project and store logs in BigQuery for analysis. Which steps should you take?
hard
A. Enable data access audit logs for Cloud Storage, create a sink with filter resource.type="gcs_bucket", export to BigQuery dataset
B. Enable system logs only, create a sink exporting all logs to Cloud Storage
C. Install logging agents on VMs, export logs to BigQuery without filters
D. Create a firewall rule to allow logging traffic, enable data access logs
Solution
Step 1: Enable data access audit logs for Cloud Storage
This ensures logs capture who accessed or changed Cloud Storage buckets.
Step 2: Create a sink with filter resource.type="gcs_bucket" and export to BigQuery
This filters logs to only Cloud Storage bucket access and stores them in BigQuery for analysis.
Final Answer:
Enable data access audit logs for Cloud Storage, create a sink with filter resource.type="gcs_bucket", export to BigQuery dataset -> Option A