dbexpres and SecureBridge

Discussion of open issues, suggestions and bugs regarding network security and data protection solution - SecureBridge
Post Reply
peat
Posts: 11
Joined: Wed 30 Apr 2008 19:47

dbexpres and SecureBridge

Post by peat » Wed 30 Apr 2008 22:06

I am trying to modify some existing applications to provide secure remote access to a database. Not sure if this is the way to go about it, but seems to be working....

On a Delphi Win32 database application connecting from a client to a mysql database on a remote server with Mysql only listining on Localhost and ssh server installed,
I have set up a ssh connection using SecureBridge as follows:

ScFileStorage with the Key file

ScSSHClient
KeyStorage: ScFileStorage
HostName: serverIP
Port:22
User: server user id
password: password

ScSSHChannel
DestHost: localhost
DestPort: 3306
Source Port: 22

Then Using A TSQLConnection (dbexpress)
Using MySQL Direct by CoreLab
Set HostName: localhost:22
username mysql_username
etc.

This seems to work. Can anyone tell me if this is actually a secure connection?

Thanks,
Peter

peat
Posts: 11
Joined: Wed 30 Apr 2008 19:47

to clarify

Post by peat » Fri 02 May 2008 17:00

Sorry, maybe the post is a bit confusing. The situation is this (sorry if some of this is too obvious, I am a bit new at this);

To keep things secure, Mysql on the server is only listining to localhost. So I want connections from remote clients through an ssh tunnel for access to the database.

The applications are written in Delphi 2005/2007 using dbExpress drivers.

I found that with SecureBridge, I can create a tunnel with sshClient and sshChannel in the datamodule, then using the dbexpress Mysql (Direct By Corelab) driver tell the TSQLConnection to connect to hostname: localhost:22 and it will connect, apparently through the tunnel.

So my question is am I somehow just piggybacking on a open channel and not actually sending encrypted information, or does SecureBridge encrypt everything going out of Port 22?

It seems like it should be working as the sshserver is accepting and (hopefully) un-encrypting the data and dumping it off to mysql on localhost.

Thanks for any help or advice anyone can offer,
Peat

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Mon 05 May 2008 06:54

Yes, you actually create a secure connection. At that data from SSH client is always transmitted to SSH server in secure (encrypted) form. SSH server decodes the data and transmits it in plain form to your MySQL server.

Post Reply