Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrate code from googleapis/python-kms #8470

Merged
merged 136 commits into from
Nov 14, 2022
Merged

migrate code from googleapis/python-kms #8470

merged 136 commits into from
Nov 14, 2022

Conversation

rsamborski
Copy link
Member

@rsamborski rsamborski commented Nov 8, 2022

Description

Samples migration from https://github.com/googleapis/python-kms

Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.

Checklist

@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Nov 8, 2022
@google-cla
Copy link

google-cla bot commented Nov 8, 2022

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@rsamborski rsamborski self-assigned this Nov 8, 2022
@rsamborski rsamborski added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 8, 2022
@rsamborski rsamborski marked this pull request as ready for review November 8, 2022 22:14
@rsamborski rsamborski requested review from a team as code owners November 8, 2022 22:14
@snippet-bot
Copy link

snippet-bot bot commented Nov 8, 2022

Here is the summary of changes.

You are about to add 42 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@dandhlee dandhlee requested a review from nicain November 8, 2022 22:31
@dandhlee
Copy link
Collaborator

dandhlee commented Nov 8, 2022

Nick, could you help take a look for this migration?

@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 8, 2022
.github/CODEOWNERS Show resolved Hide resolved
kms/attestations/noxfile.py Outdated Show resolved Hide resolved
kms/snippets/noxfile.py Outdated Show resolved Hide resolved
Copy link
Contributor

@chalmerlowe chalmerlowe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@dandhlee dandhlee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also add blunderbuss.yml for api: cloudkms?

ryanmats and others added 12 commits November 14, 2022 11:30
* Draft of first half of KMS samples

* reversed wrong change

* KMS Apiary Python samples - P1

* Few minor style issues

* Adding back in space i accidentally deleted

* Addressed all code review comments

* Renamed api directory to api-client

* Addressed more code review comments

* Formatting change

* Fix quickstart test

Change-Id: Ib79dc1345c9c40547f3fd4e9c3c9a48963a3b399

* Update readme

Change-Id: Icf4a66083f56d6f51be76ba1cf3b5dc8daf2c4c1

* Add readme

Change-Id: I2fbaa55092ef8787f1423d499aa310cab258c0c1

* Added parsers

* Final minor changes to parsers

* Added autogenerated README

* Changed snippets_test keyring name and cryptokey name
* random generation of keyring / cryptokey names

* Fixed formatting of keyring name and cryptokey name
* Remove cloud config fixture

* Fix client secrets

* Fix bigtable instance
)](#1074)

The use of base64 is essentially an implementation detail of the Cloud KMS REST
API: it is required only so that arbitrary binary data can be included in a JSON
string, which only allows Unicode characters. Therefore, the "encrypt" sample
function should decode the base64-encoded ciphertext before writing the
file. Similarly, "decrypt" should not assume that an input file is
base64-encoded, but should perform the base64-encoding itself before sending the
encrypted data to KMS.

This aligns with how the "gcloud kms encrypt" and "gcloud kms decrypt" commands
behave. See https://stackoverflow.com/q/45699472 for an example of user
confusion caused by the mismatch.
…1075)

In particular, this change:
- changes to use a consistent "_id" suffix for resource name components
- uses "data" instead of "text", since encryption is not restricted to text
- substitutes "ciphertext" for "encrypted {text, data}"
- spells "crypto key" and "key ring" each as two separate words, as in the API

Tracking bug: http://b/64758639
* Auto-update dependencies.

* Relax assertions in the ocr_nl sample

Change-Id: I6d37e5846a8d6dd52429cb30d501f448c52cbba1

* Drop unused logging apiary samples

Change-Id: I545718283773cb729a5e0def8a76ebfa40829d51
Change-Id: I03b5eaef8b17ac3dc3c0339fd2c7447bd3e11bd2
* Auto-update dependencies.

* Fix missing http library

Change-Id: I99faa600f2f3f1f50f57694fc9835d7f35bda250
renovate-bot and others added 20 commits November 14, 2022 11:30
* chore(python): drop python 3.6

Source-Link: googleapis/synthtool@4f89b13
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:e7bb19d47c13839fe8c147e50e02e8b6cf5da8edd1af8b82208cd6f66cc2829c

* add api_description to .repo-metadata.json

* require python 3.7+ in setup.py

* remove python 3.6 sample configs

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
* chore(deps): update all dependencies

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* revert

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
* chore(deps): update all dependencies

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* revert

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Source-Link: googleapis/synthtool@50db768
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:e09366bdf0fd9c8976592988390b24d53583dd9f002d476934da43725adbb978
@rsamborski
Copy link
Member Author

Could you also add blunderbuss.yml for api: cloudkms?

@dandhlee Done.

.github/blunderbuss.yml Show resolved Hide resolved
Copy link
Collaborator

@dandhlee dandhlee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Overriding CLA and merging.

@dandhlee dandhlee merged commit 88cf2fe into main Nov 14, 2022
@dandhlee dandhlee deleted the python-kms-migration branch November 14, 2022 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.