forked from etcd-io/etcd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Attempt to make Blockhole blocking on L7
Based on Fu Wei's idea, we employ blocking on L7 but without using external tools. The main idea is to read out `X-PeerURLs` from the header, since this is how peer traffic identifies itself to others. As we also know that all nodes will create direct connections with their peers, so the traffic blocking will actually happen at all nodes' proxies (contrary to the current design, where only the proxy of the peer is being blackholed. However, this way of blocking (by `X-PeerURLs` from the header) will miss certain types of traffic to certain endpoints, e.g. /members, /version, and /raft/probing. See below for the log extract, as its header doesn't contain X-PeerURLs information. - map[Accept-Encoding:[gzip] User-Agent:[Go-http-client/1.1]] /members - map[Accept-Encoding:[gzip] User-Agent:[Go-http-client/1.1]] /version - map[Accept-Encoding:[gzip] User-Agent:[Go-http-client/1.1]] /raft/probing In order to read out `X-PeerURLs` from the header, we need to terminate the SSL connection, as we can't drop cleartext traffic (ref [1]). Thus, a new option `e2e.WithSSLTerminationProxy(true)` is introduced, which will change the network flow into ``` A -- B's SSL termination proxy - B's transparent proxy - B ^ newly introduced ^ in the original codebase ``` This prototype doesn't address - blocking only RX or TX traffic - slowness when performing test cleanup , and the coding convention needs to be improved as it's still a PoC References: [1] etcd-io#15595
- Loading branch information
1 parent
f478b17
commit 5290dea
Showing
5 changed files
with
355 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.