Enable basicauth by default, remove the option to supply it on the command line

This commit is contained in:
Lauri Kasanen
2021-03-25 11:25:30 +02:00
parent 93d3bf052d
commit 1632f4888d
9 changed files with 24 additions and 30 deletions

View File

@@ -339,9 +339,9 @@ are in the same file, use \fB-cert\fP.
Require SSL for websocket connections. Default off, non-SSL allowed.
.
.TP
.B \-basicAuth \fIuser:pass\fP
Username and password for websocket connections. Default empty, no authentication required.
If the password is empty, read it from the \fB-KasmPasswordFile\fP.
.B \-disableBasicAuth
Disable basic auth for websocket connections. Default enabled, details read from
the \fB-KasmPasswordFile\fP.
.
.TP
.B \-SecurityTypes \fIsec-types\fP

View File

@@ -89,7 +89,7 @@ rfb::IntParameter websocketPort("websocketPort", "websocket port to listen for",
rfb::StringParameter cert("cert", "SSL pem cert to use for websocket connections", "");
rfb::StringParameter certkey("key", "SSL pem key to use for websocket connections (if separate)", "");
rfb::BoolParameter sslonly("sslOnly", "Require SSL for websockets", false);
rfb::StringParameter basicauth("BasicAuth", "user:pass for HTTP basic auth for websockets", "");
rfb::BoolParameter disablebasicauth("DisableBasicAuth", "Disable basic auth for websockets", false);
rfb::StringParameter interface("interface",
"listen on the specified network address",
"all");
@@ -225,7 +225,7 @@ void vncExtensionInit(void)
if (!noWebsocket)
network::createWebsocketListeners(&listeners, websocketPort,
localhostOnly ? "local" : addr,
sslonly, cert, certkey, basicauth, httpDir);
sslonly, cert, certkey, disablebasicauth, httpDir);
else if (localhostOnly)
network::createLocalTcpListeners(&listeners, port);
else