mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Management framework: add TLS options for controller's websocket server
This commit is contained in:
parent
273abf3d08
commit
b014e8e56e
2 changed files with 10 additions and 1 deletions
|
@ -61,6 +61,14 @@ export {
|
||||||
## for websocket clients.
|
## for websocket clients.
|
||||||
const default_port_websocket = 2149/tcp &redef;
|
const default_port_websocket = 2149/tcp &redef;
|
||||||
|
|
||||||
|
## TLS options for the controller's WebSocket server. The default is
|
||||||
|
## to operate unencrypted. To replicate Broker's default encryption
|
||||||
|
## without endpoint validation, set the
|
||||||
|
## :zeek:field:`Cluster::WebSocketTLSOptions$ca_file` field to
|
||||||
|
## "NONE" and :zeek:field:`Cluster::WebSocketTLSOptions$ciphers` to
|
||||||
|
## "AECDH-AES256-SHA@SECLEVEL=0:AECDH-AES256-SHA:P-384".
|
||||||
|
const tls_options_websocket = Cluster::WebSocketTLSOptions() &redef;
|
||||||
|
|
||||||
## Whether the controller should auto-assign Broker listening ports to
|
## Whether the controller should auto-assign Broker listening ports to
|
||||||
## cluster nodes that need them and don't have them explicitly specified
|
## cluster nodes that need them and don't have them explicitly specified
|
||||||
## in cluster configurations.
|
## in cluster configurations.
|
||||||
|
|
|
@ -1646,7 +1646,8 @@ event zeek_init()
|
||||||
if ( cni$bound_port != 0/unknown )
|
if ( cni$bound_port != 0/unknown )
|
||||||
{
|
{
|
||||||
local ws_opts = Cluster::WebSocketServerOptions($listen_addr=to_addr(cni$address),
|
local ws_opts = Cluster::WebSocketServerOptions($listen_addr=to_addr(cni$address),
|
||||||
$listen_port=cni$bound_port);
|
$listen_port=cni$bound_port,
|
||||||
|
$tls_options=Management::Controller::tls_options_websocket);
|
||||||
Cluster::listen_websocket(ws_opts);
|
Cluster::listen_websocket(ws_opts);
|
||||||
websocket_info = fmt("websocket port %s:%s", cni$address, cni$bound_port);
|
websocket_info = fmt("websocket port %s:%s", cni$address, cni$bound_port);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue