List of server listen addresses and corresponding TLS config are currently configured for:
The Kafka server
The HTTP API
The web console
Intra cluster traffic
Each one of these needs:
List of listen addresses
List of advertised listeners
TLS config
We should create a ListenerConfig struct and use that as type for configuring kafka server, http api etc, in conf.Config.
Advertised listeners is new. Advertised listeners is important for the case where, e.g. there's a proxy or some other routing between the address the server actually listens at and the address the client needs to connect at. (advertised listener being the address the client would try to connect to).
We will need to make sure the value of advertised listeners not the value of listeners is passed to the client for connecting.
E.g. for kafka advertised listeners, if specified those addresses should be sent to the client in the BrokerInfo.
For intra cluster advertised listeners those values should be used, if specified to make a remoting connection from one node to another.
For web console and http api advertised listeners would not be used as we do not send any addresses to the client.
We should also disallow wildcard addresses e.g. 0.0.0.0:8880 or :8880 being used for advertised listeners, or for listeners if no advertised listener is provided.
List of server listen addresses and corresponding TLS config are currently configured for:
Each one of these needs:
We should create a
ListenerConfig
struct and use that as type for configuring kafka server, http api etc, inconf.Config
.Advertised listeners is new. Advertised listeners is important for the case where, e.g. there's a proxy or some other routing between the address the server actually listens at and the address the client needs to connect at. (advertised listener being the address the client would try to connect to).
We will need to make sure the value of advertised listeners not the value of listeners is passed to the client for connecting.
E.g. for kafka advertised listeners, if specified those addresses should be sent to the client in the BrokerInfo.
For intra cluster advertised listeners those values should be used, if specified to make a remoting connection from one node to another.
For web console and http api advertised listeners would not be used as we do not send any addresses to the client.
We should also disallow wildcard addresses e.g.
0.0.0.0:8880
or:8880
being used for advertised listeners, or for listeners if no advertised listener is provided.