*: support creating a user without password

This commit adds a feature for creating a user without password. The
purpose of the feature is reducing attack surface by configuring bad
passwords (CN based auth will be allowed for the user).

The feature can be used with `--no-password` of `etcdctl user add`
command.

Fix https://github.com/coreos/etcd/issues/9590
This commit is contained in:
Hitoshi Mitake
2018-06-06 16:18:28 +09:00
committed by Hitoshi Mitake
parent dc6885d73f
commit 5a67dd788d
13 changed files with 651 additions and 350 deletions

View File

@@ -203,7 +203,7 @@ func appendNormalIRREnts(ents *[]raftpb.Entry) {
irrauthenticate := &etcdserverpb.InternalAuthenticateRequest{Name: "myname", Password: "password", SimpleToken: "token"}
irrauthuseradd := &etcdserverpb.AuthUserAddRequest{Name: "name1", Password: "pass1"}
irrauthuseradd := &etcdserverpb.AuthUserAddRequest{Name: "name1", Password: "pass1", Options: &authpb.UserAddOptions{NoPassword: false}}
irrauthuserdelete := &etcdserverpb.AuthUserDeleteRequest{Name: "name1"}