aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt1
-rw-r--r--dist/vespa.spec1
-rw-r--r--pom.xml1
-rw-r--r--security-tools/CMakeLists.txt4
-rw-r--r--security-tools/OWNERS1
-rw-r--r--security-tools/README.md2
-rw-r--r--security-tools/pom.xml70
-rw-r--r--security-tools/src/main/java/com/yahoo/vespa/security/tool/securityenv/CliOptions.java69
-rw-r--r--security-tools/src/main/java/com/yahoo/vespa/security/tool/securityenv/Main.java89
-rw-r--r--security-tools/src/main/java/com/yahoo/vespa/security/tool/securityenv/OutputVariable.java31
-rw-r--r--security-tools/src/main/java/com/yahoo/vespa/security/tool/securityenv/UnixShell.java92
-rw-r--r--security-tools/src/test/java/com/yahoo/vespa/security/tool/securityenv/MainTest.java116
-rw-r--r--security-tools/src/test/resources/bash-output.txt5
-rw-r--r--security-tools/src/test/resources/csh-output.txt5
-rw-r--r--security-tools/src/test/resources/expected-help-output.txt13
-rw-r--r--security-tools/src/test/resources/no-security-output.txt5
-rw-r--r--vespaclient-java/CMakeLists.txt1
-rwxr-xr-xvespaclient-java/src/main/sh/vespa-curl-wrapper (renamed from security-tools/src/main/sh/vespa-curl-wrapper)0
18 files changed, 1 insertions, 505 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 56ec901a924..6cf91c10822 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -131,7 +131,6 @@ add_subdirectory(predicate-search)
add_subdirectory(searchcore)
add_subdirectory(searchlib)
add_subdirectory(searchsummary)
-add_subdirectory(security-tools)
add_subdirectory(security-utils)
add_subdirectory(service-monitor)
add_subdirectory(slobrok)
diff --git a/dist/vespa.spec b/dist/vespa.spec
index 895356e7425..a568c47f7f6 100644
--- a/dist/vespa.spec
+++ b/dist/vespa.spec
@@ -686,7 +686,6 @@ fi
%{_prefix}/jdk
%dir %{_prefix}/lib
%dir %{_prefix}/lib/jars
-%{_prefix}/lib/jars/security-tools-jar-with-dependencies.jar
%dir %{_prefix}/libexec
%dir %{_prefix}/libexec/vespa
%{_prefix}/libexec/vespa/common-env.sh
diff --git a/pom.xml b/pom.xml
index ee8223c001d..1f3f3968c42 100644
--- a/pom.xml
+++ b/pom.xml
@@ -112,7 +112,6 @@
<module>searchcore</module>
<module>searchlib</module>
<module>searchsummary</module>
- <module>security-tools</module>
<module>security-utils</module>
<module>service-monitor</module>
<module>socket_test</module>
diff --git a/security-tools/CMakeLists.txt b/security-tools/CMakeLists.txt
deleted file mode 100644
index cc85473f758..00000000000
--- a/security-tools/CMakeLists.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-install_jar(security-tools-jar-with-dependencies.jar)
-
-vespa_install_script(src/main/sh/vespa-curl-wrapper vespa-curl-wrapper libexec/vespa)
diff --git a/security-tools/OWNERS b/security-tools/OWNERS
deleted file mode 100644
index 569bf1cc3a1..00000000000
--- a/security-tools/OWNERS
+++ /dev/null
@@ -1 +0,0 @@
-bjorncs
diff --git a/security-tools/README.md b/security-tools/README.md
deleted file mode 100644
index a5267e88fc2..00000000000
--- a/security-tools/README.md
+++ /dev/null
@@ -1,2 +0,0 @@
-<!-- Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
-# security-tools
diff --git a/security-tools/pom.xml b/security-tools/pom.xml
deleted file mode 100644
index 2af6e09a84d..00000000000
--- a/security-tools/pom.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0"?>
-<!-- Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>com.yahoo.vespa</groupId>
- <artifactId>parent</artifactId>
- <version>8-SNAPSHOT</version>
- <relativePath>../parent/pom.xml</relativePath>
- </parent>
- <artifactId>security-tools</artifactId>
- <packaging>jar</packaging>
- <version>8-SNAPSHOT</version>
- <dependencies>
- <!-- compile scope -->
- <dependency>
- <groupId>com.yahoo.vespa</groupId>
- <artifactId>security-utils</artifactId>
- <version>${project.version}</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>commons-cli</groupId>
- <artifactId>commons-cli</artifactId>
- <scope>compile</scope>
- </dependency>
-
- <!-- test scope -->
- <dependency>
- <groupId>org.assertj</groupId>
- <artifactId>assertj-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.junit.jupiter</groupId>
- <artifactId>junit-jupiter-api</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.junit.jupiter</groupId>
- <artifactId>junit-jupiter-engine</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-shade-plugin</artifactId>
- <configuration>
- <finalName>${project.artifactId}-jar-with-dependencies</finalName>
- <createDependencyReducedPom>false</createDependencyReducedPom>
- </configuration>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>shade</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/security-tools/src/main/java/com/yahoo/vespa/security/tool/securityenv/CliOptions.java b/security-tools/src/main/java/com/yahoo/vespa/security/tool/securityenv/CliOptions.java
deleted file mode 100644
index 38c6483a184..00000000000
--- a/security-tools/src/main/java/com/yahoo/vespa/security/tool/securityenv/CliOptions.java
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.vespa.security.tool.securityenv;
-
-import com.yahoo.security.tls.TransportSecurityUtils;
-import org.apache.commons.cli.CommandLine;
-import org.apache.commons.cli.CommandLineParser;
-import org.apache.commons.cli.DefaultParser;
-import org.apache.commons.cli.HelpFormatter;
-import org.apache.commons.cli.Option;
-import org.apache.commons.cli.Options;
-import org.apache.commons.cli.ParseException;
-
-import java.io.PrintStream;
-import java.io.PrintWriter;
-import java.util.Arrays;
-
-import static java.util.stream.Collectors.joining;
-
-/**
- * Defines the program's command line parameters.
- *
- * @author bjorncs
- */
-class CliOptions {
- static final String SHELL_OPTION = "shell";
- static final String HELP_OPTION = "help";
-
- private static final Options OPTIONS = new Options()
- .addOption(
- Option.builder("s")
- .longOpt(SHELL_OPTION)
- .hasArg(true)
- .required(false)
- .desc(String.format("Shell type. Shell type is auto-detected if option not present. Valid values: %s.",
- Arrays.stream(UnixShell.values())
- .map(shell -> String.format("'%s'", shell.configName()))
- .collect(joining(", ", "[", "]"))))
- .build())
- .addOption(Option.builder("h")
- .longOpt(HELP_OPTION)
- .hasArg(false)
- .required(false)
- .desc("Show help")
- .build());
-
- static CommandLine parseCliArguments(String[] cliArgs) throws ParseException {
- CommandLineParser parser = new DefaultParser();
- return parser.parse(OPTIONS, cliArgs);
- }
-
- static void printHelp(PrintStream out) {
- HelpFormatter formatter = new HelpFormatter();
- PrintWriter writer = new PrintWriter(out);
- formatter.printHelp(
- writer,
- formatter.getWidth(),
- "vespa-security-env <options>",
- String.format("Generates shell commands that defines environments variables based on the content of %s.",
- TransportSecurityUtils.CONFIG_FILE_ENVIRONMENT_VARIABLE),
- OPTIONS,
- formatter.getLeftPadding(),
- formatter.getDescPadding(),
- String.format("The output may include the following variables:\n%s\n",
- Arrays.stream(OutputVariable.values())
- .map(variable -> String.format(" - '%s': %s", variable.variableName(), variable.description()))
- .collect(joining("\n"))));
- writer.flush();
- }
-}
diff --git a/security-tools/src/main/java/com/yahoo/vespa/security/tool/securityenv/Main.java b/security-tools/src/main/java/com/yahoo/vespa/security/tool/securityenv/Main.java
deleted file mode 100644
index 1dcff1d27ab..00000000000
--- a/security-tools/src/main/java/com/yahoo/vespa/security/tool/securityenv/Main.java
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.vespa.security.tool.securityenv;
-
-import com.yahoo.security.tls.MixedMode;
-import com.yahoo.security.tls.TransportSecurityOptions;
-import com.yahoo.security.tls.TransportSecurityUtils;
-import org.apache.commons.cli.CommandLine;
-import org.apache.commons.cli.ParseException;
-
-import java.io.PrintStream;
-import java.util.EnumSet;
-import java.util.Map;
-import java.util.Optional;
-import java.util.TreeMap;
-
-import static com.yahoo.vespa.security.tool.securityenv.CliOptions.HELP_OPTION;
-import static com.yahoo.vespa.security.tool.securityenv.CliOptions.SHELL_OPTION;
-
-/**
- * Implementation of the 'vespa-security-env' command line utility.
- *
- * @author bjorncs
- */
-public class Main {
-
- private final PrintStream stdOut;
- private final PrintStream stdError;
-
- Main(PrintStream stdOut, PrintStream stdError) {
- this.stdOut = stdOut;
- this.stdError = stdError;
- }
-
- public static void main(String[] args) {
- Main program = new Main(System.out, System.err);
- int statusCode = program.execute(args, System.getenv());
- System.exit(statusCode);
- }
-
- int execute(String[] cliArgs, Map<String, String> envVars) {
- boolean debugMode = envVars.containsKey("VESPA_DEBUG");
- try {
- CommandLine arguments = CliOptions.parseCliArguments(cliArgs);
- if (arguments.hasOption(HELP_OPTION)) {
- CliOptions.printHelp(stdOut);
- return 0;
- }
- UnixShell shell = arguments.hasOption(SHELL_OPTION)
- ? UnixShell.fromConfigName(arguments.getOptionValue(SHELL_OPTION))
- : UnixShell.detect(envVars.get("SHELL"));
-
- Map<OutputVariable, String> outputVariables = new TreeMap<>();
- Optional<TransportSecurityOptions> options = TransportSecurityUtils.getOptions(envVars);
- MixedMode mixedMode = TransportSecurityUtils.getInsecureMixedMode(envVars);
- if (options.isPresent() && mixedMode != MixedMode.PLAINTEXT_CLIENT_MIXED_SERVER) {
- outputVariables.put(OutputVariable.TLS_ENABLED, "1");
- if (options.get().isHostnameValidationDisabled()) {
- outputVariables.put(OutputVariable.DISABLE_HOSTNAME_VALIDATION, "1");
- }
- options.get().getCaCertificatesFile()
- .ifPresent(caCertFile -> outputVariables.put(OutputVariable.CA_CERTIFICATE, caCertFile.toString()));
- options.get().getCertificatesFile()
- .ifPresent(certificateFile -> outputVariables.put(OutputVariable.CERTIFICATE, certificateFile.toString()));
- options.get().getPrivateKeyFile()
- .ifPresent(privateKeyFile -> outputVariables.put(OutputVariable.PRIVATE_KEY, privateKeyFile.toString()));
- }
- shell.writeOutputVariables(stdOut, outputVariables);
- EnumSet<OutputVariable> unusedVariables = outputVariables.isEmpty()
- ? EnumSet.allOf(OutputVariable.class)
- : EnumSet.complementOf(EnumSet.copyOf(outputVariables.keySet()));
- shell.unsetVariables(stdOut, unusedVariables);
- return 0;
- } catch (ParseException e) {
- return handleException("Failed to parse command line arguments: " + e.getMessage(), e, debugMode);
- } catch (IllegalArgumentException e) {
- return handleException("Invalid command line arguments: " + e.getMessage(), e, debugMode);
- } catch (Exception e) {
- return handleException("Failed to generate security environment variables: " + e.getMessage(), e, debugMode);
- }
- }
-
- private int handleException(String message, Exception exception, boolean debugMode) {
- stdError.println(message);
- if (debugMode) {
- exception.printStackTrace(stdError);
- }
- return 1;
- }
-}
diff --git a/security-tools/src/main/java/com/yahoo/vespa/security/tool/securityenv/OutputVariable.java b/security-tools/src/main/java/com/yahoo/vespa/security/tool/securityenv/OutputVariable.java
deleted file mode 100644
index 0dc4b573e66..00000000000
--- a/security-tools/src/main/java/com/yahoo/vespa/security/tool/securityenv/OutputVariable.java
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.vespa.security.tool.securityenv;
-
-/**
- * Define the possible environment variables that the program may output.
- *
- * @author bjorncs
- */
-enum OutputVariable {
- TLS_ENABLED("VESPA_TLS_ENABLED", "Set to '1' if TLS is enabled in Vespa"),
- CA_CERTIFICATE("VESPA_TLS_CA_CERT", "Path to CA certificates file"),
- CERTIFICATE("VESPA_TLS_CERT", "Path to certificate file"),
- PRIVATE_KEY("VESPA_TLS_PRIVATE_KEY", "Path to private key file"),
- DISABLE_HOSTNAME_VALIDATION("VESPA_TLS_HOSTNAME_VALIDATION_DISABLED", "Set to '1' if TLS hostname validation is disabled");
-
- private final String variableName;
- private final String description;
-
- OutputVariable(String variableName, String description) {
- this.variableName = variableName;
- this.description = description;
- }
-
- String variableName() {
- return variableName;
- }
-
- String description() {
- return description;
- }
-}
diff --git a/security-tools/src/main/java/com/yahoo/vespa/security/tool/securityenv/UnixShell.java b/security-tools/src/main/java/com/yahoo/vespa/security/tool/securityenv/UnixShell.java
deleted file mode 100644
index e50c2420126..00000000000
--- a/security-tools/src/main/java/com/yahoo/vespa/security/tool/securityenv/UnixShell.java
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.vespa.security.tool.securityenv;
-
-import java.io.PrintStream;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * Definition of some unix shell variants and how to export environments variable for those supported.
- * The output format is inspired by ssh-agent's output.
- *
- * @author bjorncs
- */
-enum UnixShell {
- BOURNE("bourne", List.of("bash", "sh")) {
- @Override
- void writeOutputVariables(PrintStream out, Map<OutputVariable, String> variables) {
- variables.forEach((variable, value) -> {
- out.print(variable.variableName());
- out.print("=\"");
- out.print(value); // note: value is assumed to need no escaping
- out.print("\"; export ");
- out.print(variable.variableName());
- out.println(';');
- });
- }
- @Override
- void unsetVariables(PrintStream out, Set<OutputVariable> variables) {
- variables.forEach(variable -> {
- out.print("unset ");
- out.print(variable.variableName());
- out.println(';');
- });
- }
- },
- CSHELL("cshell", List.of("csh", "fish")) {
- @Override
- void writeOutputVariables(PrintStream out, Map<OutputVariable, String> variables) {
- variables.forEach((variable, value) -> {
- out.print("setenv ");
- out.print(variable.variableName());
- out.print(" \"");
- out.print(value); // note: value is assumed to need no escaping
- out.println("\";");
- });
- }
- @Override
- void unsetVariables(PrintStream out, Set<OutputVariable> variables) {
- variables.forEach(variable -> {
- out.print("unsetenv ");
- out.print(variable.variableName());
- out.println(';');
- });
- }
- };
-
- private static final UnixShell DEFAULT = BOURNE;
-
- private final String configName;
- private final List<String> knownShellBinaries;
-
- UnixShell(String configName, List<String> knownShellBinaries) {
- this.configName = configName;
- this.knownShellBinaries = knownShellBinaries;
- }
-
- abstract void writeOutputVariables(PrintStream out, Map<OutputVariable, String> variables);
- abstract void unsetVariables(PrintStream out, Set<OutputVariable> variables);
-
- String configName() {
- return configName;
- }
-
- static UnixShell fromConfigName(String configName) {
- return Arrays.stream(values())
- .filter(shell -> shell.configName.equals(configName))
- .findAny()
- .orElseThrow(() -> new IllegalArgumentException("Unknown shell: " + configName));
- }
-
- static UnixShell detect(String shellEnvVariable) {
- if (shellEnvVariable == null || shellEnvVariable.isEmpty()) return DEFAULT;
- int lastSlash = shellEnvVariable.lastIndexOf('/');
- String shellName = lastSlash != -1 ? shellEnvVariable.substring(lastSlash + 1) : shellEnvVariable;
- return Arrays.stream(values())
- .filter(shell -> shell.knownShellBinaries.contains(shellName))
- .findAny()
- .orElse(DEFAULT);
- }
-}
diff --git a/security-tools/src/test/java/com/yahoo/vespa/security/tool/securityenv/MainTest.java b/security-tools/src/test/java/com/yahoo/vespa/security/tool/securityenv/MainTest.java
deleted file mode 100644
index b1d263a1a82..00000000000
--- a/security-tools/src/test/java/com/yahoo/vespa/security/tool/securityenv/MainTest.java
+++ /dev/null
@@ -1,116 +0,0 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.vespa.security.tool.securityenv;
-
-import com.yahoo.security.tls.MixedMode;
-import com.yahoo.security.tls.TransportSecurityOptions;
-import com.yahoo.security.tls.TransportSecurityUtils;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.io.TempDir;
-
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.PrintStream;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.util.List;
-import java.util.Map;
-
-import static org.assertj.core.api.Assertions.assertThat;
-
-
-/**
- * @author bjorncs
- */
-public class MainTest {
-
- private final ByteArrayOutputStream stdOutBytes = new ByteArrayOutputStream();
- private final ByteArrayOutputStream stdErrBytes = new ByteArrayOutputStream();
- private final PrintStream stdOut = new PrintStream(stdOutBytes);
- private final PrintStream stdError = new PrintStream(stdErrBytes);
-
- @TempDir
- public File tmpFolder;
-
- @Test
- void prints_help_page_on_help_option() throws IOException {
- int exitCode = runMain(List.of("--help"), Map.of());
- assertThat(exitCode).isEqualTo(0);
- assertThat(stdOut()).isEqualTo(readTestResource("expected-help-output.txt"));
- }
-
- @Test
- void unsets_all_variables_when_no_security_config() throws IOException {
- int exitCode = runMain(List.of(), Map.of());
- assertThat(exitCode).isEqualTo(0);
- assertThat(stdErr()).isEmpty();
- assertThat(stdOut()).isEqualTo(readTestResource("no-security-output.txt"));
- }
-
- @Test
- void prints_security_variables_with_specified_shell() throws IOException {
- Path configFile = generateConfigFile();
- Map<String, String> env = Map.of(TransportSecurityUtils.CONFIG_FILE_ENVIRONMENT_VARIABLE, configFile.toString());
- int exitCode = runMain(List.of(), env);
- assertThat(exitCode).isEqualTo(0);
- assertThat(stdOut()).isEqualTo(readTestResource("bash-output.txt"));
- }
-
- @Test
- void prints_security_variables_with_auto_detected_shell() throws IOException {
- Path configFile = generateConfigFile();
- Map<String, String> env = Map.of(
- TransportSecurityUtils.CONFIG_FILE_ENVIRONMENT_VARIABLE, configFile.toString(),
- TransportSecurityUtils.INSECURE_MIXED_MODE_ENVIRONMENT_VARIABLE, MixedMode.TLS_CLIENT_MIXED_SERVER.configValue(),
- "SHELL", "/usr/local/bin/fish");
- int exitCode = runMain(List.of(), env);
- assertThat(exitCode).isEqualTo(0);
- assertThat(stdOut()).isEqualTo(readTestResource("csh-output.txt"));
- }
-
-
- @Test
- void prints_error_message_on_unknown_shell_name() {
- int exitCode = runMain(List.of("--shell", "invalid-shell-name"), Map.of());
- assertThat(exitCode).isEqualTo(1);
- assertThat(stdErr()).isEqualTo("Invalid command line arguments: Unknown shell: invalid-shell-name\n");
- }
-
- @Test
- void prints_error_message_on_unknown_command_line_parameter() {
- int exitCode = runMain(List.of("--unknown-parameter"), Map.of());
- assertThat(exitCode).isEqualTo(1);
- assertThat(stdErr()).isEqualTo("Failed to parse command line arguments: Unrecognized option: --unknown-parameter\n");
- }
-
- private int runMain(List<String> args, Map<String, String> env) {
- return new Main(stdOut, stdError).execute(args.toArray(new String[0]), env);
- }
-
- private String stdOut() {
- stdOut.flush();
- return stdOutBytes.toString();
- }
-
- private String stdErr() {
- stdError.flush();
- return stdErrBytes.toString();
- }
-
- private static String readTestResource(String fileName) throws IOException {
- return Files.readString(Paths.get(MainTest.class.getResource('/' + fileName).getFile()));
- }
-
- private Path generateConfigFile() throws IOException {
- TransportSecurityOptions options = new TransportSecurityOptions.Builder()
- .withCertificates(Paths.get("/path/to/certificate"), Paths.get("/path/to/key"))
- .withCaCertificates(Paths.get("/path/to/cacerts"))
- .withHostnameValidationDisabled(true)
- .build();
- Path configFile = File.createTempFile("junit", null, tmpFolder).toPath();
- options.toJsonFile(configFile);
- return configFile;
- }
-
-} \ No newline at end of file
diff --git a/security-tools/src/test/resources/bash-output.txt b/security-tools/src/test/resources/bash-output.txt
deleted file mode 100644
index 182dc177d42..00000000000
--- a/security-tools/src/test/resources/bash-output.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-VESPA_TLS_ENABLED="1"; export VESPA_TLS_ENABLED;
-VESPA_TLS_CA_CERT="/path/to/cacerts"; export VESPA_TLS_CA_CERT;
-VESPA_TLS_CERT="/path/to/certificate"; export VESPA_TLS_CERT;
-VESPA_TLS_PRIVATE_KEY="/path/to/key"; export VESPA_TLS_PRIVATE_KEY;
-VESPA_TLS_HOSTNAME_VALIDATION_DISABLED="1"; export VESPA_TLS_HOSTNAME_VALIDATION_DISABLED;
diff --git a/security-tools/src/test/resources/csh-output.txt b/security-tools/src/test/resources/csh-output.txt
deleted file mode 100644
index 2e6cd886c26..00000000000
--- a/security-tools/src/test/resources/csh-output.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-setenv VESPA_TLS_ENABLED "1";
-setenv VESPA_TLS_CA_CERT "/path/to/cacerts";
-setenv VESPA_TLS_CERT "/path/to/certificate";
-setenv VESPA_TLS_PRIVATE_KEY "/path/to/key";
-setenv VESPA_TLS_HOSTNAME_VALIDATION_DISABLED "1";
diff --git a/security-tools/src/test/resources/expected-help-output.txt b/security-tools/src/test/resources/expected-help-output.txt
deleted file mode 100644
index 33ad3b6d232..00000000000
--- a/security-tools/src/test/resources/expected-help-output.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-usage: vespa-security-env <options>
-Generates shell commands that defines environments variables based on the
-content of VESPA_TLS_CONFIG_FILE.
- -h,--help Show help
- -s,--shell <arg> Shell type. Shell type is auto-detected if option not
- present. Valid values: ['bourne', 'cshell'].
-The output may include the following variables:
- - 'VESPA_TLS_ENABLED': Set to '1' if TLS is enabled in Vespa
- - 'VESPA_TLS_CA_CERT': Path to CA certificates file
- - 'VESPA_TLS_CERT': Path to certificate file
- - 'VESPA_TLS_PRIVATE_KEY': Path to private key file
- - 'VESPA_TLS_HOSTNAME_VALIDATION_DISABLED': Set to '1' if TLS hostname
-validation is disabled
diff --git a/security-tools/src/test/resources/no-security-output.txt b/security-tools/src/test/resources/no-security-output.txt
deleted file mode 100644
index 257a2747ee2..00000000000
--- a/security-tools/src/test/resources/no-security-output.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-unset VESPA_TLS_ENABLED;
-unset VESPA_TLS_CA_CERT;
-unset VESPA_TLS_CERT;
-unset VESPA_TLS_PRIVATE_KEY;
-unset VESPA_TLS_HOSTNAME_VALIDATION_DISABLED;
diff --git a/vespaclient-java/CMakeLists.txt b/vespaclient-java/CMakeLists.txt
index 666e9633726..ebb792633bb 100644
--- a/vespaclient-java/CMakeLists.txt
+++ b/vespaclient-java/CMakeLists.txt
@@ -13,3 +13,4 @@ vespa_install_script(src/main/sh/vespa-visit.sh vespa-visit bin)
vespa_install_script(src/main/sh/vespa-visit-target.sh vespa-visit-target bin)
vespa_install_script(src/main/sh/vespa-feed-perf vespa-feed-perf bin)
vespa_install_script(src/main/sh/vespa-status-filedistribution.sh vespa-status-filedistribution bin)
+vespa_install_script(src/main/sh/vespa-curl-wrapper vespa-curl-wrapper libexec/vespa)
diff --git a/security-tools/src/main/sh/vespa-curl-wrapper b/vespaclient-java/src/main/sh/vespa-curl-wrapper
index 9381d6f898b..9381d6f898b 100755
--- a/security-tools/src/main/sh/vespa-curl-wrapper
+++ b/vespaclient-java/src/main/sh/vespa-curl-wrapper