diff --git a/rd-api-client/src/main/java/org/rundeck/client/RundeckClient.java b/rd-api-client/src/main/java/org/rundeck/client/RundeckClient.java index 43920cc3..c8af0ba7 100644 --- a/rd-api-client/src/main/java/org/rundeck/client/RundeckClient.java +++ b/rd-api-client/src/main/java/org/rundeck/client/RundeckClient.java @@ -47,6 +47,7 @@ public class RundeckClient { public static final Pattern API_VERS_PATTERN = Pattern.compile("^(.*)(/api/(\\d+)/?)$"); public static final String ENV_BYPASS_URL = "RD_BYPASS_URL"; public static final String ENV_INSECURE_SSL = "RD_INSECURE_SSL"; + public static final String ENV_INSECURE_SSL_NO_WARN = "RD_INSECURE_SSL_NO_WARN"; public static final String ENV_INSECURE_SSL_HOSTNAME = "RD_INSECURE_SSL_HOSTNAME"; public static final String ENV_ALT_SSL_HOSTNAME = "RD_ALT_SSL_HOSTNAME"; public static final String ENV_HTTP_TIMEOUT = "RD_HTTP_TIMEOUT"; diff --git a/src/main/java/org/rundeck/client/tool/Main.java b/src/main/java/org/rundeck/client/tool/Main.java index 6106ce13..aab5c941 100644 --- a/src/main/java/org/rundeck/client/tool/Main.java +++ b/src/main/java/org/rundeck/client/tool/Main.java @@ -41,6 +41,7 @@ import java.util.function.Function; import static org.rundeck.client.RundeckClient.ENV_INSECURE_SSL; +import static org.rundeck.client.RundeckClient.ENV_INSECURE_SSL_NO_WARN; /** @@ -194,7 +195,8 @@ public static Tool tool(final Rd rd) { "rundeck.client.insecure.ssl", System.getenv(ENV_INSECURE_SSL) )); - if (insecureSsl) { + boolean insecureSslNoWarn = Boolean.parseBoolean(System.getenv(ENV_INSECURE_SSL_NO_WARN)); + if (insecureSsl && !insecureSslNoWarn ) { belt.finalOutput().warning( "# WARNING: RD_INSECURE_SSL=true, no hostname or certificate trust verification will be performed"); }