manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sch...@apache.org
Subject svn commit: r1818336 - in /manifoldcf/trunk: ./ framework/core/src/main/java/org/apache/manifoldcf/core/database/ site/src/documentation/content/xdocs/en_US/ site/src/documentation/content/xdocs/ja_JP/ site/src/documentation/content/xdocs/zh_CN/
Date Fri, 15 Dec 2017 21:01:12 GMT
Author: schuch
Date: Fri Dec 15 21:01:11 2017
New Revision: 1818336

URL: http://svn.apache.org/viewvc?rev=1818336&view=rev
Log:
CONNECTORS-1476: TLS/SSL Support for MySQL/MariaDB Database Connections

Modified:
    manifoldcf/trunk/CHANGES.txt
    manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/DBInterfaceMySQL.java
    manifoldcf/trunk/site/src/documentation/content/xdocs/en_US/how-to-build-and-deploy.xml
    manifoldcf/trunk/site/src/documentation/content/xdocs/ja_JP/how-to-build-and-deploy.xml
    manifoldcf/trunk/site/src/documentation/content/xdocs/zh_CN/how-to-build-and-deploy.xml

Modified: manifoldcf/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/CHANGES.txt?rev=1818336&r1=1818335&r2=1818336&view=diff
==============================================================================
--- manifoldcf/trunk/CHANGES.txt (original)
+++ manifoldcf/trunk/CHANGES.txt Fri Dec 15 21:01:11 2017
@@ -3,6 +3,8 @@ $Id$
 
 ======================= 2.10-dev =====================
 
+CONNECTORS-1476: TLS/SSL support for MySQL/MariaDB database connections
+(Markus Schuch)
 
 ======================= Release 2.9 =====================
 

Modified: manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/DBInterfaceMySQL.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/DBInterfaceMySQL.java?rev=1818336&r1=1818335&r2=1818336&view=diff
==============================================================================
--- manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/DBInterfaceMySQL.java
(original)
+++ manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/database/DBInterfaceMySQL.java
Fri Dec 15 21:01:11 2017
@@ -31,7 +31,9 @@ public class DBInterfaceMySQL extends Da
   public static final String mysqlServerProperty = "org.apache.manifoldcf.mysql.server";
   /** Source system name or IP */
   public static final String mysqlClientProperty = "org.apache.manifoldcf.mysql.client";
-  
+  /** MySQL ssl property */
+  public static final String mysqlSslProperty = "org.apache.manifoldcf.mysql.ssl";
+
   private static final String _driver = "com.mysql.jdbc.Driver";
 
   /** A lock manager handle. */
@@ -77,9 +79,18 @@ public class DBInterfaceMySQL extends Da
     throws ManifoldCFException
   {
     String server =  LockManagerFactory.getProperty(tc,mysqlServerProperty);
+    final String ssl = LockManagerFactory.getProperty(tc,mysqlSslProperty);
+
     if (server == null || server.length() == 0)
       server = "localhost";
-    return "jdbc:mysql://"+server+"/"+theDatabaseName+"?useUnicode=true&characterEncoding=utf8";
+    
+    String jdbcUrl = "jdbc:mysql://"+server+"/"+theDatabaseName+"?useUnicode=true&characterEncoding=utf8";

+    
+    if (Boolean.parseBoolean(ssl)) {
+      jdbcUrl += "&useSSL=true&requireSSL=true";
+    }
+    
+    return jdbcUrl;
   }
 
   protected String getJdbcDriverClass()

Modified: manifoldcf/trunk/site/src/documentation/content/xdocs/en_US/how-to-build-and-deploy.xml
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/site/src/documentation/content/xdocs/en_US/how-to-build-and-deploy.xml?rev=1818336&r1=1818335&r2=1818336&view=diff
==============================================================================
--- manifoldcf/trunk/site/src/documentation/content/xdocs/en_US/how-to-build-and-deploy.xml
(original)
+++ manifoldcf/trunk/site/src/documentation/content/xdocs/en_US/how-to-build-and-deploy.xml
Fri Dec 15 21:01:11 2017
@@ -1101,6 +1101,7 @@ start[.bat|.sh]
             <tr><td>org.apache.manifoldcf.postgresql.ssl</td><td>No</td><td>Set
to "true" for ssl communication with PostgreSQL.</td></tr>
             <tr><td>org.apache.manifoldcf.mysql.server</td><td>No</td><td>The
MySQL or MariaDB server name.  Defaults to 'localhost'.</td></tr>
             <tr><td>org.apache.manifoldcf.mysql.client</td><td>No</td><td>The
MySQL or MariaDB client property.  Defaults to 'localhost'.  You may want to set this to '%'
for a multi-machine setup.</td></tr>
+            <tr><td>org.apache.manifoldcf.mysql.ssl</td><td>No</td><td>Set
to "true" for ssl communication with MySQL or MariaDB.</td></tr>
             <tr><td>org.apache.manifoldcf.hsqldbdatabasepath</td><td>No</td><td>Absolute
or relative path to HSQLDB database; default is '.'.</td></tr>
             <tr><td>org.apache.manifoldcf.hsqldbdatabaseprotocol</td><td>Yes,
for remote HSQLDB connection</td><td>The HSQLDB JDBC protocol; choices are 'hsql',
'http', or 'https'. Default is blank (which means an embedded instance)</td></tr>
             <tr><td>org.apache.manifoldcf.hsqldbdatabaseserver</td><td>Yes,
for remote HSQLDB connection</td><td>The HSQLDB remote server name.</td></tr>

Modified: manifoldcf/trunk/site/src/documentation/content/xdocs/ja_JP/how-to-build-and-deploy.xml
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/site/src/documentation/content/xdocs/ja_JP/how-to-build-and-deploy.xml?rev=1818336&r1=1818335&r2=1818336&view=diff
==============================================================================
--- manifoldcf/trunk/site/src/documentation/content/xdocs/ja_JP/how-to-build-and-deploy.xml
(original)
+++ manifoldcf/trunk/site/src/documentation/content/xdocs/ja_JP/how-to-build-and-deploy.xml
Fri Dec 15 21:01:11 2017
@@ -1101,6 +1101,7 @@ start[.bat|.sh]
             <tr><td>org.apache.manifoldcf.postgresql.ssl</td><td>No</td><td>Set
to "true" for ssl communication with PostgreSQL.</td></tr>
             <tr><td>org.apache.manifoldcf.mysql.server</td><td>No</td><td>The
MySQL or MariaDB server name.  Defaults to 'localhost'.</td></tr>
             <tr><td>org.apache.manifoldcf.mysql.client</td><td>No</td><td>The
MySQL or MariaDB client property.  Defaults to 'localhost'.  You may want to set this to '%'
for a multi-machine setup.</td></tr>
+            <tr><td>org.apache.manifoldcf.mysql.ssl</td><td>No</td><td>Set
to "true" for ssl communication with MySQL or MariaDB.</td></tr>
             <tr><td>org.apache.manifoldcf.hsqldbdatabasepath</td><td>No</td><td>Absolute
or relative path to HSQLDB database; default is '.'.</td></tr>
             <tr><td>org.apache.manifoldcf.hsqldbdatabaseprotocol</td><td>Yes,
for remote HSQLDB connection</td><td>The HSQLDB JDBC protocol; choices are 'hsql',
'http', or 'https'. Default is blank (which means an embedded instance)</td></tr>
             <tr><td>org.apache.manifoldcf.hsqldbdatabaseserver</td><td>Yes,
for remote HSQLDB connection</td><td>The HSQLDB remote server name.</td></tr>

Modified: manifoldcf/trunk/site/src/documentation/content/xdocs/zh_CN/how-to-build-and-deploy.xml
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/site/src/documentation/content/xdocs/zh_CN/how-to-build-and-deploy.xml?rev=1818336&r1=1818335&r2=1818336&view=diff
==============================================================================
--- manifoldcf/trunk/site/src/documentation/content/xdocs/zh_CN/how-to-build-and-deploy.xml
(original)
+++ manifoldcf/trunk/site/src/documentation/content/xdocs/zh_CN/how-to-build-and-deploy.xml
Fri Dec 15 21:01:11 2017
@@ -1101,6 +1101,7 @@ start[.bat|.sh]
             <tr><td>org.apache.manifoldcf.postgresql.ssl</td><td>No</td><td>Set
to "true" for ssl communication with PostgreSQL.</td></tr>
             <tr><td>org.apache.manifoldcf.mysql.server</td><td>No</td><td>The
MySQL or MariaDB server name.  Defaults to 'localhost'.</td></tr>
             <tr><td>org.apache.manifoldcf.mysql.client</td><td>No</td><td>The
MySQL or MariaDB client property.  Defaults to 'localhost'.  You may want to set this to '%'
for a multi-machine setup.</td></tr>
+            <tr><td>org.apache.manifoldcf.mysql.ssl</td><td>No</td><td>Set
to "true" for ssl communication with MySQL or MariaDB.</td></tr>
             <tr><td>org.apache.manifoldcf.hsqldbdatabasepath</td><td>No</td><td>Absolute
or relative path to HSQLDB database; default is '.'.</td></tr>
             <tr><td>org.apache.manifoldcf.hsqldbdatabaseprotocol</td><td>Yes,
for remote HSQLDB connection</td><td>The HSQLDB JDBC protocol; choices are 'hsql',
'http', or 'https'. Default is blank (which means an embedded instance)</td></tr>
             <tr><td>org.apache.manifoldcf.hsqldbdatabaseserver</td><td>Yes,
for remote HSQLDB connection</td><td>The HSQLDB remote server name.</td></tr>



Mime
View raw message