Commit Graph

25 Commits (8e79fd85cb5b217d83d649ab4d08f2974647f808)

Author SHA1 Message Date
Barak Michener a4d1a5a6e5 *: Add security/auth support to etcdctl and etcd/client
add godep for speakeasy and auth entry parsing
add security_user to client
add role to client
add role commands
add auth support to etcdclient and etcdctl(member/user)
add enable/disable to etcdctl
better error messages, read/write/readwrite
Bump go-etcd to include codec changes, add new dependency
verify the error for revoke/add if nothing changed, remove security-merging prefix
2015-06-10 16:58:10 -04:00
Xiang Li 89f6f988cb Godeps: update logger pkg 2015-06-02 12:50:42 -07:00
Eric Paris af5286c63b Fix godeps to be usable
Godeps should allow me to do
  godep restore
  godep save -r ./...

But that doesn't work. Try it.

This requires update to the following packages:
github.com/prometheus/client_golang/
github.com/prometheus/procfs
github.com/matttproud/golang_protobuf_extensions/

There were 2 major problems.

1. godeps have code.google.com/p/goprotobuf but that repo doesn't exist
2. prometheus/client_golang/_vendor moved to other packages and godep
(with -r) can't handle it.

At the end of this we should be able to use godeps again without tons of
black magic.  uggh.  what a pain in the ass.

The black magic to actually get godeps back in shape was:

```bash
 # remove code.google.com/p/goprotobuf (doesn't exist)
 # remove all _vendor lines from prometheus (we still have other
 # prometheus lines so restore still works)
vi Godeps/Godeps.json

 # remove all the crazy vendoring crud because godep doesn't handle it
 # correctly
find . -name \*.go | xargs sed -i
's|github.com/coreos/etcd/Godeps/_workspace/src/||'

 # ok now, restore as best we can (everything except it wines about
 # goprotobuf
godep restore

 # now update the packages which were using the old (dead) goprotobuf
go get -u github.com/prometheus/client_golang/
go get -u github.com/matttproud/golang_protobuf_extensions/
 # update prometheus procfs because prometheus/client_golang/ has a
 # dependancy on this update
go get -u github.com/prometheus/procfs

 # get rid of Godeps directory entirely
git rm -rf Godeps

 # ok, now, rewrite the Godeps directory and redo the path rewrites
godep  save -r ./...

 # now put Godeps back into git
git add Godeps/

 # commit the new code
git commit -aA

 # And now, you can use godeps!
godep restore
godep save -r ./...
git diff
 # nothing!!
```
2015-05-31 23:52:16 -04:00
Barak Michener f6f7ef6b3a Godep: update go-etcd version 2015-05-28 14:02:14 -04:00
Xiang Li 49da7b6556 storage: add boltdb as dependency 2015-05-27 09:24:49 -07:00
Xiang Li 9d831e3075 *: godep btree 2015-05-14 17:59:55 -07:00
Xiang Li 6699107f61 *: add cluster version and cluster version detection.
Cluster version is the min major.minor of all members in
the etcd cluster. Cluster version is set to the min version
that a etcd member is compatible with when first bootstrapp.

During a rolling upgrades, the cluster version will be updated
automatically.

For example:

```
Cluster [a:1, b:1 ,c:1] -> clusterVersion 1

update a -> 2, b -> 2

after a detection

Cluster [a:2, b:2 ,c:1] -> clusterVersion 1, since c is still 1

update c -> 2

after a detection

Cluster [a:2, b:2 ,c:2] -> clusterVersion 2
```

The API/raft component can utilize clusterVersion to determine if
it can accept a client request or a raft RPC.

We choose polling rather than pushing since we want to use the same
logic for cluster version detection and (TODO) cluster version checking.

Before a member actually joins a etcd cluster, it should check the version
of the cluster. Push does not work since the other members cannot push
version info to it before it actually joins. Moreover, we do not want our
raft RPC system (which is doing the heartbeat pushing) to coordinate cluster version.
2015-04-29 11:31:59 -07:00
Barak Michener b369cf037a etcdmain: New Logging Package
use capnslog

Vendor capnslog and set the flags in etcd main

remove package prefix from etcdmain
2015-04-28 15:42:32 -04:00
Xiang Li 73adb20166 *: update context pkg 2015-03-30 18:58:44 -07:00
Xiang Li 05e240b892 *: update protobuf 2015-03-25 10:14:35 -07:00
Barak Michener 001efa0639 security: Implement RBAC security for etcd
stub out security

further wip

Last stub before CRUD for roles

Complete role merging

start tests

add Godep for golang.org/x/crypto/bcrypt

first round of comments

add tests, remove root addition (will be added back as part of creation)

Add security checks for /v2/machines and /v2/keys

Allow non-root to determine if security is enabled, get machine list.

Responding to comments, remove multiple verbs (like /v2/security/user/foo/password)

add some prefixes to the logging
2015-03-16 16:23:11 -04:00
Xiang Li a776064a8b etcdmain: fix godeps on osx 2015-02-28 11:16:41 -08:00
Xiang Li 7bf615aee0 *: drop old metrics pkg 2015-02-28 11:16:41 -08:00
Xiang Li fb1a28c65d *: vendor prometheus 2015-02-28 11:06:11 -08:00
Xiang Li 9b6fcfffb6 *: replace our own metrics with codahale/metrics 2015-02-28 10:11:53 -08:00
Yicheng Qin feaabde125 Godeps: bump golang.org/x/net/context to b8c11bbe 2015-02-28 10:09:55 -08:00
Xiang Li d65af21b73 raft: add raft test suite 2015-02-01 14:53:22 -08:00
Yicheng Qin dc863459f8 godeps: bump go-etcd to 6aa2da5 2014-12-30 20:12:48 -08:00
Brian Waldon da5538b8c7 dep: use vendored imports in codegangsta/cli 2014-11-20 10:19:13 -08:00
Brian Waldon 9a728a127a dep: bump golang.org/x/net/context
Move from code.google.com/p/go.net/context to
golang.org/x/net/context before bumping to latest.
2014-11-20 10:19:12 -08:00
Brian Waldon 48ec876af9 godep: bump github.com/codegangsta/cli 2014-10-31 12:21:00 -07:00
Brian Waldon 9f2a42bf7d godep: add deps for etcdctl 2014-10-22 17:52:40 -07:00
Jonathan Boulle e0801360d3 godep: update clockwork dependency 2014-10-17 10:05:29 -07:00
Jonathan Boulle 47c2421f7b godeps: add clockwork 2014-10-17 10:05:29 -07:00
Jonathan Boulle 4183b69e12 *: move from third_party to Godep 2014-10-14 00:37:52 -07:00