Delta-presence (δ-presence) is a metric that quantifies the probability that an individual belongs to an analyzed dataset. Like k-map, you can estimate δ-presence values using Cloud DLP, which uses a statistical model to estimate the attack dataset.
δ-presence contrasts with the other risk analysis methods, in which the attack dataset is explicitly known. Depending on the type of data, Cloud DLP uses publicly available datasets (for example, from the US Census) or a custom statistical model (for example, one or more BigQuery tables that you specify), or it extrapolates from the distribution of values in your input dataset.
This topic demonstrates how to compute δ-presence values for a dataset using Cloud Data Loss Prevention (DLP). For more information about δ-presence or risk analysis in general, see the risk analysis concept topic before continuing on.
Before you begin
Before continuing, be sure you've done the following:
- Sign in to your Google Account.
- In the Google Cloud Console, on the project selector page, select or create a Google Cloud project. Go to the project selector
- Make sure that billing is enabled for your Google Cloud project. Learn how to confirm billing is enabled for your project.
- Enable Cloud DLP. Enable Cloud DLP
- Select a BigQuery dataset to analyze. Cloud DLP estimates the δ-presence metric by scanning a BigQuery table.
- Determine the types of datasets you want to use to model the attack
dataset. For more information, see the reference page for the
DeltaPresenceEstimationConfigobject, as well as Risk analysis terms and techniques.
Compute δ-presence metrics
To compute a δ-presence estimate using Cloud DLP, send a request to the following URL, where PROJECT_ID indicates your project identifier:
The request contains a
object, which is composed of the following:
quasiIds: Required. Fields (
QuasiIdobjects) considered to be quasi-identifiers to scan and use to compute δ-presence. No two columns can have the same tag. These can be any of the following:
- An infoType: This causes Cloud DLP to use the relevant public dataset as a statistical model of population, including US ZIP codes, region codes, ages, and genders.
- A custom infoType: A custom tag wherein you indicate an auxiliary table
AuxiliaryTableobject) that contains statistical information about the possible values of this column.
inferredtag: If no semantic tag is indicated, specify
inferred. Cloud DLP infers the statistical model from the distribution of values in the input data.
regionCode: An ISO 3166-1 alpha-2 region code for Cloud DLP to use in statistical modeling. This value is required if no column is tagged with a region-specific infoType (for example, a US ZIP code) or a region code.
auxiliaryTables: Auxiliary tables (
StatisticalTableobjects) to use in the analysis. Each custom tag used to tag a quasi-identifier column (from
quasiIds) must appear in exactly one column of one auxiliary table.
BigQueryTableobject. Specify the BigQuery table to scan by including all of the following:
projectId: The project ID of the project containing the table.
datasetId: The dataset ID of the table.
tableId: The name of the table.
A set of one or more
Actionobjects, which represent actions to run, in the order given, at the completion of the job. Each
Actionobject can contain one of the following actions:
SaveFindingsobject: Saves the results of the risk analysis scan to a BigQuery table.
PublishToPubSubobject: Publishes a notification to a Pub/Sub topic.
PublishSummaryToCsccobject: Saves a results summary to Security Command Center.
PublishFindingsToCloudDataCatalogobject: Saves results to Data Catalog.
JobNotificationEmailsobject: Sends you an email with results.
PublishToStackdriverobject: Saves results to Google Cloud's operations suite.
Viewing δ-presence job results
To retrieve the results of the δ-presence risk analysis job using the REST
API, send the following GET request to the
resource. Replace PROJECT_ID with your project ID and
JOB_ID with the identifier of the job you want to obtain results for.
The job ID was returned when you started the job, and can also be retrieved by
listing all jobs.
The request returns a JSON object containing an instance of the job. The results
of the analysis are inside the
"riskDetails" key, in an
object. For more information, see the API reference for the
- Learn how to calculate the k-anonymity value for a dataset.
- Learn how to calculate the l-diversity value for a dataset.
- Learn how to calculate the k-map value for a dataset.