GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: customer managed keys (CMEK) by chrisrossi · Pull Request #249 · googleapis/python-bigtable

This repository was archived by the owner on Aug 30, 2026. It is now read-only.

Conversation

@chrisrossi

@chrisrossi chrisrossi commented Mar 17, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Implement customer managed keys (CMEK) feature.

Closes #272

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Chris Rossi
feat: customer managed keys (CMEK)
5c9b61a
Implement customer managed keys (CMEK) feature.

WIP. DO NOT MERGE.
@chrisrossi chrisrossi added api: bigtable Issues related to the googleapis/python-bigtable API. do not merge Indicates a pull request not ready for merge, due to either quality or timing. labels Mar 17, 2021
@chrisrossi
chrisrossi requested review from a team March 17, 2021 20:07
@google-cla google-cla Bot added the cla: yes This human has signed the Contributor License Agreement. label Mar 17, 2021
@chrisrossi

chrisrossi commented Mar 17, 2021

Copy link
Copy Markdown
Contributor Author

System tests only work with a particular project and a particular key. I'll need to get it creating its own key ring and key to use.

CMEK system tests are also, literally, just a copy/paste of the existing system tests with the kms_key_name argument added at cluster creation time. There's probably a better way that doesn't replicate so much code. But maybe that's fine.

I need to flesh out a wrapper class, still, for the Status PB that is the value for EncryptionInfo.encryption_status. ATM, it just returns the raw PB.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kolea2
kolea2 marked this pull request as draft March 18, 2021 03:33
Chris Rossi added 10 commits March 18, 2021 12:28
Chris Rossi
Wrap Status.
1f3bc49
Chris Rossi
Wrapper for Status, reorganize to avoid circular imports.
ea5dde1
Chris Rossi
Blacken.
47b84b6
Chris Rossi
Make system tests in charge of their own key.
20c8ba7
Chris Rossi
Consolidate system tests. Get KMS_KEY_NAME from user's environment.
df7bdc5
Chris Rossi
Fix test.
2e31436
Chris Rossi
Lint.
cf0176e
Chris Rossi
Put system tests where nox is expecting to find them.
6601e03
Chris Rossi
Test backup with CMEK.
76e1651
Chris Rossi
Differentiate instance and cluster names for cmek test, so tests aren…
731efdd
…'t stepping on each other's toes. Remove bogus backup with cmek test.
kolea2
kolea2 reviewed Mar 29, 2021
View reviewed changes
Comment thread google/cloud/bigtable/cluster.py
self.location_id = cluster_pb.location.split("/")[-1]
self.serve_nodes = cluster_pb.serve_nodes
self.default_storage_type = cluster_pb.default_storage_type
if cluster_pb.encryption_config:

@kolea2 kolea2 Mar 29, 2021

Copy link
Copy Markdown
Contributor

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.

what does this default to if this condition is not met?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@chrisrossi chrisrossi Apr 7, 2021

Copy link
Copy Markdown
Contributor Author

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.

Oops. If it's being called from the constructor, it will be None, but we can't assume that can we? I'll add an else here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@chrisrossi chrisrossi Apr 7, 2021

Copy link
Copy Markdown
Contributor Author

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.

f1aae9d

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@kolea2 kolea2 Apr 9, 2021

Copy link
Copy Markdown
Contributor

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.

oh sorry missed that, makes sense thanks!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@chrisrossi chrisrossi Apr 9, 2021

Copy link
Copy Markdown
Contributor Author

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.

Actually, you correctly pointed out a logical error, which I corrected. Thank you!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread google/cloud/bigtable/encryption.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google/cloud/bigtable/error.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google/cloud/bigtable/cluster.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@chrisrossi chrisrossi removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Apr 6, 2021
@chrisrossi
chrisrossi marked this pull request as ready for review April 6, 2021 20:48
@chrisrossi
chrisrossi marked this pull request as draft April 6, 2021 20:49
Chris Rossi added 2 commits April 7, 2021 13:46
Chris Rossi
rename encryption.py to encryption_info.py
090080e
Chris Rossi
make sure kms_key_name is set to None if encryption_info is not
f1aae9d
PB.
@chrisrossi
chrisrossi marked this pull request as ready for review April 13, 2021 20:23
kolea2
kolea2 reviewed Apr 14, 2021
View reviewed changes

@kolea2 kolea2 left a comment

Copy link
Copy Markdown
Contributor

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.

Looking good with two small comments. Will also ask @crwilcox to take a quick look

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread google/cloud/bigtable/error.py Outdated

Values are defined in ``google.rpc.code_pb2.Code``.

See: `googe.rpc.Code

@kolea2 kolea2 Apr 14, 2021

Copy link
Copy Markdown
Contributor

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.

nit: typo "google"

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@chrisrossi chrisrossi Apr 15, 2021

Copy link
Copy Markdown
Contributor Author

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.

e7a45ee

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread tests/unit/test_table.py Outdated
cluster_states={
"cluster-id1": _ClusterStateEncryptionInfoPB(
encryption_type=ENCRYPTION_TYPE_UNSPECIFIED,
encryption_status=_StatusPB(Code.OK, "beats me"),

@kolea2 kolea2 Apr 14, 2021

Copy link
Copy Markdown
Contributor

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.

😄 , we may want to make these a little more realistic - something like "status ok"

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@chrisrossi chrisrossi Apr 15, 2021

Copy link
Copy Markdown
Contributor Author

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.

e7a45ee

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Chris Rossi
Fix typo. Use more realistic looking test strings.
e7a45ee
kolea2
kolea2 approved these changes Apr 15, 2021
View reviewed changes

@kolea2 kolea2 left a comment

Copy link
Copy Markdown
Contributor

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, will merge after @crwilcox takes a look. Thank you!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
crwilcox
crwilcox approved these changes Apr 19, 2021
View reviewed changes
@kolea2
kolea2 merged commit 93df829 into googleapis:master Apr 19, 2021
gcf-merge-on-green Bot pushed a commit that referenced this pull request Apr 21, 2021
@release-please
chore: release 2.1.0 (#294)
be17038
🤖 I have created a release \*beep\* \*boop\*
---
## [2.1.0](https://www.github.com/googleapis/python-bigtable/compare/v2.0.0...v2.1.0) (2021-04-21)


### Features

* customer managed keys (CMEK) ([#249](https://www.github.com/googleapis/python-bigtable/issues/249)) ([93df829](https://www.github.com/googleapis/python-bigtable/commit/93df82998cc0218cbc4a1bc2ab41a48b7478758d))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

2 more reviewers
@crwilcox crwilcox crwilcox approved these changes
@kolea2 kolea2 kolea2 approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

api: bigtable Issues related to the googleapis/python-bigtable API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Add CMEK support to Bigtable

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@chrisrossi @crwilcox @kolea2
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.