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

Sanitize CSI RPC request logs #1363

Merged
merged 1 commit into from
Jun 3, 2024

Conversation

mskanth972
Copy link
Contributor

@mskanth972 mskanth972 commented May 30, 2024

Is this a bug fix or adding new feature?
Security enhancement

What is this PR about? / Why do we need it?
This PR addresses the potential risk of sensitive information being inadvertently logged, despite the EFS CSI Driver not supporting Token Requests. The primary change involves introducing a new utility function called SanitizeRequest. This function accepts a request object and returns a duplicate with the "Secrets" field emptied. It achieves this by creating a new instance of the request object's type, copying all fields from the original request to the new instance, and resetting the "Secrets" field to an empty map, if present.

What testing is done?

  • make verify && make test
  • CI
  • manual testing

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 30, 2024
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 30, 2024
@mskanth972
Copy link
Contributor Author

/test pull-aws-efs-csi-driver-unit

@seanzatzdev-amazon
Copy link
Contributor

/lgtm

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mskanth972, seanzatzdev-amazon

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:
  • OWNERS [mskanth972,seanzatzdev-amazon]

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

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 3, 2024
@k8s-ci-robot k8s-ci-robot merged commit 640482e into kubernetes-sigs:master Jun 3, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants