summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-03-05 17:52:29 +0100
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-03-07 09:34:01 +0100
commit56f5f380c3b3409eb5f14ac8dc5251d28aff63bb (patch)
tree550172b2c82e1573e3e1fa23bec12d702c6ff428
parentaf0e6f9bd5c817403dc27558fce73a11ee9dbc83 (diff)
downloadjustbuild-56f5f380c3b3409eb5f14ac8dc5251d28aff63bb.tar.gz
just: 'analyse' and 'describe' require client-side authentication
As these subcommands can access the serve endpoint, it is not enough anymore to just know the remote-execution endpoint, but one must also try to connect to it. Thus, the client-side authentication arguments need to be supported and read. The just.1 man page is also updated accordingly.
-rw-r--r--share/man/just.1.md6
-rw-r--r--src/buildtool/main/cli.cpp4
2 files changed, 7 insertions, 3 deletions
diff --git a/share/man/just.1.md b/share/man/just.1.md
index cafe80dc..0c72cb38 100644
--- a/share/man/just.1.md
+++ b/share/man/just.1.md
@@ -573,17 +573,17 @@ Only TLS and mutual TLS (mTLS) are supported.
**`--tls-ca-cert`** *`PATH`*
Path to a TLS CA certificate that is trusted to sign the server
certificate.
-Supported by: build|install-cas|install|rebuild|traverse|execute.
+Supported by: analyse|build|describe|install-cas|install|rebuild|traverse|execute.
**`--tls-client-cert`** *`PATH`*
Path to a TLS client certificate to enable mTLS. It must be passed in
conjunction with **`--tls-client-key`** and **`--tls-ca-cert`**.
-Supported by: build|install-cas|install|rebuild|traverse.
+Supported by: analyse|build|describe|install-cas|install|rebuild|traverse.
**`--tls-client-key`** *`PATH`*
Path to a TLS client key to enable mTLS. It must be passed in
conjunction with **`--tls-client-cert`** and **`--tls-ca-cert`**.
-Supported by: build|install-cas|install|rebuild|traverse.
+Supported by: analyse|build|describe|install-cas|install|rebuild|traverse.
**`analyse`** specific options
------------------------------
diff --git a/src/buildtool/main/cli.cpp b/src/buildtool/main/cli.cpp
index c4e51189..c5da32bb 100644
--- a/src/buildtool/main/cli.cpp
+++ b/src/buildtool/main/cli.cpp
@@ -28,6 +28,8 @@ auto SetupDescribeCommandArguments(
SetupAnalysisArguments(app, &clargs->analysis, false);
SetupLogArguments(app, &clargs->log);
SetupServeEndpointArguments(app, &clargs->serve);
+ SetupCommonAuthArguments(app, &clargs->auth);
+ SetupClientAuthArguments(app, &clargs->cauth);
SetupExecutionEndpointArguments(app, &clargs->endpoint);
SetupCompatibilityArguments(app);
SetupDescribeArguments(app, &clargs->describe);
@@ -44,6 +46,8 @@ auto SetupAnalyseCommandArguments(
SetupExecutionEndpointArguments(app, &clargs->endpoint);
SetupExecutionPropertiesArguments(app, &clargs->endpoint);
SetupServeEndpointArguments(app, &clargs->serve);
+ SetupCommonAuthArguments(app, &clargs->auth);
+ SetupClientAuthArguments(app, &clargs->cauth);
SetupDiagnosticArguments(app, &clargs->diagnose);
SetupCompatibilityArguments(app);
SetupRetryArguments(app, &clargs->retry);