| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 2e5996c commit 909480a
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,33 +19,26 @@ and set the `GOOGLE_APPLICATION_CREDENTIALS` environment variable pointing to th | |||
| 19 | 19 | This project uses the [Assembly Plugin](https://maven.apache.org/plugins/maven-assembly-plugin/usage.html) to build an uber jar. | |
| 20 | 20 | Run: | |
| 21 | 21 | ``` | |
| 22 | - mvn clean package | ||
| 22 | + mvn clean package -DskipTests | ||
| 23 | 23 | ``` | |
| 24 | 24 | ||
| 25 | 25 | ## Retrieve InfoTypes | |
| 26 | 26 | An [InfoType identifier](https://cloud.google.com/dlp/docs/infotypes-categories) represents an element of sensitive data. | |
| 27 | 27 | ||
| 28 | - [Info types](https://cloud.google.com/dlp/docs/infotypes-reference#global) are updated periodically. Use the API to retrieve the most current | ||
| 29 | - info types for a given category. eg. HEALTH or GOVERNMENT. | ||
| 28 | + [InfoTypes](https://cloud.google.com/dlp/docs/infotypes-reference#global) are updated periodically. Use the API to retrieve the most current InfoTypes. | ||
| 30 | 29 | ``` | |
| 31 | - java -cp target/dlp-samples-1.0-jar-with-dependencies.jar com.example.dlp.Metadata -category GOVERNMENT | ||
| 30 | + java -cp dlp/target/dlp-samples-1.0-jar-with-dependencies.jar com.example.dlp.Metadata | ||
| 32 | 31 | ``` | |
| 33 | 32 | ||
| 34 | - ## Retrieve Categories | ||
| 35 | - [Categories](https://cloud.google.com/dlp/docs/infotypes-categories) provide a way to easily access a group of related InfoTypes. | ||
| 36 | - ``` | ||
| 37 | - java -cp target/dlp-samples-1.0-jar-with-dependencies.jar com.example.dlp.Metadata | ||
| 38 | - ``` | ||
| 39 | - | ||
| 40 | 33 | ## Run the quickstart | |
| 41 | 34 | ||
| 42 | 35 | The Quickstart demonstrates using the DLP API to identify an InfoType in a given string. | |
| 43 | 36 | ``` | |
| 44 | - java -cp target/dlp-samples-1.0-jar-with-dependencies.jar com.example.dlp.QuickStart | ||
| 37 | + java -cp dlp/target/dlp-samples-1.0-jar-with-dependencies.jar com.example.dlp.QuickStart | ||
| 45 | 38 | ``` | |
| 46 | 39 | ||
| 47 | 40 | ## Inspect data for sensitive elements | |
| 48 | - Inspect strings, files locally and on Google Cloud Storage and Cloud Datastore kinds with the DLP API. | ||
| 41 | + Inspect strings, files locally and on Google Cloud Storage, Cloud Datastore, and BigQuery with the DLP API. | ||
| 49 | 42 | ||
| 50 | 43 | Note: image scanning is not currently supported on Google Cloud Storage. | |
| 51 | 44 | For more information, refer to the [API documentation](https://cloud.google.com/dlp/docs). | |
@@ -73,21 +66,21 @@ Options: | |||
| 73 | 66 | ### Examples | |
| 74 | 67 | - Inspect a string: | |
| 75 | 68 | ``` | |
| 76 | - java -cp target/dlp-samples-1.0-jar-with-dependencies.jar com.example.dlp.Inspect -s "My phone number is (123) 456-7890 and my email address is me@somedomain.com" --infoTypes PHONE_NUMBER EMAIL_ADDRESS | ||
| 77 | - java -cp target/dlp-samples-1.0-jar-with-dependencies.jar com.example.dlp.Inspect -s "My phone number is (123) 456-7890 and my email address is me@somedomain.com" -customDictionaries me@somedomain.com -customRegexes "\(\d{3}\) \d{3}-\d{4}" | ||
| 69 | + java -cp dlp/target/dlp-samples-1.0-jar-with-dependencies.jar com.example.dlp.Inspect -s "My phone number is (123) 456-7890 and my email address is me@somedomain.com" --infoTypes PHONE_NUMBER EMAIL_ADDRESS | ||
| 70 | + java -cp dlp/target/dlp-samples-1.0-jar-with-dependencies.jar com.example.dlp.Inspect -s "My phone number is (123) 456-7890 and my email address is me@somedomain.com" -customDictionaries me@somedomain.com -customRegexes "\(\d{3}\) \d{3}-\d{4}" | ||
| 78 | 71 | ``` | |
| 79 | 72 | - Inspect a local file (text / image): | |
| 80 | 73 | ``` | |
| 81 | - java -cp target/dlp-samples-1.0-jar-with-dependencies.jar com.example.dlp.Inspect -f src/test/resources/test.txt --infoTypes PHONE_NUMBER EMAIL_ADDRESS | ||
| 82 | - java -cp target/dlp-samples-1.0-jar-with-dependencies.jar com.example.dlp.Inspect -f src/test/resources/test.png --infoTypes PHONE_NUMBER EMAIL_ADDRESS | ||
| 74 | + java -cp dlp/target/dlp-samples-1.0-jar-with-dependencies.jar com.example.dlp.Inspect -f src/test/resources/test.txt --infoTypes PHONE_NUMBER EMAIL_ADDRESS | ||
| 75 | + java -cp dlp/target/dlp-samples-1.0-jar-with-dependencies.jar com.example.dlp.Inspect -f src/test/resources/test.png --infoTypes PHONE_NUMBER EMAIL_ADDRESS | ||
| 83 | 76 | ``` | |
| 84 | 77 | - Inspect a file on Google Cloud Storage: | |
| 85 | 78 | ``` | |
| 86 | - java -cp target/dlp-samples-1.0-jar-with-dependencies.jar com.example.dlp.Inspect -gcs -bucketName my-bucket -fileName my-file.txt --infoTypes PHONE_NUMBER EMAIL_ADDRESS | ||
| 79 | + java -cp dlp/target/dlp-samples-1.0-jar-with-dependencies.jar com.example.dlp.Inspect -gcs -bucketName my-bucket -fileName my-file.txt --infoTypes PHONE_NUMBER EMAIL_ADDRESS | ||
| 87 | 80 | ``` | |
| 88 | 81 | - Inspect a Google Cloud Datastore kind: | |
| 89 | 82 | ``` | |
| 90 | - java -cp target/dlp-samples-1.0-jar-with-dependencies.jar com.example.dlp.Inspect -ds -kind my-kind --infoTypes PHONE_NUMBER EMAIL_ADDRESS | ||
| 83 | + java -cp dlp/target/dlp-samples-1.0-jar-with-dependencies.jar com.example.dlp.Inspect -ds -kind my-kind --infoTypes PHONE_NUMBER EMAIL_ADDRESS | ||
| 91 | 84 | ``` | |
| 92 | 85 | ||
| 93 | 86 | ## Automatic redaction of sensitive data from images | |
@@ -109,7 +102,7 @@ Commands: | |||
| 109 | 102 | ### Example | |
| 110 | 103 | - Redact phone numbers and email addresses from `test.png`: | |
| 111 | 104 | ``` | |
| 112 | - java -cp target/dlp-samples-1.0-jar-with-dependencies.jar com.example.dlp.Redact -f src/test/resources/test.png -o test-redacted.png -infoTypes PHONE_NUMBER EMAIL_ADDRESS | ||
| 105 | + java -cp dlp/target/dlp-samples-1.0-jar-with-dependencies.jar com.example.dlp.Redact -f src/test/resources/test.png -o test-redacted.png -infoTypes PHONE_NUMBER EMAIL_ADDRESS | ||
| 113 | 106 | ``` | |
| 114 | 107 | ||
| 115 | 108 | ## Integration tests | |
| Back | FazBrowse Home | New Git URL |
0 commit comments