mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
etcdserver: linearizable password checking at the API layer
For avoiding a schedule that can cause an inconsistent auth store [1], password checking must be done in a linearizable manner. Fixes https://github.com/coreos/etcd/issues/6675 and https://github.com/coreos/etcd/issues/6683 [1] https://github.com/coreos/etcd/issues/6675#issuecomment-255006389
This commit is contained in:
parent
136c02da71
commit
fdf433024f
@ -421,6 +421,11 @@ func (s *EtcdServer) AuthDisable(ctx context.Context, r *pb.AuthDisableRequest)
|
||||
func (s *EtcdServer) Authenticate(ctx context.Context, r *pb.AuthenticateRequest) (*pb.AuthenticateResponse, error) {
|
||||
var result *applyResult
|
||||
|
||||
err := s.linearizableReadNotify(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
for {
|
||||
checkedRevision, err := s.AuthStore().CheckPassword(r.Name, r.Password)
|
||||
if err != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user