c82b14b0c4
Introduce limits to prevent unauthorized users from exhausting all ephemeral ports on agents: * `{https,rpc}_handshake_timeout` * `{http,rpc}_max_conns_per_client` The handshake timeout closes connections that have not completed the TLS handshake by the deadline (5s by default). For RPC connections this timeout also separately applies to first byte being read so RPC connections with TLS enabled have `rpc_handshake_time * 2` as their deadline. The connection limit per client prevents a single remote TCP peer from exhausting all ephemeral ports. The default is 100, but can be lowered to a minimum of 26. Since streaming RPC connections create a new TCP connection (until MultiplexV2 is used), 20 connections are reserved for Raft and non-streaming RPCs to prevent connection exhaustion due to streaming RPCs. All limits are configurable and may be disabled by setting them to `0`. This also includes a fix that closes connections that attempt to create TLS RPC connections recursively. While only users with valid mTLS certificates could perform such an operation, it was added as a safeguard to prevent programming errors before they could cause resource exhaustion. |
||
---|---|---|
.. | ||
config | ||
batch_future.go | ||
batch_future_test.go | ||
bitmap.go | ||
bitmap_test.go | ||
devices.go | ||
devices_test.go | ||
diff.go | ||
diff_test.go | ||
errors.go | ||
errors_test.go | ||
funcs.go | ||
funcs_test.go | ||
generate.sh | ||
network.go | ||
network_test.go | ||
node.go | ||
node_class.go | ||
node_class_test.go | ||
node_test.go | ||
operator.go | ||
services.go | ||
services_test.go | ||
streaming_rpc.go | ||
structs.go | ||
structs_codegen.go | ||
structs_test.go | ||
testing.go | ||
volumes.go |