-
Notifications
You must be signed in to change notification settings - Fork 808
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 #2037
Sanitize CSI RPC request logs #2037
Conversation
Code Coverage Diff
|
262d24d
to
a54205c
Compare
/retest |
a54205c
to
8ba608d
Compare
Manually tested by following these steps:
With this change, the secret is not logged. |
8ba608d
to
49ed6ea
Compare
Signed-off-by: torredil <[email protected]>
49ed6ea
to
528276f
Compare
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ConnorJC3 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 |
Is this a bug fix or adding new feature?
Security enhancement
What is this PR about? / Why do we need it?
The EBS CSI Driver does not support Token Requests , however - out of an abundance of caution - this PR addresses the potential vulnerability of sensitive information being logged inadvertently.
The main change is adding a new utility function
SanitizeRequest
that takes a request object and returns a copy of the request with the "Secrets" field cleared. This function creates a new instance of the same type as the input request, copies all the fields from the original request to the new instance, and sets the "Secrets" field to an empty map if it exists.What testing is done?
make verify && make test