You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG-3.4.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,6 +52,15 @@ See [code changes](https://github.com/coreos/etcd/compare/v3.3.0...v3.4.0) and [
52
52
- If not given, etcd queries `_etcd-server-ssl._tcp.[YOUR_HOST]` and `_etcd-server._tcp.[YOUR_HOST]`.
53
53
- If `--discovery-srv-name="foo"`, then query `_etcd-server-ssl-foo._tcp.[YOUR_HOST]` and `_etcd-server-foo._tcp.[YOUR_HOST]`.
54
54
- Useful for operating multiple etcd clusters under the same domain.
55
+
- Add [`--host-whitelist`](https://github.com/coreos/etcd/pull/9372) flag, [`etcdserver.Config.HostWhitelist`](https://github.com/coreos/etcd/pull/9372), and [`embed.Config.HostWhitelist`](https://github.com/coreos/etcd/pull/9372), to prevent ["DNS Rebinding"](https://en.wikipedia.org/wiki/DNS_rebinding) attack.
56
+
- Any website can simply create an authorized DNS name, and direct DNS to `"localhost"` (or any other address). Then, all HTTP endpoints of etcd server listening on `"localhost"` becomes accessible, thus vulnerable to [DNS rebinding attacks (CVE-2018-5702)](https://bugs.chromium.org/p/project-zero/issues/detail?id=1447#c2).
57
+
- Client origin enforce policy works as follow:
58
+
- If client connection is secure via HTTPS, allow any hostnames..
59
+
- If client connection is not secure and `"HostWhitelist"` is not empty, only allow HTTP requests whose Host field is listed in whitelist.
60
+
- By default, `"HostWhitelist"` is empty, which means insecure server allows all client HTTP requests.
61
+
- Note that the client origin policy is enforced whether authentication is enabled or not, for tighter controls.
62
+
- When specifying hostnames, loopback addresses are not added automatically. To allow loopback interfaces, add them to whitelist manually (e.g. `"localhost"`, `"127.0.0.1"`, etc.).
63
+
- e.g. `etcd --host-whitelist example.com`, then the server will reject all HTTP requests whose Host field is not `example.com` (also rejects requests to `"localhost"`).
55
64
- Define `embed.CompactorModePeriodic` for `compactor.ModePeriodic`.
56
65
- Define `embed.CompactorModeRevision` for `compactor.ModeRevision`.
Copy file name to clipboardExpand all lines: Documentation/op-guide/security.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -321,6 +321,19 @@ I | embed: serving client requests on 127.0.0.1:22379
321
321
I | embed: serving client requests on 127.0.0.1:2379
322
322
```
323
323
324
+
## Notes for Host Whitelist
325
+
326
+
`etcd --host-whitelist` flag specifies acceptable hostnames from HTTP client requests. Client origin policy protects against ["DNS Rebinding"](https://en.wikipedia.org/wiki/DNS_rebinding) attacks to insecure etcd servers. That is, any website can simply create an authorized DNS name, and direct DNS to `"localhost"` (or any other address). Then, all HTTP endpoints of etcd server listening on `"localhost"` becomes accessible, thus vulnerable to DNS rebinding attacks. See [CVE-2018-5702](https://bugs.chromium.org/p/project-zero/issues/detail?id=1447#c2) for more detail.
327
+
328
+
Client origin policy works as follows:
329
+
330
+
1. If client connection is secure via HTTPS, allow any hostnames.
331
+
2. If client connection is not secure and `"HostWhitelist"` is not empty, only allow HTTP requests whose Host field is listed in whitelist.
332
+
333
+
Note that the client origin policy is enforced whether authentication is enabled or not, for tighter controls.
334
+
335
+
By default, `etcd --host-whitelist` and `embed.Config.HostWhitelist` are set *empty* to allow all hostnames. Note that when specifying hostnames, loopback addresses are not added automatically. To allow loopback interfaces, add them to whitelist manually (e.g. `"localhost"`, `"127.0.0.1"`, etc.).
336
+
324
337
## Frequently asked questions
325
338
326
339
### I'm seeing a SSLv3 alert handshake failure when using TLS client authentication?
Copy file name to clipboardExpand all lines: etcdmain/config.go
+15-4Lines changed: 15 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -85,10 +85,11 @@ type config struct {
85
85
86
86
// configFlags has the set of flags used for command line parsing a Config
87
87
typeconfigFlagsstruct {
88
-
flagSet*flag.FlagSet
89
-
clusterState*flags.StringsFlag
90
-
fallback*flags.StringsFlag
91
-
proxy*flags.StringsFlag
88
+
flagSet*flag.FlagSet
89
+
hostWhiteliststring
90
+
clusterState*flags.StringsFlag
91
+
fallback*flags.StringsFlag
92
+
proxy*flags.StringsFlag
92
93
}
93
94
94
95
funcnewConfig() *config {
@@ -189,6 +190,7 @@ func newConfig() *config {
189
190
fs.BoolVar(&cfg.ec.PeerAutoTLS, "peer-auto-tls", false, "Peer TLS using generated certificates")
190
191
fs.StringVar(&cfg.ec.PeerTLSInfo.CRLFile, "peer-crl-file", "", "Path to the peer certificate revocation list file.")
191
192
fs.StringVar(&cfg.ec.PeerTLSInfo.AllowedCN, "peer-cert-allowed-cn", "", "Allowed CN for inter peer authentication.")
193
+
fs.StringVar(&cfg.cf.hostWhitelist, "host-whitelist", "", "Comma-separated acceptable hostnames from HTTP client requests, if server is not secure (empty means allow all).")
192
194
193
195
// logging
194
196
fs.BoolVar(&cfg.ec.Debug, "debug", false, "Enable debug-level logging for etcd.")
0 commit comments