Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Linked Server Data Stream Encryption Expand / Collapse
Author
Message
Posted Saturday, March 8, 2014 9:32 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, March 11, 2014 7:42 AM
Points: 5, Visits: 9
Hi everyone,
I am new here and tried to find this answer but could not find what I need; sorry if I am duplicating a previous post...

I have a client running a SQL server 2008 system containing user data that they need to send to our SQL server every night via a linked server and ssis package. We have secured a linked server connection between our 2 systems via firewall rules plus SQL encyption enabled and used between them and us.

I can see from netmon that the connection itself is encrypted but the tds stream itself is not. I can look right into the packets and see the data. This tells me that the data itself is not being encrypted.

Can so done tell e how to go about encrypting the data in this stream? This is a web app and the data on each end is not encrypted as we can't decrypt it in the application currently so for now I just need the data protected in the transfer between us and them.

Thanks for any help.
Post #1548973
Posted Saturday, March 8, 2014 11:12 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Friday, December 12, 2014 1:02 AM
Points: 823, Visits: 753
When you create the linked server, you need to provide "Encrypt=yes" in the @provstr argument to sp_addlinkedserver. Obviously, both servers need to have the same certificate for the encryption to be secure.

Erland Sommarskog, SQL Server MVP, www.sommarskog.se
Post #1548979
Posted Saturday, March 8, 2014 12:30 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, March 11, 2014 7:42 AM
Points: 5, Visits: 9
I haven done this already. The connection itself starts out encrypted but the table data going through the tds packets is not. I have verified it isn't. If you inspect the packets going between the servers you will see this. I can look right into the tds packets and read the table data.

I could of course encrypt the data itself via symmetric keys, etc but this isn't what we want as we have multiple sources and destinations involved. We need the encryption transparent but not via tde. Hopefully someone has encountered this before and know what to do
Post #1548986
Posted Saturday, March 8, 2014 12:36 PM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Friday, December 12, 2014 1:02 AM
Points: 823, Visits: 753
I will have to admit that I have not worked much with encrypted connections. But from what I read in Books Online, it should be possible. You need to set up SSL. Have you looked at this topic in Books Online: http://technet.microsoft.com/en-us/library/ms189067%28v=sql.105%29.aspx

Erland Sommarskog, SQL Server MVP, www.sommarskog.se
Post #1548987
Posted Saturday, March 8, 2014 12:53 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, March 11, 2014 7:42 AM
Points: 5, Visits: 9
Yep. I have the ssl working on server and client. I can see the tls connection and handshakes and many encrypted packets which is suspect is the dts and dml itself. Then when the data stream gets sent it is encapsulated tds packets inside tcp. When I inspect these packets I can read the table data. So this tells me that the table data stream is excluded from the encryption.

This is either because I am doing something wrong or this is expected behavior. If it is expected I bet many people would be upset as from all articles and books online there is no indication your data isn't being protected.

Can anyone confirm this and if your data is being encrypted what did you do differently?
Post #1548991
Posted Saturday, March 8, 2014 12:59 PM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Friday, December 12, 2014 1:02 AM
Points: 823, Visits: 753
Hm, exactly which connections did you specify to be encrypted? You talk both about SSIS and a linked server, and that's definitely two different things. If you move data through both, you need to enable encryption in both connections.

Erland Sommarskog, SQL Server MVP, www.sommarskog.se
Post #1548992
Posted Saturday, March 8, 2014 4:07 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, March 11, 2014 7:42 AM
Points: 5, Visits: 9
What we have done is create an ssis package on their system and then schedule it to run every night. The source is the server holding the package and the destination is the linked server which has been setup to encrypt. When we run the job I can see the tls handshake happening and everything not in a tds packet looks to be encrypted. When I view the tds packet itself I can read the data.

Is there something else I need to specify on the ssis package to force the tds data to be encrypted? I have looked at the package options and nothing jumps out at me so your expertise here would be a great help. I have been a SQL server dba since 2000 but have to admit I am weak with linked servers and encryption sadly.
Post #1549006
Posted Saturday, March 8, 2014 4:19 PM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Friday, December 12, 2014 1:02 AM
Points: 823, Visits: 753
It still not clear to me: does SSIS connect directly to your site? Or does it connect to a server at the client where it inserts data into a table through four-part notation? That sounds a little funny, but you keep talking about a linked server.

I have never worked with SSIS myself, so I don't really know what to configure there. But common sense tells me that it is just another conncetion string, and you need Encrypt=Yes in the connection string. And you need a certificate that is installed in both places. (Or use the self-signed certificate that SQL Server generates, but then someone can eavesdrop that certificate when it crosses the wire.)

Maybe you should first to get encrypted connections going locally. The simplest is to try SQLCMD with the -N option.


Erland Sommarskog, SQL Server MVP, www.sommarskog.se
Post #1549008
Posted Saturday, March 8, 2014 6:11 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, March 11, 2014 7:42 AM
Points: 5, Visits: 9
We have it setup this way. In their data centre they added our SQL server as a linked server. Our server is in our data centre which is accessible through the internet, we locked down the connection via firewall rules of course.

They created a ssis package that sends data from their hr table to our users table. The ssis source is their server and the destination is the linked server they added. The linked server is configured to use encryption.

I think I may be understanding what you are getting at though. Why add a linked server destination when ssis itself can make the connection.

I will give that a try on Monday and see if I get the desired results.

You don't know by chance where to configure encryption in ssis though? I did not see any options that do this.

Thx
Post #1549015
Posted Sunday, March 9, 2014 4:10 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Friday, December 12, 2014 1:02 AM
Points: 823, Visits: 753
rcraig 51362 (3/8/2014)

You don't know by chance where to configure encryption in ssis though? I did not see any options that do this.


There is not much I know about SSIS, but I presume there is a place where you can enter the connection string. That would be the place.


Erland Sommarskog, SQL Server MVP, www.sommarskog.se
Post #1549039
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse