From b329da94fac829722cea5d0696cb39f428da7037 Mon Sep 17 00:00:00 2001 From: Zhichun Wu Date: Sun, 28 Aug 2016 19:54:56 +0800 Subject: [PATCH] Add new option to force SSL communication between master and slave --- .../java/org/pentaho/di/cluster/SlaveServer.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/pentaho-kettle/src/main/java/org/pentaho/di/cluster/SlaveServer.java b/pentaho-kettle/src/main/java/org/pentaho/di/cluster/SlaveServer.java index 8d6244b..375b912 100644 --- a/pentaho-kettle/src/main/java/org/pentaho/di/cluster/SlaveServer.java +++ b/pentaho-kettle/src/main/java/org/pentaho/di/cluster/SlaveServer.java @@ -78,6 +78,8 @@ public class SlaveServer extends ChangedFlag implements Cloneable, SharedObjectI public static final int KETTLE_CARTE_RETRY_BACKOFF_INCREMENTS = getBackoffIncrements(); + public static final boolean KETTLE_FORCED_SSL = getForcedSsl(); + private static int getNumberOfSlaveServerRetries() { try { return Integer.parseInt(Const.NVL(System.getProperty("KETTLE_CARTE_RETRIES"), "0")); @@ -94,6 +96,18 @@ public static int getBackoffIncrements() { } } + public static boolean getForcedSsl() + { + try + { + return "Y".equalsIgnoreCase(System.getProperty("KETTLE_FORCED_SSL")); + } + catch(Exception e) + { + return false; + } + } + private LogChannelInterface log; private String name; @@ -1104,7 +1118,7 @@ public void setSslMode(boolean sslMode) { * @return the sslMode */ public boolean isSslMode() { - return sslMode; + return KETTLE_FORCED_SSL || sslMode; } /**