[MCOL-497] support ssl connection in cross engine joins Created: 2017-01-10  Updated: 2023-04-12  Resolved: 2018-10-02

Status: Closed
Project: MariaDB ColumnStore
Component/s: None
Affects Version/s: 1.0.6
Fix Version/s: 1.2.0

Type: New Feature Priority: Major
Reporter: David Thompson (Inactive) Assignee: Daniel Lee (Inactive)
Resolution: Fixed Votes: 0
Labels: relnote

Sprint: 2018-01, 2018-02, 2018-03, 2018-04, 2018-05, 2018-06, 2018-07, 2018-08, 2018-09, 2018-10, 2018-11, 2018-12, 2018-13, 2018-14, 2018-15, 2018-16, 2018-17, 2018-18

 Description   

Since we promote the use of ssl connections, we should also add a configuration to support ssl connections in cross engine joins. This might be useful if the remote server is truly remote.



 Comments   
Comment by Roman [ 2017-12-20 ]

Greetings,

Here is the PR made according with the guidelines given:

  • separate mysql connection code into a separate lib that lives in engine/utils/libmysql_client
  • made without configuration/monitoring tools. One must put three xml tags into Columnstore.xls to secure with TLS crossengine and querystats queries' connections.

Here is a simple feature configuration reference.
To configure the feature one needs to change $INSTALL_DIR/etc/Columnstore.xml. There are three new tags(there are in the separate block) added to SystemModuleConfig section. $INSTALL_DIR/mysql/my.cnf must be also changed in this way. These three options: ssl-ca, ssl-cert, ssl-key are sufficient to enable TLS security in the mariadb.
To check the state of TLS facility in mariadb one should use SHOW VARIABLES LIKE '%ssl%' command. To check the number of sucessfull TLS handshakes SHOW STATUS LIKE '%ssl%'.

Comment by Andrew Hutchings (Inactive) [ 2018-01-02 ]

Set for me to review Roman's code

Comment by Andrew Hutchings (Inactive) [ 2018-01-02 ]

Added one comment for a tiny addition before I approve it.

Comment by Andrew Hutchings (Inactive) [ 2018-01-10 ]

To be documented, extra options in CrossEngineSupport:

		<TLSCA></TLSCA>
		<TLSClientCert></TLSClientCert>
		<TLSClientKey></TLSClientKey>

Comment by Daniel Lee (Inactive) [ 2018-10-02 ]

Build verified: Github source

/root/columnstore/mariadb-columnstore-server
commit 6b44f0d9c453ede53024f525b7ddf32b5323171b
Merge: 7db44a7 853a0f7
Author: Andrew Hutchings <andrew@linuxjedi.co.uk>
Date: Thu Sep 27 20:37:03 2018 +0100

Merge pull request #134 from mariadb-corporation/versionCmakeFix

port changes for mysql_version cmake to fix columnstore RPM packaging

/root/columnstore/mariadb-columnstore-server/mariadb-columnstore-engine
commit 3326be00de5f53ec365910f07a7fd882ba193d4d
Merge: ebbeb30 5cab6c4
Author: Andrew Hutchings <andrew@linuxjedi.co.uk>
Date: Tue Sep 18 13:57:17 2018 +0100

Merge pull request #565 from drrtuy/MCOL-1601

MCOL-1601 GROUP BY now supports subqueries in HAVING.

1) Setup MariaDB 10.3.9 with SSL.
2) Setup keys and certificates on ColumnStore 1.2.0
3) Manually and remotely logged into MariaDB server using SSL
4) Created schema and InnoDB table mdbe.t1 and inserted a row on MariaDB server
5) Created the same schema and InnoDB table in ColumnStore 1.2.0, leaving table empty
6) Configure cross-engine join in Columnstore.xml as the following:

<CrossEngineSupport>
<Host>10.0.0.201</Host>
<Port>3306</Port>
<User>root</User>
<Password>mariadb1</Password>
<TLSCA>/usr/local/mariadb/columnstore/etc/ca-cert.pem</TLSCA>
<TLSClientCert>/usr/local/mariadb/columnstore/etc/client-cert.pem</TLSClientCert>
<TLSClientKey>/usr/local/mariadb/columnstore/etc/client-key.pem</TLSClientKey>

7) Run cross-engine join query

[root@localhost bin]# mcsmysql mytest
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 25
Server version: 10.3.9-MariaDB-log Columnstore 1.2.0-1

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [mytest]> select t1.c2, o_comment from mdbe.t1, orders where c1=o_orderkey;
------------------------------------------------+

c2 o_comment

------------------------------------------------+

hello, World nstructions sleep furiously among

------------------------------------------------+
1 row in set (0.164 sec)

Generated at Thu Feb 08 02:21:32 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.