-
Notifications
You must be signed in to change notification settings - Fork 24
Example of of Crypto Deterministic Config using https://cloud.google.… #119
Conversation
|
Here is the summary of changes. You are about to add 2 region tags.
This comment is generated by snippet-bot.
|
tmatsuo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, with few small suggestions
|
In case you don't have access to the build log, here is the lint output: |
|
I fixed the 5 places and fixed parameters in the unit tests. I had to push an amended commit as new commits failed https://www.conventionalcommits.org/en/v1.0.0/ checks. Should new commit's comment be identical to prior commit's comment? What's the rule @tmatsuo ? |
|
@hilliao |
|
@hilliao Do you have access to the build log? |
|
I can see the build error but I don't have access to test_deidentify_with_deterministic 's output to see the output of the tokenized harmful string. I believe the error from the build is caused by using my own KMS key instead of projects/python-docs-samples-tests/locations/global/keyRings/dlp-test/cryptoKeys/dlp-test which I don't have access to. echo -ne $RAW_KEY | gcloud kms encrypt --key $KEY_NAME --keyring $KEY_RING_NAME --location global --plaintext-file=- --ciphertext-file wrapped.key --project python-docs-samples-tests && cat wrapped.key | base64
ERROR: (gcloud.kms.encrypt) PERMISSION_DENIED: Permission 'cloudkms.cryptoKeyVersions.useToEncrypt' denied on resource 'projects/python-docs-samples-tests/locations/global/keyRings/dlp-test/cryptoKeys/dlp-test' (or it may not exist).
I believe the tokenized string is in the output of test_deidentify_with_deterministic but I can't find its output from the build error. Can you tell me the tokenized string or the whole build output so I can update the code line? labeled_fpe_string = "My SSN is SSN_TOKEN(36):AUGFopzf7RiKAHWD2Sm5GJWS0Yfezsbc1OU=" |
|
@hilliao I got it. I'll try to add a commit. |
Example of of Crypto Deterministic Config using https://cloud.google.com/dlp/docs/pseudonymization#supported-methods to resolve #108
|
Re: conventional commits |
|
Now the tests are passing. It might be better to get the string dynamically with a pytest fixture. |
|
@hilliao WDYT? |
|
I would like to merge this pull request first; then I will create a new issue to change the |
|
@hilliao Sounds good |
|
@hilliao Thanks for your contribution! |
🤖 I have created a release \*beep\* \*boop\* --- ## [3.1.0](https://www.github.com/googleapis/python-dlp/compare/v3.0.1...v3.1.0) (2021-05-28) ### Features * crypto_deterministic_config ([#108](https://www.github.com/googleapis/python-dlp/issues/108)) ([#119](https://www.github.com/googleapis/python-dlp/issues/119)) ([396804d](https://www.github.com/googleapis/python-dlp/commit/396804d65e40c1ae9ced16aa0f04ef4bdffa54c5)) * support self-signed JWT flow for service accounts ([cdea974](https://www.github.com/googleapis/python-dlp/commit/cdea9744d0bc7244a42894acc1446080a16b2dab)) ### Bug Fixes * add async client ([cdea974](https://www.github.com/googleapis/python-dlp/commit/cdea9744d0bc7244a42894acc1446080a16b2dab)) * require google-api-core>=1.22.2 ([d146cf5](https://www.github.com/googleapis/python-dlp/commit/d146cf59db14b3c3afbef72d7a86419532ad347e)) * use correct retry deadlines ([#96](https://www.github.com/googleapis/python-dlp/issues/96)) ([d146cf5](https://www.github.com/googleapis/python-dlp/commit/d146cf59db14b3c3afbef72d7a86419532ad347e)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
…com/dlp/docs/pseudonymization#supported-methods to resolve #108
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #<108> 🦕