summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArne Juul <arnej@yahooinc.com>2022-09-07 08:13:26 +0000
committerArne Juul <arnej@yahooinc.com>2022-09-07 09:59:42 +0000
commit38e8cb1cd699a50c14e5d3407cd9f197722cbdf7 (patch)
treede94d59588e289356a07f0c4ed551e9c1b0cd0dc
parent76b6d2dad060941eae3ba16d220444b8a0b13b98 (diff)
switch to script-utils for security-env
-rw-r--r--client/go/script-utils/main.go5
-rwxr-xr-xsecurity-tools/src/main/sh/vespa-curl-wrapper4
-rwxr-xr-xvespaclient/src/sh/vespa-get-cluster-state2
-rwxr-xr-xvespaclient/src/sh/vespa-get-node-state2
-rwxr-xr-xvespaclient/src/sh/vespa-set-node-state2
5 files changed, 9 insertions, 6 deletions
diff --git a/client/go/script-utils/main.go b/client/go/script-utils/main.go
index 7ab16a6f831..52f52356c69 100644
--- a/client/go/script-utils/main.go
+++ b/client/go/script-utils/main.go
@@ -27,6 +27,8 @@ func main() {
switch action {
case "export-env":
vespa.ExportDefaultEnvToSh()
+ case "security-env":
+ vespa.ExportSecurityEnvToSh()
case "ipv6-only":
if vespa.HasOnlyIpV6() {
os.Exit(0)
@@ -43,6 +45,7 @@ func main() {
cobra.Execute()
default:
fmt.Fprintf(os.Stderr, "unknown action '%s'\n", action)
- fmt.Fprintln(os.Stderr, "actions: export-env, ipv6-only, vespa-deploy, vespa-logfmt")
+ fmt.Fprintln(os.Stderr, "actions: export-env, ipv6-only, security-env")
+ fmt.Fprintln(os.Stderr, "(also: vespa-deploy, vespa-logfmt)")
}
}
diff --git a/security-tools/src/main/sh/vespa-curl-wrapper b/security-tools/src/main/sh/vespa-curl-wrapper
index 359a22bda20..a6327f3be92 100755
--- a/security-tools/src/main/sh/vespa-curl-wrapper
+++ b/security-tools/src/main/sh/vespa-curl-wrapper
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-# Uses vespa-security-env to call curl with paths to credentials.
+# Uses security-env to call curl with paths to credentials.
# This script should be installed in libexec only. It is not public api.
# BEGIN environment bootstrap section
@@ -79,7 +79,7 @@ findhost
set -e
-eval $($VESPA_HOME/bin/vespa-security-env)
+eval $($VESPA_HOME/libexec/vespa/script-utils security-env)
CURL_PARAMETERS=("$@")
diff --git a/vespaclient/src/sh/vespa-get-cluster-state b/vespaclient/src/sh/vespa-get-cluster-state
index 106254c6e3a..d6e451853de 100755
--- a/vespaclient/src/sh/vespa-get-cluster-state
+++ b/vespaclient/src/sh/vespa-get-cluster-state
@@ -74,6 +74,6 @@ findhost
# END environment bootstrap section
-eval $($VESPA_HOME/bin/vespa-security-env)
+eval $($VESPA_HOME/libexec/vespa/script-utils security-env)
exec $VESPA_HOME/libexec/vespa/GetClusterState.pl "$@"
diff --git a/vespaclient/src/sh/vespa-get-node-state b/vespaclient/src/sh/vespa-get-node-state
index b2b4bdbc864..4021aecf76c 100755
--- a/vespaclient/src/sh/vespa-get-node-state
+++ b/vespaclient/src/sh/vespa-get-node-state
@@ -74,6 +74,6 @@ findhost
# END environment bootstrap section
-eval $($VESPA_HOME/bin/vespa-security-env)
+eval $($VESPA_HOME/libexec/vespa/script-utils security-env)
exec $VESPA_HOME/libexec/vespa/GetNodeState.pl "$@"
diff --git a/vespaclient/src/sh/vespa-set-node-state b/vespaclient/src/sh/vespa-set-node-state
index a1e65984deb..0e19f6b0de0 100755
--- a/vespaclient/src/sh/vespa-set-node-state
+++ b/vespaclient/src/sh/vespa-set-node-state
@@ -74,6 +74,6 @@ findhost
# END environment bootstrap section
-eval $($VESPA_HOME/bin/vespa-security-env)
+eval $($VESPA_HOME/libexec/vespa/script-utils security-env)
exec $VESPA_HOME/libexec/vespa/SetNodeState.pl "$@"