9 Commits

Author SHA1 Message Date
Hitoshi Mitake
b2d2c79a2f etcdserver, auth: not cache a flag of auth status
This commit removes a flag that indicates auth is enabled or disabled
because it doesn't have an invalidation mechanism.

Fixes https://github.com/coreos/etcd/issues/3601 and https://github.com/coreos/etcd/issues/3964
2016-01-26 11:46:25 +09:00
Jonathan Boulle
ee522025b3 etcdserver: restructure auth.Store and auth.User
This attempts to decouple password-related functions, which previously
existed both in the Store and User structs, by splitting them out into a
separate interface, PasswordStore.  This means that they can be more
easily swapped out during testing.

This also changes the relevant tests to use mock password functions
instead of the bcrypt-backed implementations; as a result, the tests are
much faster.

Before:
```
	github.com/coreos/etcd/etcdserver/auth		31.495s
	github.com/coreos/etcd/etcdserver/etcdhttp	91.205s
```

After:
```
	github.com/coreos/etcd/etcdserver/auth		1.207s
	github.com/coreos/etcd/etcdserver/etcdhttp	1.207s
```
2015-10-30 16:33:40 -07:00
Xiang Li
044b23c3ca Merge pull request #3356 from xiang90/travis
*: test gofmt with -s and fix reported issues
2015-08-21 18:59:51 -07:00
Xiang Li
6b23a8131f *: test gofmt with -s and fix reported issues 2015-08-21 18:52:16 -07:00
Xiang Li
11a689d063 etcdserver/auth: cache auth enable result 2015-08-20 23:05:00 -07:00
Barak Michener
dd1a8fe330 etcdhttp: Improve test coverage surrounding auth 2015-07-30 14:21:08 -04:00
Barak Michener
39c10d1fe4 auth: improve test coverage 2015-06-25 14:25:08 -04:00
Xiang Li
c39aad0e92 etcdserver: use correct http status code for auth error 2015-06-22 09:28:47 -07:00
Barak Michener
64ec8af91b *: Rename security to auth 2015-06-15 18:18:50 -04:00