etcd/CHANGELOG-3.4.md

15 KiB

v3.4.0 (TBD 2018-05-01)

See code changes and v3.4 upgrade guide for any breaking changes.

Improved

Breaking Changes

Dependency

Metrics, Monitoring

Security, Authentication

See security doc for more details.

  • Add etcd --host-whitelist flag, etcdserver.Config.HostWhitelist, and embed.Config.HostWhitelist, to prevent "DNS Rebinding" attack.
    • 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).
    • Client origin enforce policy works as follow:
      • If client connection is secure via HTTPS, allow any hostnames..
      • If client connection is not secure and "HostWhitelist" is not empty, only allow HTTP requests whose Host field is listed in whitelist.
    • By default, "HostWhitelist" is empty, which means insecure server allows all client HTTP requests.
    • Note that the client origin policy is enforced whether authentication is enabled or not, for tighter controls.
    • 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.).
    • 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").
  • TODO: Support TLS cipher suite lists.
  • Support ttl field for etcd Authentication JWT token.
    • e.g. etcd --auth-token jwt,pub-key=<pub key path>,priv-key=<priv key path>,sign-method=<sign method>,ttl=5m.
  • Allow empty token provider in etcdserver.ServerConfig.AuthToken.

Added: etcd

  • Add --pre-vote flag to enable to run an additional Raft election phase.
    • For instance, a flaky(or rejoining) member may drop in and out, and start campaign. This member will end up with a higher term, and ignore all incoming messages with lower term. In this case, a new leader eventually need to get elected, thus disruptive to cluster availability. Raft implements Pre-Vote phase to prevent this kind of disruptions. If enabled, Raft runs an additional phase of election to check if pre-candidate can get enough votes to win an election.
    • --pre-vote=false by default.
    • v3.5 will enable --pre-vote=true by default.
  • TODO: --initial-corrupt-check flag is now stable (--experimental-initial-corrupt-check is deprecated).
    • --initial-corrupt-check=true by default, to check cluster database hashes before serving client/peer traffic.
  • TODO: --corrupt-check-time flag is now stable (--experimental-corrupt-check-time is deprecated).
    • --corrupt-check-time=12h by default, to check cluster database hashes for every 12-hour.
  • TODO: --enable-v2v3 flag is now stable (--experimental-enable-v2v3 is deprecated).
    • --enable-v2=true --enable-v2v3='' by default, to enable v2 API server that is backed by v2 store.
    • --enable-v2=true --enable-v2v3=/aaa to enable v2 API server that is backed by v3 storage.
    • --enable-v2=false --enable-v2v3='' to disable v2 API server.
    • --enable-v2=false --enable-v2v3=/aaa to disable v2 API server. TODO: error?
    • v4.0 will configure --enable-v2=true --enable-v2v3=/aaa to enable v2 API server that is backed by v3 storage.
  • Add --discovery-srv-name flag to support custom DNS SRV name with discovery.
    • If not given, etcd queries _etcd-server-ssl._tcp.[YOUR_HOST] and _etcd-server._tcp.[YOUR_HOST].
    • If --discovery-srv-name="foo", then query _etcd-server-ssl-foo._tcp.[YOUR_HOST] and _etcd-server-foo._tcp.[YOUR_HOST].
    • Useful for operating multiple etcd clusters under the same domain.

Added: embed

Added: API

Added: v3 etcdctl

Added: gRPC gateway

Package raft

Fixed: v3

  • Fix mvcc "unsynced" watcher restore operation.
    • "unsynced" watcher is watcher that needs to be in sync with events that have happened.
    • That is, "unsynced" watcher is the slow watcher that was requested on old revision.
    • "unsynced" watcher restore operation was not correctly populating its underlying watcher group.
    • Which possibly causes missing events from "unsynced" watchers.
  • Fix server panic on invalid Election Proclaim/Resign HTTP(S) requests.
    • Previously, wrong-formatted HTTP requests to Election API could trigger panic in etcd server.
    • e.g. curl -L http://localhost:2379/v3/election/proclaim -X POST -d '{"value":""}', curl -L http://localhost:2379/v3/election/resign -X POST -d '{"value":""}'.
  • Fix revision-based compaction retention parsing.
    • Previously, etcd --auto-compaction-mode revision --auto-compaction-retention 1 was translated to revision retention 3600000000000.
    • Now, etcd --auto-compaction-mode revision --auto-compaction-retention 1 is correctly parsed as revision retention 1.
  • TODO: Fix compaction interval calculation.
    • Previously, --auto-compaction-mode=periodic --auto-compaction-retention=10h automatically Compact on latest revision at first 10-hour and every 1-hour, whether it succeeds or not.
    • Now, it correctly reset its interval when Compact operation succeeds.
    • The failed Compact operation will still be retried in 1/10 of interval.
    • e.g. 10h compact interval will be retried in 1-hour on failure.
    • Document...
  • Prevent overflow by large TTL values for Lease Grant.
    • TTL parameter to Grant request is unit of second.
    • Leases with too large TTL values exceeding math.MaxInt64 expire in unexpected ways.
    • Server now returns rpctypes.ErrLeaseTTLTooLarge to client, when the requested TTL is larger than 9,000,000,000 seconds (which is >285 years).
    • Again, etcd Lease is meant for short-periodic keepalives or sessions, in the range of seconds or minutes. Not for hours or days!
  • Enable etcd server raft.Config.CheckQuorum when starting with ForceNewCluster.

Go

  • Require Go 1.10+.
  • Compile with Go 1.10.