Skip to content

Commit 898fcea

Browse files
Google APIscopybara-github
authored andcommitted
feat: InfoType categories were added to built-in infoTypes
PiperOrigin-RevId: 460542545
1 parent 5c90074 commit 898fcea

2 files changed

Lines changed: 214 additions & 10 deletions

File tree

google/privacy/dlp/v2/dlp.proto

Lines changed: 196 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ message InspectConfig {
773773
FindingLimits limits = 3;
774774

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

@@ -1554,6 +1554,201 @@ message InfoTypeDescription {
15541554
// Description of the infotype. Translated when language is provided in the
15551555
// request.
15561556
string description = 4;
1557+
1558+
// The category of the infoType.
1559+
repeated InfoTypeCategory categories = 10;
1560+
}
1561+
1562+
// Classification of infoTypes to organize them according to geographic
1563+
// location, industry, and data type.
1564+
message InfoTypeCategory {
1565+
// Enum of the current locations.
1566+
// We might add more locations in the future.
1567+
enum LocationCategory {
1568+
// Unused location
1569+
LOCATION_UNSPECIFIED = 0;
1570+
1571+
// The infoType is not issued by or tied to a specific region, but is used
1572+
// almost everywhere.
1573+
GLOBAL = 1;
1574+
1575+
// The infoType is typically used in Argentina.
1576+
ARGENTINA = 2;
1577+
1578+
// The infoType is typically used in Australia.
1579+
AUSTRALIA = 3;
1580+
1581+
// The infoType is typically used in Belgium.
1582+
BELGIUM = 4;
1583+
1584+
// The infoType is typically used in Brazil.
1585+
BRAZIL = 5;
1586+
1587+
// The infoType is typically used in Canada.
1588+
CANADA = 6;
1589+
1590+
// The infoType is typically used in Chile.
1591+
CHILE = 7;
1592+
1593+
// The infoType is typically used in China.
1594+
CHINA = 8;
1595+
1596+
// The infoType is typically used in Colombia.
1597+
COLOMBIA = 9;
1598+
1599+
// The infoType is typically used in Denmark.
1600+
DENMARK = 10;
1601+
1602+
// The infoType is typically used in France.
1603+
FRANCE = 11;
1604+
1605+
// The infoType is typically used in Finland.
1606+
FINLAND = 12;
1607+
1608+
// The infoType is typically used in Germany.
1609+
GERMANY = 13;
1610+
1611+
// The infoType is typically used in Hong Kong.
1612+
HONG_KONG = 14;
1613+
1614+
// The infoType is typically used in India.
1615+
INDIA = 15;
1616+
1617+
// The infoType is typically used in Indonesia.
1618+
INDONESIA = 16;
1619+
1620+
// The infoType is typically used in Ireland.
1621+
IRELAND = 17;
1622+
1623+
// The infoType is typically used in Israel.
1624+
ISRAEL = 18;
1625+
1626+
// The infoType is typically used in Italy.
1627+
ITALY = 19;
1628+
1629+
// The infoType is typically used in Japan.
1630+
JAPAN = 20;
1631+
1632+
// The infoType is typically used in Korea.
1633+
KOREA = 21;
1634+
1635+
// The infoType is typically used in Mexico.
1636+
MEXICO = 22;
1637+
1638+
// The infoType is typically used in the Netherlands.
1639+
THE_NETHERLANDS = 23;
1640+
1641+
// The infoType is typically used in Norway.
1642+
NORWAY = 24;
1643+
1644+
// The infoType is typically used in Paraguay.
1645+
PARAGUAY = 25;
1646+
1647+
// The infoType is typically used in Peru.
1648+
PERU = 26;
1649+
1650+
// The infoType is typically used in Poland.
1651+
POLAND = 27;
1652+
1653+
// The infoType is typically used in Portugal.
1654+
PORTUGAL = 28;
1655+
1656+
// The infoType is typically used in Singapore.
1657+
SINGAPORE = 29;
1658+
1659+
// The infoType is typically used in South Africa.
1660+
SOUTH_AFRICA = 30;
1661+
1662+
// The infoType is typically used in Spain.
1663+
SPAIN = 31;
1664+
1665+
// The infoType is typically used in Sweden.
1666+
SWEDEN = 32;
1667+
1668+
// The infoType is typically used in Taiwan.
1669+
TAIWAN = 33;
1670+
1671+
// The infoType is typically used in Thailand.
1672+
THAILAND = 34;
1673+
1674+
// The infoType is typically used in Turkey.
1675+
TURKEY = 35;
1676+
1677+
// The infoType is typically used in the United Kingdom.
1678+
UNITED_KINGDOM = 36;
1679+
1680+
// The infoType is typically used in the United States.
1681+
UNITED_STATES = 37;
1682+
1683+
// The infoType is typically used in Uruguay.
1684+
URUGUAY = 38;
1685+
1686+
// The infoType is typically used in Venezuela.
1687+
VENEZUELA = 39;
1688+
1689+
// The infoType is typically used in Google internally.
1690+
INTERNAL = 40;
1691+
}
1692+
1693+
// Enum of the current industries in the category.
1694+
// We might add more industries in the future.
1695+
enum IndustryCategory {
1696+
// Unused industry
1697+
INDUSTRY_UNSPECIFIED = 0;
1698+
1699+
// The infoType is typically used in the finance industry.
1700+
FINANCE = 1;
1701+
1702+
// The infoType is typically used in the health industry.
1703+
HEALTH = 2;
1704+
1705+
// The infoType is typically used in the telecommunications industry.
1706+
TELECOMMUNICATIONS = 3;
1707+
}
1708+
1709+
// Enum of the current types in the category.
1710+
// We might add more types in the future.
1711+
enum TypeCategory {
1712+
// Unused type
1713+
TYPE_UNSPECIFIED = 0;
1714+
1715+
// Personally identifiable information, for example, a
1716+
// name or phone number
1717+
PII = 1;
1718+
1719+
// Personally identifiable information that is especially sensitive, for
1720+
// example, a passport number.
1721+
SPII = 2;
1722+
1723+
// Attributes that can partially identify someone, especially in
1724+
// combination with other attributes, like age, height, and gender.
1725+
DEMOGRAPHIC = 3;
1726+
1727+
// Confidential or secret information, for example, a password.
1728+
CREDENTIAL = 4;
1729+
1730+
// An identification document issued by a government.
1731+
GOVERNMENT_ID = 5;
1732+
1733+
// A document, for example, a resume or source code.
1734+
DOCUMENT = 6;
1735+
1736+
// Information that is not sensitive on its own, but provides details about
1737+
// the circumstances surrounding an entity or an event.
1738+
CONTEXTUAL_INFORMATION = 7;
1739+
}
1740+
1741+
oneof category {
1742+
// The region or country that issued the ID or document represented by the
1743+
// infoType.
1744+
LocationCategory location_category = 1;
1745+
1746+
// The group of relevant businesses where this infoType is commonly used
1747+
IndustryCategory industry_category = 2;
1748+
1749+
// The class of identifiers where this infoType belongs
1750+
TypeCategory type_category = 3;
1751+
}
15571752
}
15581753

15591754
// Request for the list of infoTypes.

google/privacy/dlp/v2/storage.proto

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,11 @@ message CustomInfoType {
149149
// Message for specifying a window around a finding to apply a detection
150150
// rule.
151151
message Proximity {
152-
// Number of characters before the finding to consider.
152+
// Number of characters before the finding to consider. For tabular data,
153+
// if you want to modify the likelihood of an entire column of findngs,
154+
// set this to 1. For more information, see
155+
// [Hotword example: Set the match likelihood of a table column]
156+
// (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
153157
int32 window_before = 1;
154158

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

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

194203
// Likelihood adjustment to apply to all matching findings.

0 commit comments

Comments
 (0)