Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Commit

Permalink
feat: InfoType categories were added to built-in infoTypes (#730)
Browse files Browse the repository at this point in the history
* feat: InfoType categories were added to built-in infoTypes

PiperOrigin-RevId: 460542545

Source-Link: googleapis/googleapis@898fcea

Source-Link: https://github.com/googleapis/googleapis-gen/commit/e97b0c9527bb7172a3f8f3bc411de83468fd6a77
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTk3YjBjOTUyN2JiNzE3MmEzZjhmM2JjNDExZGU4MzQ2OGZkNmE3NyJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Jul 12, 2022
1 parent 3ce38f6 commit 1147763
Show file tree
Hide file tree
Showing 5 changed files with 1,206 additions and 11 deletions.
197 changes: 196 additions & 1 deletion protos/google/privacy/dlp/v2/dlp.proto
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@ message InspectConfig {
FindingLimits limits = 3;

// When true, a contextual quote from the data that triggered a finding is
// included in the response; see Finding.quote.
// included in the response; see [Finding.quote][google.privacy.dlp.v2.Finding.quote].
// This is not used for data profiling.
bool include_quote = 4;

Expand Down Expand Up @@ -1554,6 +1554,201 @@ message InfoTypeDescription {
// Description of the infotype. Translated when language is provided in the
// request.
string description = 4;

// The category of the infoType.
repeated InfoTypeCategory categories = 10;
}

// Classification of infoTypes to organize them according to geographic
// location, industry, and data type.
message InfoTypeCategory {
// Enum of the current locations.
// We might add more locations in the future.
enum LocationCategory {
// Unused location
LOCATION_UNSPECIFIED = 0;

// The infoType is not issued by or tied to a specific region, but is used
// almost everywhere.
GLOBAL = 1;

// The infoType is typically used in Argentina.
ARGENTINA = 2;

// The infoType is typically used in Australia.
AUSTRALIA = 3;

// The infoType is typically used in Belgium.
BELGIUM = 4;

// The infoType is typically used in Brazil.
BRAZIL = 5;

// The infoType is typically used in Canada.
CANADA = 6;

// The infoType is typically used in Chile.
CHILE = 7;

// The infoType is typically used in China.
CHINA = 8;

// The infoType is typically used in Colombia.
COLOMBIA = 9;

// The infoType is typically used in Denmark.
DENMARK = 10;

// The infoType is typically used in France.
FRANCE = 11;

// The infoType is typically used in Finland.
FINLAND = 12;

// The infoType is typically used in Germany.
GERMANY = 13;

// The infoType is typically used in Hong Kong.
HONG_KONG = 14;

// The infoType is typically used in India.
INDIA = 15;

// The infoType is typically used in Indonesia.
INDONESIA = 16;

// The infoType is typically used in Ireland.
IRELAND = 17;

// The infoType is typically used in Israel.
ISRAEL = 18;

// The infoType is typically used in Italy.
ITALY = 19;

// The infoType is typically used in Japan.
JAPAN = 20;

// The infoType is typically used in Korea.
KOREA = 21;

// The infoType is typically used in Mexico.
MEXICO = 22;

// The infoType is typically used in the Netherlands.
THE_NETHERLANDS = 23;

// The infoType is typically used in Norway.
NORWAY = 24;

// The infoType is typically used in Paraguay.
PARAGUAY = 25;

// The infoType is typically used in Peru.
PERU = 26;

// The infoType is typically used in Poland.
POLAND = 27;

// The infoType is typically used in Portugal.
PORTUGAL = 28;

// The infoType is typically used in Singapore.
SINGAPORE = 29;

// The infoType is typically used in South Africa.
SOUTH_AFRICA = 30;

// The infoType is typically used in Spain.
SPAIN = 31;

// The infoType is typically used in Sweden.
SWEDEN = 32;

// The infoType is typically used in Taiwan.
TAIWAN = 33;

// The infoType is typically used in Thailand.
THAILAND = 34;

// The infoType is typically used in Turkey.
TURKEY = 35;

// The infoType is typically used in the United Kingdom.
UNITED_KINGDOM = 36;

// The infoType is typically used in the United States.
UNITED_STATES = 37;

// The infoType is typically used in Uruguay.
URUGUAY = 38;

// The infoType is typically used in Venezuela.
VENEZUELA = 39;

// The infoType is typically used in Google internally.
INTERNAL = 40;
}

// Enum of the current industries in the category.
// We might add more industries in the future.
enum IndustryCategory {
// Unused industry
INDUSTRY_UNSPECIFIED = 0;

// The infoType is typically used in the finance industry.
FINANCE = 1;

// The infoType is typically used in the health industry.
HEALTH = 2;

// The infoType is typically used in the telecommunications industry.
TELECOMMUNICATIONS = 3;
}

// Enum of the current types in the category.
// We might add more types in the future.
enum TypeCategory {
// Unused type
TYPE_UNSPECIFIED = 0;

// Personally identifiable information, for example, a
// name or phone number
PII = 1;

// Personally identifiable information that is especially sensitive, for
// example, a passport number.
SPII = 2;

// Attributes that can partially identify someone, especially in
// combination with other attributes, like age, height, and gender.
DEMOGRAPHIC = 3;

// Confidential or secret information, for example, a password.
CREDENTIAL = 4;

// An identification document issued by a government.
GOVERNMENT_ID = 5;

// A document, for example, a resume or source code.
DOCUMENT = 6;

// Information that is not sensitive on its own, but provides details about
// the circumstances surrounding an entity or an event.
CONTEXTUAL_INFORMATION = 7;
}

oneof category {
// The region or country that issued the ID or document represented by the
// infoType.
LocationCategory location_category = 1;

// The group of relevant businesses where this infoType is commonly used
IndustryCategory industry_category = 2;

// The class of identifiers where this infoType belongs
TypeCategory type_category = 3;
}
}

// Request for the list of infoTypes.
Expand Down
27 changes: 18 additions & 9 deletions protos/google/privacy/dlp/v2/storage.proto
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,11 @@ message CustomInfoType {
// Message for specifying a window around a finding to apply a detection
// rule.
message Proximity {
// Number of characters before the finding to consider.
// Number of characters before the finding to consider. For tabular data,
// if you want to modify the likelihood of an entire column of findngs,
// set this to 1. For more information, see
// [Hotword example: Set the match likelihood of a table column]
// (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
int32 window_before = 1;

// Number of characters after the finding to consider.
Expand Down Expand Up @@ -181,14 +185,19 @@ message CustomInfoType {
// Regular expression pattern defining what qualifies as a hotword.
Regex hotword_regex = 1;

// Proximity of the finding within which the entire hotword must reside.
// The total length of the window cannot exceed 1000 characters. Note that
// the finding itself will be included in the window, so that hotwords may
// be used to match substrings of the finding itself. For example, the
// certainty of a phone number regex "\(\d{3}\) \d{3}-\d{4}" could be
// adjusted upwards if the area code is known to be the local area code of
// a company office using the hotword regex "\(xxx\)", where "xxx"
// is the area code in question.
// Range of characters within which the entire hotword must reside.
// The total length of the window cannot exceed 1000 characters.
// The finding itself will be included in the window, so that hotwords can
// be used to match substrings of the finding itself. Suppose you
// want Cloud DLP to promote the likelihood of the phone number
// regex "\(\d{3}\) \d{3}-\d{4}" if the area code is known to be the
// area code of a company's office. In this case, use the hotword regex
// "\(xxx\)", where "xxx" is the area code in question.
//
// For tabular data, if you want to modify the likelihood of an entire
// column of findngs, see
// [Hotword example: Set the match likelihood of a table column]
// (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
Proximity proximity = 2;

// Likelihood adjustment to apply to all matching findings.
Expand Down
Loading

0 comments on commit 1147763

Please sign in to comment.