Skip to content

Add bigtable authorizedview types, mappers, CRD and fuzzer #4026

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

Conversation

gemmahou
Copy link
Collaborator

Change description

Fixes #

Tests you have done

  • Run make ready-pr to ensure this PR is ready for review.
  • Perform necessary E2E testing for changed resources.

@yuwenma
Copy link
Collaborator

yuwenma commented Mar 14, 2025

Please fix the presubmit failure

@gemmahou gemmahou marked this pull request as ready for review March 17, 2025 22:44
@gemmahou gemmahou force-pushed the resource-bigtable-authorizedview branch from 9adf7cd to f85a2a2 Compare March 17, 2025 22:46
@gemmahou
Copy link
Collaborator Author

/assign @yuwenma
This is ready for review.

@gemmahou gemmahou force-pushed the resource-bigtable-authorizedview branch from f85a2a2 to 6afd3f3 Compare March 17, 2025 22:51
// Row prefixes to be included in the AuthorizedView.
// To provide access to all rows, include the empty string as a prefix ("").
// +kcc:proto:field=google.bigtable.admin.v2.AuthorizedView.SubsetView.row_prefixes
RowPrefixes [][]byte `json:"rowPrefixes,omitempty"`
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you confirm if this should be string or []byte? It seems to be very user unfriendly to use []byte

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is generated and the proto uses [][]byte.
Some thoughts here: 1) we do support []byte type in other resource. I guess it's fine to support a list of []byte as well. 2) the API doc, the field should be a "base64-encoded string of bytes". If change to string I'm afraid user would mistakenly configure this field as regular string, but we can always leverage the underlying API to validate values&process the request.

WDYT?

Copy link
Collaborator

Choose a reason for hiding this comment

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

It is very hard to configure [][]byte. This seems to be a bad API design if the purpose is for base64-encryption

@@ -312,6 +319,15 @@ func Visit(msgPath string, msg protoreflect.Message, setter func(v protoreflect.
visitor.VisitPrimitive(path+"[]", el, setter)
}

case protoreflect.BytesKind:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Defer to the question about if we should change []byte to string, we may not want this type extension

Copy link
Collaborator

@yuwenma yuwenma left a comment

Choose a reason for hiding this comment

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

/approve

One question to confirm, otherwise looks good

Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: yuwenma

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@yuwenma
Copy link
Collaborator

yuwenma commented Mar 19, 2025

/lgtm

please fix the merge conflict

@google-oss-prow google-oss-prow bot added lgtm and removed lgtm labels Mar 19, 2025
@gemmahou gemmahou force-pushed the resource-bigtable-authorizedview branch from 8a711cb to 00292f5 Compare March 20, 2025 20:38
@anhdle-sso
Copy link
Collaborator

/lgtm

@google-oss-prow google-oss-prow bot added the lgtm label Mar 21, 2025
@google-oss-prow google-oss-prow bot merged commit d8c0d86 into GoogleCloudPlatform:master Mar 21, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants