@google-cloud/dlp 3.3.0 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,13 @@
4
4
 
5
5
  [1]: https://www.npmjs.com/package/PACKAGE NAME?activeTab=versions
6
6
 
7
+ ## [3.4.0](https://github.com/googleapis/nodejs-dlp/compare/v3.3.0...v3.4.0) (2022-03-25)
8
+
9
+
10
+ ### Features
11
+
12
+ * new Bytes and File types: POWERPOINT and EXCEL ([#693](https://github.com/googleapis/nodejs-dlp/issues/693)) ([ed3dc42](https://github.com/googleapis/nodejs-dlp/commit/ed3dc42bce256100a62528481c7ec10362f7fa93))
13
+
7
14
  ## [3.3.0](https://www.github.com/googleapis/nodejs-dlp/compare/v3.2.1...v3.3.0) (2021-12-03)
8
15
 
9
16
 
package/README.md CHANGED
@@ -4,9 +4,8 @@
4
4
 
5
5
  # [Cloud Data Loss Prevention: Node.js Client](https://github.com/googleapis/nodejs-dlp)
6
6
 
7
- [![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages)
7
+ [![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages)
8
8
  [![npm version](https://img.shields.io/npm/v/@google-cloud/dlp.svg)](https://www.npmjs.org/package/@google-cloud/dlp)
9
- [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-dlp/main.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-dlp)
10
9
 
11
10
 
12
11
 
@@ -166,37 +165,38 @@ also contains samples.
166
165
  Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/).
167
166
  Libraries are compatible with all current _active_ and _maintenance_ versions of
168
167
  Node.js.
168
+ If you are using an end-of-life version of Node.js, we recommend that you update
169
+ as soon as possible to an actively supported LTS version.
169
170
 
170
- Client libraries targeting some end-of-life versions of Node.js are available, and
171
- can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag).
172
- The dist-tags follow the naming convention `legacy-(version)`.
173
-
174
- _Legacy Node.js versions are supported as a best effort:_
175
-
176
- * Legacy versions will not be tested in continuous integration.
177
- * Some security patches may not be able to be backported.
178
- * Dependencies will not be kept up-to-date, and features will not be backported.
171
+ Google's client libraries support legacy versions of Node.js runtimes on a
172
+ best-efforts basis with the following warnings:
179
173
 
180
- #### Legacy tags available
174
+ * Legacy versions are not tested in continuous integration.
175
+ * Some security patches and features cannot be backported.
176
+ * Dependencies cannot be kept up-to-date.
181
177
 
182
- * `legacy-8`: install client libraries from this dist-tag for versions
183
- compatible with Node.js 8.
178
+ Client libraries targeting some end-of-life versions of Node.js are available, and
179
+ can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag).
180
+ The dist-tags follow the naming convention `legacy-(version)`.
181
+ For example, `npm install @google-cloud/dlp@legacy-8` installs client libraries
182
+ for versions compatible with Node.js 8.
184
183
 
185
184
  ## Versioning
186
185
 
187
186
  This library follows [Semantic Versioning](http://semver.org/).
188
187
 
189
188
 
190
- This library is considered to be **General Availability (GA)**. This means it
191
- is stable; the code surface will not change in backwards-incompatible ways
189
+
190
+ This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways
192
191
  unless absolutely necessary (e.g. because of critical security issues) or with
193
- an extensive deprecation period. Issues and requests against **GA** libraries
192
+ an extensive deprecation period. Issues and requests against **stable** libraries
194
193
  are addressed with the highest priority.
195
194
 
196
195
 
197
196
 
198
197
 
199
198
 
199
+
200
200
  More Information: [Google Cloud Platform Launch Stages][launch_stages]
201
201
 
202
202
  [launch_stages]: https://cloud.google.com/terms/launch-stages
@@ -1,4 +1,4 @@
1
- // Copyright 2021 Google LLC
1
+ // Copyright 2022 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -16,6 +16,7 @@ syntax = "proto3";
16
16
 
17
17
  package google.privacy.dlp.v2;
18
18
 
19
+ import "google/api/annotations.proto";
19
20
  import "google/api/client.proto";
20
21
  import "google/api/field_behavior.proto";
21
22
  import "google/api/resource.proto";
@@ -28,7 +29,6 @@ import "google/rpc/status.proto";
28
29
  import "google/type/date.proto";
29
30
  import "google/type/dayofweek.proto";
30
31
  import "google/type/timeofday.proto";
31
- import "google/api/annotations.proto";
32
32
 
33
33
  option csharp_namespace = "Google.Cloud.Dlp.V2";
34
34
  option go_package = "google.golang.org/genproto/googleapis/privacy/dlp/v2;dlp";
@@ -719,8 +719,8 @@ message InspectionRuleSet {
719
719
  // When used with redactContent only info_types and min_likelihood are currently
720
720
  // used.
721
721
  message InspectConfig {
722
- // Configuration to control the number of findings returned. Cannot be set if
723
- // de-identification is requested.
722
+ // Configuration to control the number of findings returned for inspection.
723
+ // This is not used for de-identification or data profiling.
724
724
  message FindingLimits {
725
725
  // Max findings configuration per infoType, per content item or long
726
726
  // running DlpJob.
@@ -769,21 +769,23 @@ message InspectConfig {
769
769
  Likelihood min_likelihood = 2;
770
770
 
771
771
  // Configuration to control the number of findings returned.
772
+ // This is not used for data profiling.
772
773
  FindingLimits limits = 3;
773
774
 
774
775
  // When true, a contextual quote from the data that triggered a finding is
775
776
  // included in the response; see Finding.quote.
777
+ // This is not used for data profiling.
776
778
  bool include_quote = 4;
777
779
 
778
780
  // When true, excludes type information of the findings.
781
+ // This is not used for data profiling.
779
782
  bool exclude_info_types = 5;
780
783
 
781
784
  // CustomInfoTypes provided by the user. See
782
785
  // https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
783
786
  repeated CustomInfoType custom_info_types = 6;
784
787
 
785
- // List of options defining data content to scan.
786
- // If empty, text, images, and other content will be included.
788
+ // Deprecated and unused.
787
789
  repeated ContentOption content_options = 8;
788
790
 
789
791
  // Set of rules to apply to the findings for this InspectConfig.
@@ -825,6 +827,12 @@ message ByteContentItem {
825
827
  // pdf
826
828
  PDF = 8;
827
829
 
830
+ // pptx, pptm, potx, potm, pot
831
+ POWERPOINT_DOCUMENT = 9;
832
+
833
+ // xlsx, xlsm, xltx, xltm
834
+ EXCEL_DOCUMENT = 10;
835
+
828
836
  // avro
829
837
  AVRO = 11;
830
838
 
@@ -2857,6 +2865,18 @@ message TransformationOverview {
2857
2865
  // Only one of 'transformation', 'field_transformation', or 'record_suppress'
2858
2866
  // will be set.
2859
2867
  message TransformationSummary {
2868
+ // Possible outcomes of transformations.
2869
+ enum TransformationResultCode {
2870
+ // Unused
2871
+ TRANSFORMATION_RESULT_CODE_UNSPECIFIED = 0;
2872
+
2873
+ // Transformation completed without an error.
2874
+ SUCCESS = 1;
2875
+
2876
+ // Transformation had an error.
2877
+ ERROR = 2;
2878
+ }
2879
+
2860
2880
  // A collection that informs the user the number of times a particular
2861
2881
  // `TransformationResultCode` and error details occurred.
2862
2882
  message SummaryResult {
@@ -2871,18 +2891,6 @@ message TransformationSummary {
2871
2891
  string details = 3;
2872
2892
  }
2873
2893
 
2874
- // Possible outcomes of transformations.
2875
- enum TransformationResultCode {
2876
- // Unused
2877
- TRANSFORMATION_RESULT_CODE_UNSPECIFIED = 0;
2878
-
2879
- // Transformation completed without an error.
2880
- SUCCESS = 1;
2881
-
2882
- // Transformation had an error.
2883
- ERROR = 2;
2884
- }
2885
-
2886
2894
  // Set if the transformation was limited to a specific InfoType.
2887
2895
  InfoType info_type = 1;
2888
2896
 
@@ -4352,7 +4360,7 @@ enum MatchingType {
4352
4360
  MATCHING_TYPE_INVERSE_MATCH = 3;
4353
4361
  }
4354
4362
 
4355
- // Options describing which parts of the provided content should be scanned.
4363
+ // Deprecated and unused.
4356
4364
  enum ContentOption {
4357
4365
  // Includes entire content of a file or a data stream.
4358
4366
  CONTENT_UNSPECIFIED = 0;
@@ -1,4 +1,4 @@
1
- // Copyright 2021 Google LLC
1
+ // Copyright 2022 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -16,7 +16,6 @@ syntax = "proto3";
16
16
 
17
17
  package google.privacy.dlp.v2;
18
18
 
19
- import "google/api/annotations.proto";
20
19
  import "google/api/resource.proto";
21
20
  import "google/protobuf/timestamp.proto";
22
21
 
@@ -41,18 +40,6 @@ message InfoType {
41
40
  string version = 2;
42
41
  }
43
42
 
44
- // A reference to a StoredInfoType to use with scanning.
45
- message StoredType {
46
- // Resource name of the requested `StoredInfoType`, for example
47
- // `organizations/433245324/storedInfoTypes/432452342` or
48
- // `projects/project-id/storedInfoTypes/432452342`.
49
- string name = 1;
50
-
51
- // Timestamp indicating when the version of the `StoredInfoType` used for
52
- // inspection was created. Output-only field, populated by the system.
53
- google.protobuf.Timestamp create_time = 2;
54
- }
55
-
56
43
  // Categorization of results based on how likely they are to represent a match,
57
44
  // based on the number of elements they contain which imply a match.
58
45
  enum Likelihood {
@@ -73,6 +60,18 @@ enum Likelihood {
73
60
  VERY_LIKELY = 5;
74
61
  }
75
62
 
63
+ // A reference to a StoredInfoType to use with scanning.
64
+ message StoredType {
65
+ // Resource name of the requested `StoredInfoType`, for example
66
+ // `organizations/433245324/storedInfoTypes/432452342` or
67
+ // `projects/project-id/storedInfoTypes/432452342`.
68
+ string name = 1;
69
+
70
+ // Timestamp indicating when the version of the `StoredInfoType` used for
71
+ // inspection was created. Output-only field, populated by the system.
72
+ google.protobuf.Timestamp create_time = 2;
73
+ }
74
+
76
75
  // Custom information type provided by the user. Used to find domain-specific
77
76
  // sensitive information configurable to the data in question.
78
77
  message CustomInfoType {
@@ -85,7 +84,7 @@ message CustomInfoType {
85
84
  // Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
86
85
  // will be replaced with whitespace when scanning for matches, so the
87
86
  // dictionary phrase "Sam Johnson" will match all three phrases "sam johnson",
88
- // Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
87
+ // "Sam, Johnson", and "Sam (Johnson)". Additionally, the characters
89
88
  // surrounding any match must be of a different type than the adjacent
90
89
  // characters within the word, so letters must be next to non-letters and
91
90
  // digits next to non-digits. For example, the dictionary word "jen" will
@@ -98,7 +97,7 @@ message CustomInfoType {
98
97
  // [limits](https://cloud.google.com/dlp/limits) page contains details about
99
98
  // the size limits of dictionaries. For dictionaries that do not fit within
100
99
  // these constraints, consider using `LargeCustomDictionaryConfig` in the
101
- // [limits](https://cloud.google.com/dlp/limits) page contains details about
100
+ // `StoredInfoType` API.
102
101
  message Dictionary {
103
102
  // Message defining a list of words or phrases to search for in the data.
104
103
  message WordList {
@@ -124,7 +123,7 @@ message CustomInfoType {
124
123
  // (https://github.com/google/re2/wiki/Syntax) can be found under the
125
124
  // google/re2 repository on GitHub.
126
125
  string pattern = 1;
127
- // (https://github.com/google/re2/wiki/Syntax) can be found under the
126
+
128
127
  // The index of the submatch to extract as findings. When not
129
128
  // specified, the entire match is returned. No more than 3 may be included.
130
129
  repeated int32 group_indexes = 2;
@@ -135,10 +134,12 @@ message CustomInfoType {
135
134
  // [`CryptoReplaceFfxFpeConfig`](https://cloud.google.com/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig).
136
135
  // These types of transformations are
137
136
  // those that perform pseudonymization, thereby producing a "surrogate" as
138
- // [`CryptoReplaceFfxFpeConfig`](https://cloud.google.com/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig).
137
+ // output. This should be used in conjunction with a field on the
139
138
  // transformation such as `surrogate_info_type`. This CustomInfoType does
140
139
  // not support the use of `detection_rules`.
141
- message SurrogateType {}
140
+ message SurrogateType {
141
+
142
+ }
142
143
 
143
144
  // Deprecated; use `InspectionRuleSet` instead. Rule for modifying a
144
145
  // `CustomInfoType` to alter behavior under certain circumstances, depending
@@ -284,6 +285,67 @@ message DatastoreOptions {
284
285
  KindExpression kind = 2;
285
286
  }
286
287
 
288
+ // Definitions of file type groups to scan. New types will be added to this
289
+ // list.
290
+ enum FileType {
291
+ // Includes all files.
292
+ FILE_TYPE_UNSPECIFIED = 0;
293
+
294
+ // Includes all file extensions not covered by another entry. Binary
295
+ // scanning attempts to convert the content of the file to utf_8 to scan
296
+ // the file.
297
+ // If you wish to avoid this fall back, specify one or more of the other
298
+ // FileType's in your storage scan.
299
+ BINARY_FILE = 1;
300
+
301
+ // Included file extensions:
302
+ // asc,asp, aspx, brf, c, cc,cfm, cgi, cpp, csv, cxx, c++, cs, css, dart,
303
+ // dat, dot, eml,, epbub, ged, go, h, hh, hpp, hxx, h++, hs, html, htm,
304
+ // mkd, markdown, m, ml, mli, perl, pl, plist, pm, php, phtml, pht,
305
+ // properties, py, pyw, rb, rbw, rs, rss, rc, scala, sh, sql, swift, tex,
306
+ // shtml, shtm, xhtml, lhs, ics, ini, java, js, json, kix, kml, ocaml, md,
307
+ // txt, text, tsv, vb, vcard, vcs, wml, xcodeproj, xml, xsl, xsd, yml, yaml.
308
+ TEXT_FILE = 2;
309
+
310
+ // Included file extensions:
311
+ // bmp, gif, jpg, jpeg, jpe, png.
312
+ // bytes_limit_per_file has no effect on image files.
313
+ // Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
314
+ IMAGE = 3;
315
+
316
+ // Word files >30 MB will be scanned as binary files.
317
+ // Included file extensions:
318
+ // docx, dotx, docm, dotm
319
+ WORD = 5;
320
+
321
+ // PDF files >30 MB will be scanned as binary files.
322
+ // Included file extensions:
323
+ // pdf
324
+ PDF = 6;
325
+
326
+ // Included file extensions:
327
+ // avro
328
+ AVRO = 7;
329
+
330
+ // Included file extensions:
331
+ // csv
332
+ CSV = 8;
333
+
334
+ // Included file extensions:
335
+ // tsv
336
+ TSV = 9;
337
+
338
+ // Powerpoint files >30 MB will be scanned as binary files.
339
+ // Included file extensions:
340
+ // pptx, pptm, potx, potm, pot
341
+ POWERPOINT = 11;
342
+
343
+ // Excel files >30 MB will be scanned as binary files.
344
+ // Included file extensions:
345
+ // xlsx, xlsm, xltx, xltm
346
+ EXCEL = 12;
347
+ }
348
+
287
349
  // Message representing a set of files in a Cloud Storage bucket. Regular
288
350
  // expressions are used to allow fine-grained control over which files in the
289
351
  // bucket to include.
@@ -330,7 +392,7 @@ message CloudStorageRegexFileSet {
330
392
  // [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
331
393
  // under the google/re2 repository on GitHub.
332
394
  repeated string include_regex = 2;
333
- // [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
395
+
334
396
  // A list of regular expressions matching file paths to exclude. All files in
335
397
  // the bucket that match at least one of these regular expressions will be
336
398
  // excluded from the scan.
@@ -339,7 +401,6 @@ message CloudStorageRegexFileSet {
339
401
  // [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
340
402
  // under the google/re2 repository on GitHub.
341
403
  repeated string exclude_regex = 3;
342
- // [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
343
404
  }
344
405
 
345
406
  // Options defining a file or a set of files within a Google Cloud Storage
@@ -531,57 +592,6 @@ message StorageConfig {
531
592
  TimespanConfig timespan_config = 6;
532
593
  }
533
594
 
534
- // Definitions of file type groups to scan. New types will be added to this
535
- // list.
536
- enum FileType {
537
- // Includes all files.
538
- FILE_TYPE_UNSPECIFIED = 0;
539
-
540
- // Includes all file extensions not covered by another entry. Binary
541
- // scanning attempts to convert the content of the file to utf_8 to scan
542
- // the file.
543
- // If you wish to avoid this fall back, specify one or more of the other
544
- // FileType's in your storage scan.
545
- BINARY_FILE = 1;
546
-
547
- // Included file extensions:
548
- // asc,asp, aspx, brf, c, cc,cfm, cgi, cpp, csv, cxx, c++, cs, css, dart,
549
- // dat, dot, eml,, epbub, ged, go, h, hh, hpp, hxx, h++, hs, html, htm,
550
- // mkd, markdown, m, ml, mli, perl, pl, plist, pm, php, phtml, pht,
551
- // properties, py, pyw, rb, rbw, rs, rss, rc, scala, sh, sql, swift, tex,
552
- // shtml, shtm, xhtml, lhs, ics, ini, java, js, json, kix, kml, ocaml, md,
553
- // txt, text, tsv, vb, vcard, vcs, wml, xcodeproj, xml, xsl, xsd, yml, yaml.
554
- TEXT_FILE = 2;
555
-
556
- // Included file extensions:
557
- // bmp, gif, jpg, jpeg, jpe, png.
558
- // bytes_limit_per_file has no effect on image files.
559
- // Image inspection is restricted to 'global', 'us', 'asia', and 'europe'.
560
- IMAGE = 3;
561
-
562
- // Word files >30 MB will be scanned as binary files.
563
- // Included file extensions:
564
- // docx, dotx, docm, dotm
565
- WORD = 5;
566
-
567
- // PDF files >30 MB will be scanned as binary files.
568
- // Included file extensions:
569
- // pdf
570
- PDF = 6;
571
-
572
- // Included file extensions:
573
- // avro
574
- AVRO = 7;
575
-
576
- // Included file extensions:
577
- // csv
578
- CSV = 8;
579
-
580
- // Included file extensions:
581
- // tsv
582
- TSV = 9;
583
- }
584
-
585
595
  // Configuration to control jobs where the content being inspected is outside
586
596
  // of Google Cloud Platform.
587
597
  message HybridOptions {