Gyuho Lee
a6b105a907
embed: use new "credentials" package
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-26 08:56:45 -07:00
Gyuho Lee
34bd797e67
*: revert module import paths
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-05-28 15:39:35 -07:00
shivaramr
9150bf52d6
go modules: Fix module path version to include version number
2019-04-26 15:29:50 -07:00
Hitoshi Mitake
11fb62ecb4
embed: requests for grpc gateway must have empty CN if --client-cert-auth is passed
...
This commit lets grpc gateway return a correct error to clients.
Even if a client has a cert with non empty CN, current gateway returns
an error like below:
```
$ curl --cacert ./integration/fixtures/ca.crt --cert ./integration/fixtures/server.crt --key ./integration/fixtures/server.key.insecure https://localhost:2379/v3/kv/put -X POST -d '{"key": "fromcurl", "value": "test"}'
{"error":"etcdserver: user name is empty","code":3}
```
This is because etcd ignores CN from gateway connection.
The error will be like this:
```
$ curl --cacert ./integration/fixtures/ca.crt --cert ./integration/fixtures/server.crt --key ./integration/fixtures/server.key.insecure https://localhost:2379/v3/kv/put -X POST -d '{"key": "fromcurl", "value": "test"}'
CommonName of client sending a request against gateway will be ignored and not used as expected
```
The error will be returned if the server is enabling auth and gRPC
gateway.
2019-01-23 03:26:34 +09:00
Hitoshi Mitake
72dd4a18c5
*: add a new option --enable-grpc-gateway for enabling/disabling grpc gateway
2019-01-23 03:26:34 +09:00
Gyuho Lee
c58f5cfeda
test: disable "unparam" for now
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-12-17 11:30:28 -08:00
Gyuho Lee
d37f1521b7
*: update import paths to "go.etcd.io/etcd"
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-08-28 17:47:55 -07:00
Gyuho Lee
1ebaeed5c1
embed: fix typo
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-25 11:15:47 -07:00
Gyuho Lee
b0112086d6
Merge pull request #9354 from hexfusion/u_sock
...
embed: explicitly define unix proto
2018-04-19 08:16:38 -07:00
Gyuho Lee
a47c18ff5b
embed: clean up initial server start logs
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-17 14:24:08 -07:00
Gyuho Lee
041b9069a2
*: configure server logger
...
- Add/Document "logger" to support structured logging.
- This makes functional tests run easier, since zap logger
provides built-in log redirect to files.
- "etcd --logger-option=zap" to enable structured logging.
- Current "capnslog" will still be used as "default".
- We may switch the default or deprecate "capnslog" in v3.5.
- Either way, will clearly be documented.
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-16 17:36:00 -07:00
Sam Batschelet
2e4f856389
embed: explicitly define unix network
2018-04-15 16:30:44 -04:00
Gyuho Lee
9ea8be0c2b
embed: support "CORS" handler in v3 HTTP requests
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-03-27 06:25:44 -07:00
Gyuho Lee
8edaecadc4
embed: enforce client origin policy
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-02-28 18:27:22 -08:00
Gyuho Lee
f6617feb8a
embed: rename "httpWrapper"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-02-28 11:15:10 -08:00
Gyuho Lee
c4fb5bdd23
embed: rename "v3alphaMutator" to "v3Mutator"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-02-27 14:31:32 -08:00
Sam Batschelet
488ee99ae8
*: replace grpc-gateway endpoint with stable /v3
2018-02-11 19:07:36 -05:00
Gyuho Lee
9744e1ee87
embed: stop *grpc.Server on *serveCtx serve error
...
If serve errors before *grpc.Server is sent to serversC,
it should be closed manually.
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2017-12-08 18:50:37 -08:00
Gyuho Lee
552b58dcfb
embed: only gracefully shutdown insecure grpc.Server
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2017-12-07 20:36:31 -08:00
James Phillips
e39915feec
embed: Avoid panic when shutting down gRPC Server
...
Avoid panic when stopping gRPC Server if TLS configuration is present.
Provided solution (attempts to) implement suggestion from gRPC team: https://github.com/grpc/grpc-go/issues/1384#issuecomment-317124531 .
Fixes #8916
2017-12-07 20:36:31 -08:00
Gyu-Ho Lee
c706c6e238
embed: mutate /v3alpha requests with /v3beta for backward compatibilities
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-15 02:14:04 -08:00
Gyu-Ho Lee
5fd419ff50
embed: replace v3alpha serve path with v3beta
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-11-15 01:55:49 -08:00
Iwasaki Yudai
37eabd770e
embed: support websocket for bi-directional streams
2017-10-05 16:08:18 -07:00
Gyu-Ho Lee
157c8eccf0
embed: define keepalive server options
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-09-28 11:19:29 -07:00
Gyu-Ho Lee
f65aee0759
*: replace 'golang.org/x/net/context' with 'context'
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-09-07 13:39:42 -07:00
Anthony Romano
35c5dcefc2
*: cockroachdb/cmux -> soheilhy/cmux
...
Has fixes not in fork. Includes SetReadTimeout.
2017-08-22 09:59:59 -07:00
Anthony Romano
63350f5ac1
embed: connect json gateway with user-provided listen address
...
net.Listener says its address is [::] when given 0.0.0.0, breaking
hosts that have ipv6 disabled.
Fixes #8151
Fixes #7961
2017-07-06 14:24:29 -07:00
Anthony Romano
87d16af2e2
embed: use transport TLS listener for client listener for CRLs
2017-06-19 15:23:41 -07:00
Anthony Romano
db7ab961bf
embed: share grpc connection for grpc json services
2017-05-22 12:59:13 -07:00
Gyu-Ho Lee
7d21d6c894
embed: gracefully close peer handlers on shutdown
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-05-06 07:47:23 -07:00
Anthony Romano
393e4335b7
*: put gateway stubs into their own packages
...
Fixes #7773
2017-04-19 13:09:06 -07:00
Gyu-Ho Lee
ba299bcaaf
embed: signal 'grpcServerC' before cmux serve
...
CMux.Serve blocks, so grpcServerC was never closed.
Fix https://github.com/coreos/etcdlabs/issues/216 .
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-04-18 17:49:50 -07:00
Gyu-Ho Lee
8aaa1ed911
*: use '*tls.Config.Clone' in Go 1.8
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-04-17 20:08:27 -07:00
Gyu-Ho Lee
c407e097e2
embed: gracefully shut down gRPC server
...
Fix https://github.com/coreos/etcd/issues/7322 .
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-04-17 14:12:40 -07:00
Anthony Romano
93594006df
embed: register grpc-gateway endpoints for v3lock and v3election
2017-04-10 15:21:07 -07:00
Anthony Romano
78422eaa17
embed: add Election service
2017-04-07 16:36:38 -07:00
Xiang
fd5984af56
*: add pprof flag to grpc proxy
2017-04-03 22:07:17 -07:00
fanmin shi
f292a4c953
embed: don't return error when closing on embed etcd
...
FIXES #7019
2017-03-17 13:41:05 -07:00
Anthony Romano
ad1a790116
embed: serve lock api
2017-03-13 15:23:26 -07:00
Anthony Romano
c4f1e64de7
embed: enable debug endpoint if Debug is set and add net.trace events
...
/debug/ was only being enabled for Pprof.
2017-02-27 11:34:58 -08:00
disksing
4374d944d4
embed: support user defined grpc services.
...
Fixes #7200
2017-01-22 18:21:19 +08:00
Vimal Kumar
f80914fba2
embed/etcd.go: make v2 endpoint optional. fixes #7100
2017-01-20 11:49:52 +05:30
Anthony Romano
cc931a2319
embed: deep copy user handlers
...
Shallow copy of user handlers leads to a nil map assignment when
enabling pprof. Since the map is being modified, it should probably
be deep copied into the server context, which fixes the crash.
2016-12-14 10:17:32 -08:00
Anthony Romano
2c06def8ca
etcdserver, embed, v2http: move pprof setup to embed
...
Seems like a better place for prof setup since it's not specific to v2.
2016-12-09 12:37:35 -08:00
siddontang
86de0797e1
embed: support registering user handlers
2016-07-28 13:39:06 +08:00
Gyu-Ho Lee
b2b98399fb
embed: change import path to 'grpc-ecosystem'
2016-07-15 12:10:38 -07:00
Anthony Romano
f4f33ea767
etcdmain, embed: export Config and StartEtcd into embed/
...
Lets programs embed etcd.
Fixes #5430
2016-07-13 10:40:03 -07:00