|
1 | | -// Copyright 2018 Google LLC |
| 1 | +// Copyright 2018 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. |
|
11 | 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
12 | 12 | // See the License for the specific language governing permissions and |
13 | 13 | // limitations under the License. |
| 14 | +// |
14 | 15 |
|
15 | 16 | syntax = "proto3"; |
16 | 17 |
|
@@ -400,6 +401,59 @@ service DlpService { |
400 | 401 | } |
401 | 402 | } |
402 | 403 |
|
| 404 | +// List of exclude infoTypes. |
| 405 | +message ExcludeInfoTypes { |
| 406 | + // InfoType list in ExclusionRule rule drops a finding when it overlaps or |
| 407 | + // contained within with a finding of an infoType from this list. For |
| 408 | + // example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and |
| 409 | + // `exclusion_rule` containing `exclude_info_types.info_types` with |
| 410 | + // "EMAIL_ADDRESS" the phone number findings are dropped if they overlap |
| 411 | + // with EMAIL_ADDRESS finding. |
| 412 | + // That leads to "555-222-2222@example.org" to generate only a single |
| 413 | + // finding, namely email address. |
| 414 | + repeated InfoType info_types = 1; |
| 415 | +} |
| 416 | + |
| 417 | +// The rule that specifies conditions when findings of infoTypes specified in |
| 418 | +// `InspectionRuleSet` are removed from results. |
| 419 | +message ExclusionRule { |
| 420 | + oneof type { |
| 421 | + // Dictionary which defines the rule. |
| 422 | + CustomInfoType.Dictionary dictionary = 1; |
| 423 | + |
| 424 | + // Regular expression which defines the rule. |
| 425 | + CustomInfoType.Regex regex = 2; |
| 426 | + |
| 427 | + // Set of infoTypes for which findings would affect this rule. |
| 428 | + ExcludeInfoTypes exclude_info_types = 3; |
| 429 | + } |
| 430 | + |
| 431 | + // How the rule is applied, see MatchingType documentation for details. |
| 432 | + MatchingType matching_type = 4; |
| 433 | +} |
| 434 | + |
| 435 | +// A single inspection rule to be applied to infoTypes, specified in |
| 436 | +// `InspectionRuleSet`. |
| 437 | +message InspectionRule { |
| 438 | + oneof type { |
| 439 | + // Hotword-based detection rule. |
| 440 | + CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; |
| 441 | + |
| 442 | + // Exclusion rule. |
| 443 | + ExclusionRule exclusion_rule = 2; |
| 444 | + } |
| 445 | +} |
| 446 | + |
| 447 | +// Rule set for modifying a set of infoTypes to alter behavior under certain |
| 448 | +// circumstances, depending on the specific details of the rules within the set. |
| 449 | +message InspectionRuleSet { |
| 450 | + // List of infoTypes this rule set is applied to. |
| 451 | + repeated InfoType info_types = 1; |
| 452 | + |
| 453 | + // Set of rules to be applied to infoTypes. The rules are applied in order. |
| 454 | + repeated InspectionRule rules = 2; |
| 455 | +} |
| 456 | + |
403 | 457 | // Configuration description of the scanning process. |
404 | 458 | // When used with redactContent only info_types and min_likelihood are currently |
405 | 459 | // used. |
@@ -468,6 +522,11 @@ message InspectConfig { |
468 | 522 | // List of options defining data content to scan. |
469 | 523 | // If empty, text, images, and other content will be included. |
470 | 524 | repeated ContentOption content_options = 8; |
| 525 | + |
| 526 | + // Set of rules to apply to the findings for this InspectConfig. |
| 527 | + // Exclusion rules, contained in the set are executed in the end, other |
| 528 | + // rules are executed in the order they are specified for each info type. |
| 529 | + repeated InspectionRuleSet rule_set = 10; |
471 | 530 | } |
472 | 531 |
|
473 | 532 | // Container for bytes to inspect or redact. |
@@ -2335,6 +2394,21 @@ message ListInspectTemplatesRequest { |
2335 | 2394 | // Optional size of the page, can be limited by server. If zero server returns |
2336 | 2395 | // a page of max size 100. |
2337 | 2396 | int32 page_size = 3; |
| 2397 | + |
| 2398 | + // Optional comma separated list of fields to order by, |
| 2399 | + // followed by `asc` or `desc` postfix. This list is case-insensitive, |
| 2400 | + // default sorting order is ascending, redundant space characters are |
| 2401 | + // insignificant. |
| 2402 | + // |
| 2403 | + // Example: `name asc,update_time, create_time desc` |
| 2404 | + // |
| 2405 | + // Supported fields are: |
| 2406 | + // |
| 2407 | + // - `create_time`: corresponds to time the template was created. |
| 2408 | + // - `update_time`: corresponds to time the template was last updated. |
| 2409 | + // - `name`: corresponds to template's name. |
| 2410 | + // - `display_name`: corresponds to template's display name. |
| 2411 | + string order_by = 4; |
2338 | 2412 | } |
2339 | 2413 |
|
2340 | 2414 | // Response message for ListInspectTemplates. |
@@ -2433,9 +2507,11 @@ message ListJobTriggersRequest { |
2433 | 2507 | // |
2434 | 2508 | // Supported fields are: |
2435 | 2509 | // |
2436 | | - // - `create_time`: corresponds to time the triggeredJob was created. |
2437 | | - // - `update_time`: corresponds to time the triggeredJob was last updated. |
| 2510 | + // - `create_time`: corresponds to time the JobTrigger was created. |
| 2511 | + // - `update_time`: corresponds to time the JobTrigger was last updated. |
2438 | 2512 | // - `name`: corresponds to JobTrigger's name. |
| 2513 | + // - `display_name`: corresponds to JobTrigger's display name. |
| 2514 | + // - `status`: corresponds to JobTrigger's status. |
2439 | 2515 | string order_by = 4; |
2440 | 2516 | } |
2441 | 2517 |
|
@@ -2646,6 +2722,21 @@ message ListDeidentifyTemplatesRequest { |
2646 | 2722 | // Optional size of the page, can be limited by server. If zero server returns |
2647 | 2723 | // a page of max size 100. |
2648 | 2724 | int32 page_size = 3; |
| 2725 | + |
| 2726 | + // Optional comma separated list of fields to order by, |
| 2727 | + // followed by `asc` or `desc` postfix. This list is case-insensitive, |
| 2728 | + // default sorting order is ascending, redundant space characters are |
| 2729 | + // insignificant. |
| 2730 | + // |
| 2731 | + // Example: `name asc,update_time, create_time desc` |
| 2732 | + // |
| 2733 | + // Supported fields are: |
| 2734 | + // |
| 2735 | + // - `create_time`: corresponds to time the template was created. |
| 2736 | + // - `update_time`: corresponds to time the template was last updated. |
| 2737 | + // - `name`: corresponds to template's name. |
| 2738 | + // - `display_name`: corresponds to template's display name. |
| 2739 | + string order_by = 4; |
2649 | 2740 | } |
2650 | 2741 |
|
2651 | 2742 | // Response message for ListDeidentifyTemplates. |
@@ -2798,6 +2889,22 @@ message ListStoredInfoTypesRequest { |
2798 | 2889 | // Optional size of the page, can be limited by server. If zero server returns |
2799 | 2890 | // a page of max size 100. |
2800 | 2891 | int32 page_size = 3; |
| 2892 | + |
| 2893 | + // Optional comma separated list of fields to order by, |
| 2894 | + // followed by `asc` or `desc` postfix. This list is case-insensitive, |
| 2895 | + // default sorting order is ascending, redundant space characters are |
| 2896 | + // insignificant. |
| 2897 | + // |
| 2898 | + // Example: `name asc, display_name, create_time desc` |
| 2899 | + // |
| 2900 | + // Supported fields are: |
| 2901 | + // |
| 2902 | + // - `create_time`: corresponds to time the most recent version of the |
| 2903 | + // resource was created. |
| 2904 | + // - `state`: corresponds to the state of the resource. |
| 2905 | + // - `name`: corresponds to resource name. |
| 2906 | + // - `display_name`: corresponds to info type's display name. |
| 2907 | + string order_by = 4; |
2801 | 2908 | } |
2802 | 2909 |
|
2803 | 2910 | // Response message for ListStoredInfoTypes. |
@@ -2830,6 +2937,35 @@ enum ContentOption { |
2830 | 2937 | CONTENT_IMAGE = 2; |
2831 | 2938 | } |
2832 | 2939 |
|
| 2940 | +// Type of the match which can be applied to different ways of matching, like |
| 2941 | +// Dictionary, regular expression and intersecting with findings of another |
| 2942 | +// info type. |
| 2943 | +enum MatchingType { |
| 2944 | + // Invalid. |
| 2945 | + MATCHING_TYPE_UNSPECIFIED = 0; |
| 2946 | + |
| 2947 | + // Full match. |
| 2948 | + // |
| 2949 | + // - Dictionary: join of Dictionary results matched complete finding quote |
| 2950 | + // - Regex: all regex matches fill a finding quote start to end |
| 2951 | + // - Exclude info type: completely inside affecting info types findings |
| 2952 | + MATCHING_TYPE_FULL_MATCH = 1; |
| 2953 | + |
| 2954 | + // Partial match. |
| 2955 | + // |
| 2956 | + // - Dictionary: at least one of the tokens in the finding matches |
| 2957 | + // - Regex: substring of the finding matches |
| 2958 | + // - Exclude info type: intersects with affecting info types findings |
| 2959 | + MATCHING_TYPE_PARTIAL_MATCH = 2; |
| 2960 | + |
| 2961 | + // Inverse match. |
| 2962 | + // |
| 2963 | + // - Dictionary: no tokens in the finding match the dictionary |
| 2964 | + // - Regex: finding doesn't match the regex |
| 2965 | + // - Exclude info type: no intersection with affecting info types findings |
| 2966 | + MATCHING_TYPE_INVERSE_MATCH = 3; |
| 2967 | +} |
| 2968 | + |
2833 | 2969 | // Parts of the APIs which use certain infoTypes. |
2834 | 2970 | enum InfoTypeSupportedBy { |
2835 | 2971 | ENUM_TYPE_UNSPECIFIED = 0; |
|
0 commit comments