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
feat: customer managed keys (CMEK) #249
Conversation
Implement customer managed keys (CMEK) feature. WIP. DO NOT MERGE.
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 I need to flesh out a wrapper class, still, for the |
…'t stepping on each other's toes. Remove bogus backup with cmek test.
@@ -145,6 +160,8 @@ def _update_from_pb(self, cluster_pb): | |||
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: |
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?
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.
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.
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!
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!
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
google/cloud/bigtable/error.py
Outdated
|
||
Values are defined in ``google.rpc.code_pb2.Code``. | ||
|
||
See: `googe.rpc.Code |
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"
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.
tests/unit/test_table.py
Outdated
cluster_states={ | ||
"cluster-id1": _ClusterStateEncryptionInfoPB( | ||
encryption_type=ENCRYPTION_TYPE_UNSPECIFIED, | ||
encryption_status=_StatusPB(Code.OK, "beats me"), |
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"
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.
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!
🤖 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).
Implement customer managed keys (CMEK) feature.
Closes #272