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

etcdserver: not print password in the warning message of expensive request #9661

Merged
merged 1 commit into from
May 1, 2018

Conversation

gyuho
Copy link
Contributor

@gyuho gyuho commented Apr 30, 2018

Fix #9635
Replace #9636

ETCDCTL_API=3 ./bin/etcdctl put foo bar
ETCDCTL_API=3 ./bin/etcdctl role add root
ETCDCTL_API=3 ./bin/etcdctl role grant-permission root readwrite foo
ETCDCTL_API=3 ./bin/etcdctl role get root
ETCDCTL_API=3 ./bin/etcdctl --interactive=false user add root:123

{"level":"warn","ts":1525111903.8282323,"caller":"etcdserver/util.go:116","msg":"request took too long","took":0.000198305,"expected-duration":0.1,"prefix":"","request":"header:<ID:7587829900858626564 > put:<key:\"foo\" value:\"bar\" > "}
{"level":"info","ts":1525111943.2119756,"caller":"auth/store.go:788","msg":"created a role","role-name":"root"}
{"level":"warn","ts":1525111943.212163,"caller":"etcdserver/util.go:116","msg":"request took too long","took":0.000222896,"expected-duration":0.1,"prefix":"","request":"header:<ID:7587829900858626565 > auth_role_add:<name:\"root\" > "}
{"level":"info","ts":1525111943.2332838,"caller":"auth/store.go:851","msg":"granted/updated a permission to a user","user-name":"root","permission-name":"READWRITE"}
{"level":"warn","ts":1525111943.2333753,"caller":"etcdserver/util.go:116","msg":"request took too long","took":0.000084734,"expected-duration":0.1,"prefix":"","request":"header:<ID:7587829900858626566 > auth_role_grant_permission:<name:\"root\" perm:<permType:READWRITE key:\"foo\" > > "}
{"level":"warn","ts":1525111943.2436109,"caller":"etcdserver/util.go:116","msg":"request took too long","took":0.000016087,"expected-duration":0.1,"prefix":"","request":"header:<ID:7587829900858626567 > auth_role_get:<role:\"root\" > "}
{"level":"info","ts":1525111943.31909,"caller":"auth/store.go:407","msg":"added a user","user-name":"root"}
{"level":"warn","ts":1525111943.3191411,"caller":"etcdserver/util.go:116","msg":"request took too long","took":0.058392292,"expected-duration":0.1,"prefix":"","request":"header:<ID:7587829900858626568 > auth_user_add:<name:root>"}

@gyuho
Copy link
Contributor Author

gyuho commented Apr 30, 2018

@mitake

@gyuho gyuho requested a review from mitake April 30, 2018 18:17
@gyuho gyuho force-pushed the dont-log-password branch from 1740721 to a9225c1 Compare April 30, 2018 20:44
@codecov-io
Copy link

Codecov Report

Merging #9661 into master will decrease coverage by 0.11%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9661      +/-   ##
==========================================
- Coverage   68.77%   68.66%   -0.12%     
==========================================
  Files         373      373              
  Lines       34346    34346              
==========================================
- Hits        23621    23582      -39     
- Misses       8994     9030      +36     
- Partials     1731     1734       +3
Impacted Files Coverage Δ
etcdserver/v3_server.go 75.35% <ø> (ø) ⬆️
etcdserver/apply.go 88.01% <100%> (ø) ⬆️
etcdctl/ctlv2/command/user_commands.go 41.95% <0%> (-13.99%) ⬇️
pkg/fileutil/purge.go 65.9% <0%> (-6.82%) ⬇️
pkg/netutil/netutil.go 63.11% <0%> (-6.56%) ⬇️
pkg/adt/interval_tree.go 87.98% <0%> (-4.51%) ⬇️
etcdserver/api/v3election/election.go 66.66% <0%> (-2.78%) ⬇️
raft/progress.go 94.17% <0%> (-1.95%) ⬇️
rafthttp/msgappv2_codec.go 69.56% <0%> (-1.74%) ⬇️
etcdserver/cluster_util.go 58.29% <0%> (-0.9%) ⬇️
... and 12 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b8e8d75...a9225c1. Read the comment docs.

Copy link
Contributor

@mitake mitake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gyuho lgtm, thanks for caring other RPCs!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

etcd prints password to logs
3 participants