mask password in mountOptions #37
Labels
help wanted
Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
kind/bug
Categorizes issue or PR as related to a bug.
What happened:
Currently csi driver node logs would print out
mountOptions
, while it may contain password, e.g.https://github.com/kubernetes-csi/csi-driver-smb/blob/master/deploy/example/logs/csi-smb-node.log#L40
Related code is here:
csi-driver-smb/pkg/smb/nodeserver.go
Lines 183 to 184 in 1afa2fa
What you expected to happen:
Use similar way here to only mask password by a common function, e.g.
MaskFieldValue(mountOptions, field string) string
, the output could be[dir_mode=0777 file_mode=0777 username=f8471372a68594910913ed4,password=*** vers=3.0
csi-driver-smb/pkg/smb/nodeserver.go
Lines 123 to 125 in 1afa2fa
How to reproduce it:
Anything else we need to know?:
Environment:
kubectl version
):uname -a
):The text was updated successfully, but these errors were encountered: