etcd/embed
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
..
config.go *: add a new option --enable-grpc-gateway for enabling/disabling grpc gateway 2019-01-23 03:26:34 +09:00
config_logging.go config: multiple logging fixes 2019-01-17 15:09:26 -05:00
config_logging_journal_unix.go *: update import paths to "go.etcd.io/etcd" 2018-08-28 17:47:55 -07:00
config_logging_journal_windows.go *: rename to "journal" 2018-05-16 14:38:27 -07:00
config_test.go embed: add test cases in TestAutoCompactionModeParse. 2019-01-02 17:08:15 +08:00
doc.go *: update import paths to "go.etcd.io/etcd" 2018-08-28 17:47:55 -07:00
etcd.go *: add a new option --enable-grpc-gateway for enabling/disabling grpc gateway 2019-01-23 03:26:34 +09:00
serve.go embed: requests for grpc gateway must have empty CN if --client-cert-auth is passed 2019-01-23 03:26:34 +09:00
serve_test.go *: update import paths to "go.etcd.io/etcd" 2018-08-28 17:47:55 -07:00
util.go *: update import paths to "go.etcd.io/etcd" 2018-08-28 17:47:55 -07:00