...

Text file src/github.com/GoogleCloudPlatform/k8s-config-connector/samples/resources/dlpinspecttemplate/custom-inspect-template/dlp_v1beta1_dlpinspecttemplate.yaml

Documentation: github.com/GoogleCloudPlatform/k8s-config-connector/samples/resources/dlpinspecttemplate/custom-inspect-template

     1# Copyright 2022 Google LLC
     2#
     3# Licensed under the Apache License, Version 2.0 (the "License");
     4# you may not use this file except in compliance with the License.
     5# You may obtain a copy of the License at
     6#
     7#     http://www.apache.org/licenses/LICENSE-2.0
     8#
     9# Unless required by applicable law or agreed to in writing, software
    10# distributed under the License is distributed on an "AS IS" BASIS,
    11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12# See the License for the specific language governing permissions and
    13# limitations under the License.
    14
    15apiVersion: dlp.cnrm.cloud.google.com/v1beta1
    16kind: DLPInspectTemplate
    17metadata:
    18  name: dlpinspecttemplate-sample-custominspecttemplate
    19spec:
    20  projectRef:
    21    # Replace "${PROJECT_ID?}" with your project ID
    22    external: "projects/${PROJECT_ID?}"
    23  location: "us-west2"
    24  displayName: "sample-template"
    25  description: "A sample dlp inspect template"
    26  inspectConfig:
    27    infoTypes:
    28    - name: "AGE"
    29    minLikelihood: "POSSIBLE"
    30    limits:
    31      maxFindingsPerItem: 7
    32      maxFindingsPerRequest: 7
    33      maxFindingsPerInfoType:
    34      - infoType:
    35          name: "AGE"
    36        maxFindings: 7
    37    includeQuote: false
    38    excludeInfoTypes: false
    39    customInfoTypes:
    40    - infoType:
    41        name: "PHONE_NUMBER"
    42      likelihood: "POSSIBLE"
    43      dictionary:
    44        wordList:
    45          words:
    46          - "911"
    47    - infoType:
    48        name: "AGE"
    49      dictionary:
    50        cloudStoragePath:
    51          # Replace "${DLP_TEST_BUCKET?}" with your storage bucket name
    52          path: "gs://${DLP_TEST_BUCKET?}/dictionary-1"
    53    - infoType:
    54        name: "HOME_ADDRESS"
    55      storedType:
    56        nameRef:
    57          name: "dlpinspecttemplate-dep-custominspecttemplate"
    58    - infoType:
    59        name: "SALARY"
    60      exclusionType: "EXCLUSION_TYPE_EXCLUDE"
    61      regex:
    62        pattern: "(\\$)(\\d*)"
    63        groupIndexes:
    64        - 1
    65        - 2
    66    - infoType:
    67        name: "HEIGHT"
    68      regex:
    69        pattern: "\\d'\\d{2}\""
    70      surrogateType: {}
    71    contentOptions:
    72    - "CONTENT_TEXT"
    73    ruleSet:
    74    - infoTypes:
    75      - name: "AGE"
    76      rules:
    77      - exclusionRule:
    78          matchingType: "MATCHING_TYPE_FULL_MATCH"
    79          dictionary:
    80            wordList:
    81              words:
    82              - "911"
    83      - exclusionRule:
    84          matchingType: "MATCHING_TYPE_FULL_MATCH"
    85          dictionary:
    86            cloudStoragePath:
    87              # Replace "${DLP_TEST_BUCKET?}" with your storage bucket name
    88              path: "gs://${DLP_TEST_BUCKET?}/dictionary-1"
    89      - exclusionRule:
    90          matchingType: "MATCHING_TYPE_FULL_MATCH"
    91          regex:
    92            pattern: "([12])(\\d{1,2})"
    93            groupIndexes:
    94            - 1
    95            - 2
    96      - exclusionRule:
    97          matchingType: "MATCHING_TYPE_FULL_MATCH"
    98          excludeInfoTypes:
    99            infoTypes:
   100            - name: "PHONE_NUMBER"
   101    - infoTypes:
   102      - name: "PHONE_NUMBER"
   103      rules:
   104      - hotwordRule:
   105          hotwordRegex:
   106            pattern: "\\(([0-9]{3})\\) ?[0-9]{3}-[0-9]{4}"
   107            groupIndexes:
   108            - 0
   109            - 1
   110          proximity:
   111            windowBefore: 2
   112            windowAfter: 3
   113          likelihoodAdjustment:
   114            fixedLikelihood: "LIKELY"
   115      - hotwordRule:
   116          hotwordRegex:
   117            pattern: "\\+?[0-9]*"
   118          proximity:
   119            windowBefore: 2
   120            windowAfter: 3
   121          likelihoodAdjustment:
   122            relativeLikelihood: 1

View as plain text