-
Notifications
You must be signed in to change notification settings - Fork 150
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
Clear the secrets from request for klog print in logGRPC()
#1462
base: master
Are you sure you want to change the base?
Clear the secrets from request for klog print in logGRPC()
#1462
Conversation
Welcome @mpatlasov! |
Hi @mpatlasov. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mpatlasov The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
pkg/gce-pd-csi-driver/utils.go
Outdated
klog.V(4).Infof("%s called with request: %s", info.FullMethod, req) | ||
// However malicious user still can put a secret in request as explained here: | ||
// https://github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver/issues/1372 | ||
if klog.V(4).Enabled() { |
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 regularly use log level 4 in production. Since this driver doesn't actually require any secret, can we just clear the secrets from the request?
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.
@msau42 , the request may be of different types, i.e. NodeExpandVolumeRequest
is not the only type with Secrets
(e.g. CreateVolumeRequest
, DeleteVolumeRequest
, etc.). I didn't find any straightforward way to clear the secrets from a request of arbitrary type, can you tell me how you suggest to do it?
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.
Do you think we can leverage the reflect package? https://pkg.go.dev/reflect#example-Value.FieldByName potentially looks promising. Or could we even use https://pkg.go.dev/reflect#StructTag to create a more efficient protosanitizer?
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 were some improvements in csi-lib-utils recently to sanitize better / faster: kubernetes-csi/csi-lib-utils#184
4eb6516
to
a618653
Compare
logGRPC()
logGRPC()
logGRPC()
logGRPC()
Last push reworks PR: instead of calling |
a618653
to
afd457a
Compare
Last push addressed Jan's comment:
|
/ok-to-test |
/lgtm |
@msau42 , can you |
Malicious user can put a secret in request as explained here: kubernetes-sigs#1372.
afd457a
to
49c6736
Compare
New changes are detected. LGTM label has been removed. |
/retest-required |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/reopen |
@mpatlasov: Reopened this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Hey @msau42 , can you lgtm/approve this, please. (see my comment above) |
Hey @msau42 , can you lgtm/approve this, please. (see my comment above) |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/reopen |
@mpatlasov: Reopened this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/test pull-gcp-compute-persistent-disk-csi-driver-verify |
pull-gcp-compute-persistent-disk-csi-driver-verify is permafailing: https://prow.k8s.io/job-history/gs/kubernetes-ci-logs/pr-logs/directory/pull-gcp-compute-persistent-disk-csi-driver-verify |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/reopen |
@mpatlasov: Reopened this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/retest-required |
Malicious user can put a secret in request as explained here: #1372.
What type of PR is this?
/kind bug
What this PR does / why we need it:
Malicious user can put a secret in request as explained here: #1372.
This PR simply clears the secrets from request.
Which issue(s) this PR fixes:
Fixes #1372
Does this PR introduce a user-facing change?: