Browse Source

Merge pull request #9878 from kenrowland/HPCC-17359-6.4.0

HPCC-17359 Roxie farmer ssl configuration

Reviewed-By: Rodrigo Pastrana <rodrigo.pastrana@lexisnexis.com>
Reviewed-By: Mark Kelly <mark.kelly@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 8 years ago
parent
commit
7b43e8350b

+ 16 - 0
deployment/deployutils/deployutils.cpp

@@ -332,6 +332,14 @@ void addItem(StringBuffer& jsStrBuf,
              const char* extra, 
              short ctrlType)
 {
+  // Control types:
+  // 1 - text entry
+  // 2 - ?
+  // 3 - true/false radio buttons
+  // 4 - drop menu
+  // 5 - password entry
+  // 6 - multiline text
+  // 7-? ?
   StringBuffer sbAttr("Attributes");
 
   jsStrBuf.appendf("var attr%s%s = {};", attrName, tabName);
@@ -513,6 +521,10 @@ public:
         addItem(jsStrBuf, m_pEnv.get(), XML_TAG_ROXIE_FARM, TAG_PORT, "", 0, 1, "", 1);
         addItem(jsStrBuf, m_pEnv.get(), XML_TAG_ROXIE_FARM, TAG_REQARRAYTHREADS, "", 0, 1, "", 1);
         addItem(jsStrBuf, m_pEnv.get(), XML_TAG_ROXIE_FARM, "aclName", "", 0, 1, "|'#$process/ACL'", 4);
+        addItem(jsStrBuf, m_pEnv.get(), XML_TAG_ROXIE_FARM, "protocol", "", 0, 1, "|new Array('ssl','native')", 4);
+        addItem(jsStrBuf, m_pEnv.get(), XML_TAG_ROXIE_FARM, "passphrase", "", 0, 1, "", 5);
+        addItem(jsStrBuf, m_pEnv.get(), XML_TAG_ROXIE_FARM, "certificateFileName", "", 0, 1, "", 1);
+        addItem(jsStrBuf, m_pEnv.get(), XML_TAG_ROXIE_FARM, "privateKeyFileName", "", 0, 1, "", 1);
 
         addItem(jsStrBuf, m_pEnv.get(), XML_TAG_ROXIE_ONLY_SLAVE, TAG_NAME, "", 0, 1, "", 0);
         addItem(jsStrBuf, m_pEnv.get(), XML_TAG_ROXIE_ONLY_SLAVE, TAG_COMPUTER, "", 0, 1, "", 0);
@@ -540,6 +552,10 @@ public:
           m_colIndex.appendf("colIndex['numThreads%s']=%d;", serverStr, index++);
           m_colIndex.appendf("colIndex['requestArrayThreads%s']=%d;", serverStr, index++);
           m_colIndex.appendf("colIndex['aclName%s']=%d;", serverStr, index++);
+          m_colIndex.appendf("colIndex['protocol%s']=%d;", serverStr, index++);
+          m_colIndex.appendf("colIndex['passphrase%s']=%d;", serverStr, index++);
+          m_colIndex.appendf("colIndex['certificateFileName%s']=%d;", serverStr, index++);
+          m_colIndex.appendf("colIndex['privateKeyFileName%s']=%d;", serverStr, index++);
 
           index = 0;
           const char* agentStr = "Agents";

+ 12 - 0
esp/files/scripts/configmgr/configmgr.js

@@ -751,6 +751,18 @@ function initItemForRoxiePorts(item) {
   item.aclName = "";
   item.aclName_extra = "";
   item.aclName_ctrlType = 0;
+  item.protocol = "";
+  item.protocol_extra = "";
+  item.protocol_ctrlType = 0;
+  item.passphrase = "";
+  item.passphrase_extra = "";
+  item.passphrase_ctrlType = 0;
+  item.certificateFileName = "";
+  item.certificateFileName_extra = "";
+  item.certificateFileName_ctrlType = 0;
+  item.privateKeyFileName = "";
+  item.privateKeyFileName_extra = "";
+  item.privateKeyFileName_ctrlType = 0;
   item.process = "";
   item.process_extra = "";
   item.process_ctrlType = 0;

+ 1 - 1
initfiles/componentfiles/configxml/RoxieTopology.xsl

@@ -160,7 +160,7 @@
             @XSL_PLUGIN_DEFINITION@
             <xsl:for-each select="RoxieFarmProcess">
                 <xsl:element name="RoxieFarmProcess">
-                    <xsl:copy-of select="@*[name()!='name' and name()!='level']"/>
+                    <xsl:copy-of select="@*[name()!='level']"/>
                 </xsl:element>
             </xsl:for-each>
             <xsl:for-each select="RoxieServerProcess">

+ 32 - 0
initfiles/componentfiles/configxml/roxie.xsd.in

@@ -77,6 +77,38 @@
                 </xs:appinfo>
               </xs:annotation>
             </xs:attribute>
+            <xs:attribute name="protocol" type="xs:string" use="optional" default="native">
+              <xs:annotation>
+                <xs:appinfo>
+                  <tooltip>Protocol to use</tooltip>
+                  <title>Protocol</title>
+                </xs:appinfo>
+              </xs:annotation>
+            </xs:attribute>
+            <xs:attribute name="passphrase" type="xs:string" use="optional">
+              <xs:annotation>
+                <xs:appinfo>
+                  <tooltip>Pass phrase for cert</tooltip>
+                  <title>PassPhrase</title>
+                </xs:appinfo>
+              </xs:annotation>
+            </xs:attribute>
+            <xs:attribute name="certificateFileName" type="xs:string" use="optional">
+              <xs:annotation>
+                <xs:appinfo>
+                  <tooltip>Path to certificate filename</tooltip>
+                  <title>CertFile</title>
+                </xs:appinfo>
+              </xs:annotation>
+            </xs:attribute>
+            <xs:attribute name="privateKeyFileName" type="xs:string" use="optional">
+              <xs:annotation>
+                <xs:appinfo>
+                  <tooltip>Path to private key filename</tooltip>
+                  <title>CertFile</title>
+                </xs:appinfo>
+              </xs:annotation>
+            </xs:attribute>
           </xs:complexType>
         </xs:element>