Skip to content

Commit

Permalink
Scrub Secret information in logGRPC()
Browse files Browse the repository at this point in the history
Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>
  • Loading branch information
jarrpa committed Dec 19, 2018
1 parent e28a6b4 commit de79c92
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (
_ "k8s.io/apimachinery/pkg/util/json"

"github.com/golang/glog"
"github.com/kubernetes-csi/csi-lib-utils/protosanitizer"

"github.com/kubernetes-incubator/external-storage/lib/controller"

Expand Down Expand Up @@ -122,9 +123,9 @@ var (
//TODO consolidate ane librarize
func logGRPC(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error {
glog.V(5).Infof("GRPC call: %s", method)
glog.V(5).Infof("GRPC request: %+v", req)
glog.V(5).Infof("GRPC request: %s", protosanitizer.StripSecretsCSI03(req))
err := invoker(ctx, method, req, reply, cc, opts...)
glog.V(5).Infof("GRPC response: %+v", reply)
glog.V(5).Infof("GRPC response: %s", protosanitizer.StripSecretsCSI03(reply))
glog.V(5).Infof("GRPC error: %v", err)
return err
}
Expand Down

0 comments on commit de79c92

Please sign in to comment.