Prepare and test your skills
Prepare and test your skills
Enforce Data Governance and Privacy in AI Workflows means building a governance layer that watches data flows, transformations, and access across the full AI lifecycle. The governance layer connects Knowledge Catalog (opens in a new tab) for discovery and oversight, Sensitive Data Protection (opens in a new tab) for finding and masking sensitive data, BigQuery privacy functions for safer analysis, and logging services for accountability. Training data carries the highest risk for bias and leakage, so this layer applies minimization, de-identification, lineage, quality checks, and audit logging from collection through transformation to training and inference.
Data minimization is the privacy principle of collecting, keeping, and using only data that is strictly necessary for the business goal. Collecting extra personally identifiable information (PII) increases privacy risk and can create biased models when sensitive attributes enter training. To keep utility while reducing exposure, pipelines apply pseudonymization, de-identification, and generalization such as bucketing, and they use synthetic or fully anonymized data where possible.
Minimization also depends on labeling and lifecycle control. A data labeling job adds informative tags to raw data to create structured training data, which reduces ambiguity that can lead to bias. Cloud Storage (opens in a new tab) lifecycle controls limit how long data stays available, so resources are not exposed longer than needed.
Sensitive Data Protection is the Google Cloud service that discovers, classifies, and protects sensitive data such as PII in training data, pipelines, and large language model (LLM) interactions. Discovery starts with inspection jobs that scan storage and pipelines, and results flow from inspection jobs into BigQuery data profiles and from BigQuery into Knowledge Catalog for central governance. Sensitive Data Protection combined with Model Armor adds data loss prevention for prompts and responses, blocking unauthorized exposure of sensitive data in LLM interactions.
Protection is enforced before training and at serving time. Pipelines run Sensitive Data Protection checks to find PII before it reaches training or inference, including scans at the organization, folder, or project level. At serving time, Model Armor enforces a minimum safety threshold and applies a Sensitive Data Protection DeidentifyTemplate that redacts or masks sensitive information before the response reaches the user, even if the model is compromised. The template reference flows from the Model Armor configuration to the de-identification service to the endpoint response.
Exam tip: De-identification in preprocessing reduces what the model learns, while a DeidentifyTemplate referenced by Model Armor filters what the endpoint returns — use both so training data and compromised outputs are protected.
Differential privacy is a privacy technique that adds noise during analysis or training so individual records are hard to identify while overall patterns remain learnable. With SQL in BigQuery, teams can build features with differentially private aggregations for counts, sums, and averages over sensitive groups. This approach trades some statistical precision for a stronger guarantee that no single person's membership or value can be inferred from the output.
Differential privacy complements de-identification rather than replacing it. Pseudonymization and bucketing preserve utility by generalizing values but do not add formal noise. Choose differentially private aggregations when BigQuery ML features require small-slice statistics where re-identification is a concern, and process encrypted data in memory during training and inference with Confidential Computing on Vertex AI when isolation of sensitive computation is required.
Knowledge Catalog is the organization-wide governance platform that discovers, manages, monitors, and governs data and AI artifacts. Data flows from systems such as BigQuery, Cloud Storage, and Pub/Sub into the catalog for inventory, then flows from the catalog back to engineering teams as governed datasets, feature metadata, and model artifacts. The platform unifies governance across BigLake and open-format tables such as Iceberg and Delta, with integration to Dataproc Metastore for compatibility across engines.
Knowledge Catalog supports governance through related capabilities:
Lineage and quality together help detect poisoning and drift. Validation checks on formats, ranges, and distributions plus anomaly detection in BigQuery help flag training-data anomalies. Logs from Cloud Logging, metrics from Cloud Monitoring, and audit trails from Cloud Audit Logs capture pipeline activity, but experiment logs must not contain PII or confidential data.
Privacy-preserving sharing allows analysis across privacy boundaries without uncontrolled movement of raw data. BigQuery sharing through Analytics Hub and BigQuery data clean rooms provide a governed framework to share data across those boundaries. Looker Action Hub shares results directly from dashboards into built-in destinations, so consumers receive results without direct access to sensitive tables.
Access control follows role-based access control (RBAC) with least privilege, granting only no-access, read-only, or write access needed for the role. Granularity is enforced with IAM roles, IAM policies with conditions, bucket and managed-folder policies in Cloud Storage, and row-level and column-level security in BigQuery. Enable Data Access audit logs for AI services and storage, stream them to Cloud Logging for real-time alerting, export them to BigQuery for long-term retention, and integrate them with a security information and event management (SIEM) system for central monitoring.
Design and Secure AI/ML Data Pipelines and Storage means protecting training datasets, features, and model artifacts from ingestion through processing to storage. On Google Cloud, Cloud Storage (opens in a new tab) holds raw datasets and model files, BigQuery holds structured training tables, and Vertex AI Feature Store serves curated features. A secure design keeps sensitive data in isolated buckets, datasets, and perimeters while non-sensitive data follows a parallel path with broader access.
Data classification identifies confidential data before it enters the AI lifecycle, including credit card numbers, addresses, phone numbers, and other PII. Sensitive Data Protection (opens in a new tab) discovers and classifies data with infoTypes and inspection templates, and BigQuery results can be sent to Knowledge Catalog as aspects for central governance. Knowledge Catalog adds a business glossary, data profiles, discovery, and column-level lineage to trace where sensitive fields came from and where they flow.
Separation starts with minimization during ingestion and processing. Pipelines apply pseudonymization, de-identification, and generalization such as bucketing, and use synthetic data where possible. Sensitive and non-sensitive assets are then stored separately with classification tags and separate Cloud Storage buckets and BigQuery datasets. Controlled sharing uses BigQuery sharing, BigQuery data clean rooms, and authorized views instead of direct table access.
Encryption for AI pipelines protects stored data with customer-controlled keys and moving data with secure transport. Cloud Key Management Service (Cloud KMS) (opens in a new tab) provides customer-managed encryption keys (CMEKs) used by integrated services including Vertex AI, Cloud Storage, BigQuery, Cloud SQL, and Spanner. Cloud Storage protects data with server-side encryption and supports Google-managed defaults alongside CMEKs and customer-supplied encryption keys (CSEKs).
Data in transit between clients, pipelines, and AI services is encrypted with HTTPS for all AI and ML API calls, enforced with HTTPS load balancers. The pipeline rule is consistent: encrypt every hop from ingestion to feature serving to model storage. Vertex AI Feature Store and Vertex Data Labeling do not meet data-at-rest residency commitments, so residency-sensitive training data should remain in Cloud Storage or BigQuery regions that meet the requirement.
Exam tip: Vertex AI as a platform supports CMEK, VPC Service Controls, and Access Transparency, but Vertex AI Feature Store does not meet data-at-rest residency commitments — do not place residency-restricted sensitive features there.
Least-privilege access grants users, groups, and service accounts only the permissions needed for their pipeline role. Identity and Access Management (IAM) maps predefined or custom roles to identities and combines them with IAM Conditions, principal access boundary policies, and Privileged Access Manager for just-in-time elevation with audit logs. Dedicated service accounts isolate MLOps stages, for example a training account that reads from one specific bucket and writes to Model Registry without access to production endpoints.
Each storage service applies granularity in its own way:
allUsers and allAuthenticatedUsers.Secure AI pipelines move data through an ordered flow where each phase inherits classification, encryption, and access policy:
Network controls prevent exfiltration between phases. VPC Service Controls defines a service perimeter around AI resources with ingress and egress rules, validated first in dry-run mode. Firewall policies deny all traffic by default and allow only required ports and sources, while cross-boundary sharing uses clean rooms rather than copying raw data. Cloud Logging, Cloud Monitoring, and Cloud Audit Logs capture activity, but pipelines must not log PII into experiment logs.
| Storage service | Encryption control | Access control | Governance control |
|---|---|---|---|
| Cloud Storage | Google-managed keys by default, CMEK or CSEK when control is required | Bucket and managed-folder IAM, uniform access, block public access | Lifecycle rules, versioning, retention, classification tags |
| BigQuery | Google-managed keys by default, CMEK when control is required | Dataset IAM, authorized views, row-level and column-level security | Column-level lineage, data profiles, clean rooms, anomaly detection |
| Vertex AI Feature Store | Encrypted at rest automatically, without residency commitment | Vertex AI IAM roles for feature resources | Feature monitoring, metadata linked to catalog and registry |
Implement Model Security and Integrity Controls means proving that a production model is the exact approved artifact and that attackers cannot tamper with it or extract data from it. The controls span versioning each model with provenance in Vertex AI Model Registry (opens in a new tab), signing artifacts and verifying signatures before deployment, and hardening endpoints against extraction queries. Together they create traceability from raw data to prediction and a deployment gate that blocks unverified models.
Vertex AI Model Registry is the central repository that versions each trained model and links it to metadata needed to audit and redeploy it. A training pipeline writes its output artifact to the registry, and the registry applies the version number so every iteration is distinguishable and retrievable. Use a clear scheme such as semantic versioning and enforce strict access controls on Model Registry and Artifact Registry so only authorized pipelines can register or promote versions.
Each registered version must carry provenance that connects the model to its inputs and code:
Store model files in Cloud Storage before import and store custom training or serving images in Artifact Registry with versioning and tagging. Automate registration inside MLOps pipelines, log sources and parameters to Vertex AI ML Metadata (opens in a new tab), track lineage in Knowledge Catalog, and apply least-privilege IAM such as a training account that reads only one bucket and writes only to the registry.
Model signing and verification proves that the deployed artifact is bit-for-bit the artifact that passed testing. The signing flow runs from build to deployment: Cloud Build signs the artifact, the signed artifact is stored with its hash and provenance, and verification runs before traffic reaches the new version. Only after verification succeeds does the controller promote the version to serving, preserving a signed to verified to deployed lifecycle.
| Deployment path | Signing mechanism | Verification enforcement |
|---|---|---|
| Containerized model | Sign container in Cloud Build | Binary Authorization (opens in a new tab) verifies signature before container runs |
| Model deployed directly to Vertex AI endpoint | Sign model artifact in Cloud Build | Custom verification checks in deployment scripts verify hash before promotion |
| Supply-chain container image | Build with provenance and SBOM | Artifact Analysis scans base images for known vulnerabilities |
Verification depends on broader supply-chain controls. Enforce Supply-chain Levels for Software Artifacts (SLSA) provenance, restrict dependencies to vetted versions in a private Artifact Registry repository, and surface builds and SBOMs in dashboards. Before shifting traffic, run explainability and responsible-AI checks in Vertex AI Pipelines to detect tampering or misconfigured endpoints. Log results to Vertex AI ML Metadata and enable Cloud Audit Logs for Vertex AI to record who accessed or modified models.
Exam tip: Binary Authorization verifies signatures for containerized models, while models deployed directly to Vertex AI endpoints require custom checks in deployment scripts.
Model inversion and membership inference attacks abuse legitimate inference access to reconstruct training examples or test whether a record was in training. These are post-authentication attacks where the caller sends many varied queries and observes small output differences, so defenses must limit memorization and limit what each query reveals. Reducing memorization starts before training with minimization, pseudonymization, bucketing with Sensitive Data Protection, and differential privacy that adds noise during training.
Secure serving boundaries control how inference traffic flows from clients to models. Place Model Registry and sensitive data inside a VPC Service Controls perimeter with explicit ingress and egress rules validated in dry-run mode. Serve inference through private endpoints based on Private Service Connect, front public inference with Apigee for validation, authentication, and throttling, and define model signatures with strict input and output schemas. Deny all firewall traffic by default and allow only required flows.
Behavioral monitoring detects extraction patterns. Flag thousands of slightly different sequential queries, alert on sudden volume spikes from one identity, and alert on geographic anomalies against an established baseline. Use rate limiting to cap requests per identity, stream logs to Cloud Logging for real-time analysis and to BigQuery or a SIEM for long-term review, and feed Vertex AI Model Monitoring signals back into retraining. Reinforce defense with controlled rollout:
De-identification in preprocessing reduces what the model learns by finding and masking personally identifiable information (PII) before training or inference, while a Sensitive Data Protection DeidentifyTemplate referenced by Model Armor redacts or masks sensitive information in the endpoint response before it reaches the user even if the model is compromised. Use both so training data and compromised outputs are protected.
Use differentially private aggregations for counts, sums, and averages over sensitive groups when BigQuery ML features require small-slice statistics where re-identification is a concern. Differential privacy adds noise during analysis or training so individual records are hard to identify while overall patterns remain learnable, trading some statistical precision for a stronger guarantee that no single person's membership or value can be inferred from the output.
Binary Authorization verifies the signature before the container runs for containerized models, while models deployed directly to Vertex AI endpoints require custom hash or signature checks in deployment scripts before promotion. In both paths Cloud Build signs the artifact and verification runs before traffic reaches the new version, preserving a signed to verified to deployed lifecycle.
A financial enterprise deploys custom-trained classification models to Vertex AI to predict sensitive loan outcomes. A cloud security engineer is tasked with establishing security controls across the model deployment pipeline and inference serving layer to meet the following requirements:
Which combination of controls should the security engineer implement?
Last updated