Prepare and test your skills

Prepare and test your skills

Fine-grained access control and governance for a data lake is the practice of enforcing unified, least-privilege access across Cloud Storage (opens in a new tab) and BigQuery (opens in a new tab) using layered controls. Identity and Access Management (IAM) (opens in a new tab) provides the coarse boundary for who can act, while row-level security, column-level security, data masking, and authorized views restrict what data is visible at query time. Cloud Key Management Service (Cloud KMS) (opens in a new tab) encryption, policy-based tagging, and catalog governance bind those access decisions to encryption, classification, and audit. Together the layers ensure that permission to run a job does not automatically grant permission to see the data.
Role-based access control with least privilege means every user, group, or service account receives only the minimum permissions needed for its role, such as no-access, read-only, or write. This limitation is critical when lake data includes sensitive records, feature-store data, or model-training hyperparameters, because it prevents data theft, preserves model integrity, and reduces the surface for accidents or attacks. Operational control is separated from data access control, so permission to run a Dataflow job does not by itself grant permission to read the underlying data, and data access is provisioned through an independent approval process.
Granular IAM enforcement builds on that separation through three complementary mechanisms:
Custom roles extend this model when predefined roles are too broad, allowing permissions to match a specific job function without overprovisioning.
Granular IAM for Cloud Storage and BigQuery applies the same least-privilege principle at the storage layer, with controls scoped to each service boundary. In Cloud Storage, IAM policies apply to buckets and managed folders, so traffic from a requester flows first through the bucket policy check and then through the managed-folder policy check before reaching objects. In BigQuery, IAM roles and permissions apply to datasets and to resources within datasets, so the dataset boundary controls broad access while table, view, and job permissions refine it. Virtual Private Cloud Service Controls (VPC Service Controls) adds a network trust boundary around those resources by establishing an access perimeter that blocks data movement outside the perimeter even when IAM would otherwise allow it.
BigQuery fine-grained controls enforce access at query time, after IAM has allowed the query job to run. Authorized views, column-level security, row-level security, and dynamic data masking each restrict a different slice of the same table without copying data.
| Control | Scope | How access is decided |
|---|---|---|
| Authorized views | Subset defined by a view query | The view is authorized on the source dataset, so the reader queries the view without having access to the underlying source data |
| Column-level security | Sensitive columns | A policy checks at query time whether the requester holds access to the policy tag or type-based classification on the column |
| Row-level security | Subset of rows | An access policy filters rows so the query returns only rows the requester is entitled to see |
| Column data masking | Sensitive values within a column | The query returns the row and surrounding columns, but the sensitive value is obscured, including values that match sensitive-data patterns |
Choose authorized views when consumers need derived results without source access, column-level security when entire columns must be denied, row-level security when different users must see different rows in one table, and masking when users need the row context without revealing the sensitive value.
Exam tip: Column-level security removes the column from unauthorized users, while data masking still returns the row with the sensitive value obscured.
Policy-based tagging connects governance metadata to enforcement across BigLake and open-format tables such as Iceberg and Delta. Knowledge Catalog, the Dataplex governance platform, centralizes discovery, lineage, data-quality checks, data profiles, business-glossary vocabulary, and feature and model metadata for trusted users. Data Catalog tags carry provider agreement information, encryption and de-identification techniques, retention policies, cost metrics, and sensitivity classifications, and an automated Tag Engine can apply those tags from a policy table in BigQuery based on data sensitivity and residency. Column-level lineage in BigQuery and built-in lineage in the catalog then trace data flow from source ingestion scripts back to origin, while query labels can require consumers to specify a valid consumption purpose that is validated against their entitlements.
This tagging system supports decentralized ownership through a data mesh, where domain teams own their data products but share a standardized vocabulary, enriched aspects and aspect types, and common security principles. Sensitive Data Protection scans feed the same loop by profiling BigQuery data for personally identifiable information (PII), financial data, and health information and sending inspection results to the catalog as aspects. Automated checks compare the applied encryption, masking, retention, and quality tags against predefined policies, and discrepancies are published as findings through Pub/Sub for monitoring and reporting.
Encryption in BigQuery and Cloud Storage protects data at rest by default and in transit, with customizable key controls for stricter requirements. Google default encryption protects data stored on disk without customer action, while Cloud KMS supports customer-managed encryption keys (CMEK) for enhanced key management and control over rotation and destruction. Cloud External Key Manager (Cloud EKM) extends Cloud KMS by keeping encryption keys in a third-party key management system deployed outside Google infrastructure, so data at rest stays separated from the keys while cloud compute and analytics can still process the data. Application-level de-identification during ingestion and BigQuery column-level dynamic data masking complement storage encryption by reducing sensitive values before they are written or when they are read.
Unified monitoring ties access decisions to a detailed record of user activity and system events for governance and incident response. Cloud Logging captures real-time logs, Cloud Monitoring collects metrics and alerts on log conditions, and Cloud Audit Logs preserve audit trails of API calls that track all data access against sharing agreements and consumption purposes. Threat detection scans those logs and matches entries to threat indicators, distinguishing human events from service events and service-impersonation events to prioritize investigation of actual human access to user data, source code, and sensitive information. When a violation is found, independent security teams determine whether access was intentional, accidental, or caused by misconfiguration or stolen credentials, then remediate, revoke access, and derive new indicators, while confidential data must never be written into experiment logs or secondary log servers.
Optimizing storage and query costs across lake environments means matching each dataset to the cheapest storage and processing path that still meets its access needs. Cloud Storage (opens in a new tab) costs depend on storage class, operation type, retained versions, and where compute runs relative to data. BigQuery (opens in a new tab) costs depend on how queries are scheduled, how data is read and written, and how transfers are orchestrated. Centralized monitoring and lifecycle automation keep both sides aligned as access patterns change.
Storage class alignment is the practice of keeping frequently accessed lake data in Standard storage or Nearline storage and rarely accessed data in Coldline storage or Archive storage. Storage Intelligence advisor detects misalignment and signals when frequently accessed objects are sitting in cold classes. Frequent Class A or Class B operations on cold data incur higher operation charges than the storage savings justify, so the resolution is to move that data to Standard or Nearline storage.
| Finding | What it signals | Cost-control action |
|---|---|---|
| Spike in Class A or B operations on Coldline or Archive data | Frequently accessed objects are sitting in Coldline or Archive storage | Move the objects to Standard storage or Nearline storage |
| Total bytes stored increased above trend over the last 30 days | Storage consumption exceeds historical trend, for example from indefinite retention of noncurrent versions | Use Object Lifecycle Management to delete or demote noncurrent versions, or enable Autoclass |
| Spike in cross-region egress | Compute in one region is reading buckets in another region, for example Compute Engine in us-central1 accessing a bucket in us-east1 | Colocate compute and storage in the same region using bucket relocation |
Exam tip: A spike in operations on Coldline or Archive data means the data is too cold — move it to a warmer class such as Standard or Nearline, not to a colder class.
Object Lifecycle Management is the Cloud Storage mechanism that automatically deletes objects or transitions them between storage classes based on age, version state, and access rules. Lifecycle policies control costs from accumulation of noncurrent object versions after uploads, where indefinite retention increases total bytes stored above the 30-day trend. The supported fix is to configure a lifecycle rule that deletes noncurrent versions or moves them to colder storage, or to enable Autoclass, which automatically manages storage classes based on access patterns. Two time-series charts track whether the policy is working: cumulative object count tracks the total number of objects across locations and storage classes, and storage volume over time tracks storage size across locations and storage classes.
Cross-region egress cost occurs when data flows from a Cloud Storage bucket in one region to Google Cloud services in another region. The advisor finding Spike in cross-region egress indicates this pattern, such as a Compute Engine instance in us-central1 frequently accessing a bucket in us-east1. Traffic crossing the regional boundary on every read creates repeated egress charges that colocation would avoid. The resolution is to colocate Google Cloud resources and storage resources in the same region using bucket relocation, so reads stay inside one region.
BigQuery processing cost control relies on shared capacity and on choosing read and write paths that avoid quota-driven retries and extra stages. A two-tier reservation design assigns the organization resource a reservation with a small number of slots to cover general usage, then assigns additional reservations at the project or folder level when teams have greater needs. Reservations in this model rely on the fair scheduling algorithm built into BigQuery reservations, and a tenant or team with specific timing requirements can receive a dedicated reservation with a precise number of slots.
Data movement into BigQuery also affects cost and latency. BigQuery Data Transfer Service (opens in a new tab) runs on a built-in scheduler with a minimum interval of 15 minutes and must copy all tables from the source dataset, with no embedded script to create region-specific subsets. When more flexibility or lower latency is needed, schedule Managed Service for Apache Airflow jobs to create regional subsets before triggering the transfer through its client API if additional latency is acceptable, or use Dataflow (opens in a new tab) to dual-write regional subsets into target regions if minimal latency between regions is required. For pipeline I/O, table export is the default BigQueryIO read method where BigQueryIO invokes a BigQuery export request that writes table data to a temporary Cloud Storage location and then reads from that location, which consumes export quotas and adds run time before processing starts. The direct-read approach uses the BigQuery Storage API to read table row data directly from BigQuery over gRPC, which avoids the export step, export quota restrictions, and extra run time. For writes, batch pipelines that use BigQuery load jobs consume load-job quotas at the table and project level, while streaming pipelines use streaming inserts or the Storage Write API, so avoid appending with load jobs thousands of times per day and use a streaming pipeline for near real-time writes.
Centralized cost monitoring replaces custom reporting pipelines, BigQuery scripts, and external visualization tools with one view across projects, folders, or organizations. Storage Intelligence advisor provides that single interface to assess the health of the entire Cloud Storage environment without running manual queries across logs or resources. Cloud Billing budgets complement it by monitoring all Google Cloud charges in one place, where a budget amount plus per-project alert threshold rules trigger email notifications to track spending against the budget and can automate cost-control responses.
Automated data discovery and metadata management is the process where storage, catalog services, and query engines work together to harvest technical metadata, register it centrally, and enrich it for search. In Google Cloud, the Lakehouse runtime catalog (opens in a new tab) provides the regional metadata service for open tables, while Knowledge Catalog (opens in a new tab) provides the governance plane for enrichment, search, lineage, and policy enforcement. Together they let Apache Spark, Trino, BigQuery, Apache Flink, and Apache Hive discover and query one source of truth without synchronizing metadata between repositories.
The Lakehouse runtime catalog is the top-level regional metadata service that hosts individual catalog instances and centralizes discovery across engines. The Lakehouse runtime catalog implements the open-source Apache Iceberg REST Catalog API to manage namespaces and tables, with extensions for catalog management. By decoupling storage in Cloud Storage (opens in a new tab) from compute, multiple engines access the same table metadata through the catalog instead of reading files directly, which eliminates duplication and keeps insights consistent.
Discovery follows an ordered query path where the engine always resolves metadata before touching data:
The workflow depends on the catalog for authorization and location, and the engine depends on Cloud Storage only after the catalog responds. When credential vending is enabled, administrators delegate access through autogenerated short-lived credentials with reduced scope instead of granting users direct bucket permissions.
A catalog and namespace hierarchy organizes metadata in the Project.Catalog.Namespace.Table (P.C.N.T) naming structure for enterprise-wide searchability. A catalog is a logical metastore container backed by Cloud Storage warehouse locations that connects open table metadata with query engines. A namespace is a logical grouping of tables within a catalog that functions like a database, schema, or BigQuery dataset and provides structure for organization and access control.
The catalog depends on its warehouse bucket for region and storage, and namespaces inherit that boundary:
This structure lets discovery flow from catalog to namespace to table, while access control flows from the namespace boundary down to each table.
Table registration in the lakehouse connects physical Parquet files in Cloud Storage with logical metadata managed by Lakehouse or BigQuery. Tables stored in open Apache Iceberg format keep data in Cloud Storage while Lakehouse manages the table metadata, which preserves open compatibility across engines. Custom table paths must be nested under the parent namespace path, and resulting locations receive a random string suffix to prevent two tables from occupying the same location.
| Table option | Metadata manager | Storage and access |
|---|---|---|
| Apache Iceberg tables managed by Lakehouse runtime catalog | Lakehouse runtime catalog through REST endpoint | Data and physical metadata in Cloud Storage, open to Spark, Flink, Hive, Trino, and BigQuery |
| Apache Iceberg tables managed by BigQuery | BigQuery catalog | Data and physical metadata in Cloud Storage, Lakehouse manages Iceberg metadata |
| Native tables | BigQuery, connected to Lakehouse runtime catalog | Fully managed by BigQuery, interoperable with open-source engines |
| External tables | Self-managed outside Lakehouse runtime catalog | Data in Cloud Storage, Amazon S3, or Azure Blob Storage with delegated access through connections |
Choose the Lakehouse-managed Iceberg option when open-engine interoperability through the REST endpoint is the priority. Only Apache Iceberg V2 tables (generally available) and V3 tables (Preview) are supported by the Lakehouse runtime catalog; Iceberg V1 tables are not supported and must be upgraded to V2 before use.
Exam tip: BigLake is now called Lakehouse and Dataplex Universal Catalog is now called Knowledge Catalog, but APIs, client libraries, CLI commands, and IAM names still reference BigLake and Dataplex.
Knowledge Catalog is the universal context engine that enriches registered metadata so data is searchable, classified, and governed consistently across engines. Knowledge Catalog acts as the central control plane that holds security context and governance metadata, then enforces it when queries are routed through the BigQuery Storage API. The logical security boundary decouples storage permissions from data queries through a Cloud resource connection, so end users and query engines never receive direct access to the files and cannot bypass policy.
Knowledge Catalog enriches entries to support enterprise discovery and compliance:
Define policy tags in Knowledge Catalog once and the platform applies consistent masking rules everywhere; the system evaluates user identity during queries so authorized users see raw values while restricted users receive NULL outputs across BigQuery SQL and Apache Spark.
BigQuery column-level security removes the entire column from unauthorized users, while BigQuery column data masking returns the row with only the sensitive value obscured. Choose column-level security when entire columns must be denied and masking when users need the row context without revealing the sensitive value.
Move the objects when there is a spike in Class A or Class B operations on Coldline storage or Archive storage because it signals that frequently accessed objects are sitting in cold classes. Frequent operations on cold data incur higher operation charges than the storage savings justify, so the resolution is to move that data to Standard storage or Nearline storage.
BigQuery Data Transfer Service runs on a built-in scheduler with a minimum interval of 15 minutes and must copy all tables from the source dataset. It has no embedded script to create region-specific subsets, so schedule Managed Service for Apache Airflow jobs to create regional subsets or use Dataflow to dual-write regional subsets when more flexibility is needed.
Only Apache Iceberg V2 tables (generally available) and V3 tables (Preview) are supported by the Lakehouse runtime catalog. Iceberg V1 tables are not supported and must be upgraded to V2 before use.
An enterprise data lake integrates Google Cloud Storage and BigQuery data assets governed by Dataplex. A data engineer needs to enforce row-level security on a centralized transactions table so regional analysts can only view data corresponding to their assigned region.
A junior administrator recommends granting the Filtered Data Viewer (roles/bigquery.filteredDataViewer) IAM role directly to the regional analyst user groups at the BigQuery dataset level, and then executing CREATE ROW ACCESS POLICY DDL statements for each region.
Why does this approach violate Google Cloud security best practices, and what is the correct implementation?
Last updated