The significance of selecting 'encrypt connection' from the connection properties while connecting to SQL Azure from SSMS - azure-sql-database

I thank you in advance for sharing your knowledge. Here is my question:
By default, SQL Azure connections are encrypted. so what is the significance of checking the 'encrypt connection' checkbox in the connection properties while connecting to SQL Azure from SSMS? Does it make any difference?

Paras,
When the client library first attempts a connection to SQL Server / SQL Azure, it sends an initial connection request. Consider this a "pre-pre-connection" request. At this point the client does not know if SSL/Encryption is required and waits an answer from SQL Server/SQL Azure to determine if SSL is indeed required throughout the session (not just the login sequence, the entire connection session). A bit is set on the response indicating so. Then the client library disconnects and reconnects armed with this information.
Consider a proxy sitting between the client and SQL Azure (or SQL Server). The client talks to the proxy, and the proxy talks to SQL Azure/Sql Server. If you do not force the encryption bit on the client, you leave it to the proxy to encrypt or not the session. The proxy could encrypt the connection on the backend (it would have to for SQL Azure) but not on the client-side of the connection, hence accessing all your sensitive data. So checking the encryption box bypasses the "pre-pre-connection" request which prevents any proxy from turning off the encryption bit in question on the client side of the proxy, hence avoiding the man-in-the-middle attack.
Hopefully that makes sense... :) If you download Wireshark and watch what happens with the pre-pre-login packets, you will see what I mean. Checking the box changes the pre-login handshake mechanism to avoid the man-in-the-middle attack I described.

Related

SQL Server SSL Encryption

I have an IIS hosted WCF Service that uses SSL encryption. This service makes requests to a SQL Server 2014 database instance. When I make a call to the service the response message is encrypted. So, the connection between the client (browser) and the service is secure. I also want the connection between the service and the SQL Server 2014 database to be secure.
This is where my question comes in. I am not exactly sure how to do this. I read the following article Enable Encrypted Connections to the Database Engine and I was able to successfully add the certificate to the SQL server database engine and changed the Force Encryption flag to True. But now I am a bit confused as to whether I want to configure the server to accept encrypted connections or the client to request encrypted connections. Based on the scenario I presented above it seems I want the client to request encrypted connections from the SQL Server DB correct? I guess one reason I am confused is because this is ALL happening on my development machine. SQL Server is being hosted there as is the IIS Service.
If someone with experience could maybe clarify that for me I would greatly appreciate it.
If you haven't restarted the service, then do so to complete the configuration change. It sounds like you applied the change correctly and using a domain or public CA certificate will prevent a man in the middle attack. To verify that the connections are secure, you can use a DMV named sys.dm_exec_connection which should display true for the encrypt_option for all sessions, as below:
select session_id, net_transport, encrypt_option from sys.dm_exec_connections
I'm not certain that connections from the host to SQL Server will be encrypted by SSL\TLS since they would be using the shared memory protocol and Windows manages the security of shared memory.

Connection timeout over ssl

I have an client application that connects to a remote server via https for commercial purposes. This connection is using old IO (blocking connection). It normally runs smoothly.
Recently I have cloned the client thus created a new client instance, running from the same box and using the same client certificate. I'm noticing many connection timeouts from the server. I wonder if the cloning may have somehow been the cause of the timeouts and if there is a ssl issue here.
Both instances receive the following system parameters for security:
javax.net.ssl.trustStore=cacerts
javax.net.ssl.keyStore=1234567890123
javax.net.ssl.keyStorePassword=wordpass
Unfortunately the support from the server side is quite limited. I hope someone in this forum may come up with an idea.

SQL Using SSL to encrypt a single connection

I want to force all external connections to be encrypted using SSL, essentially I want to encrypt only one of the network interfaces.
This article comes about as close to my answer as I can get:
http://basitaalishan.com/2012/07/16/encrypting-connections-to-sql-server/
However, it seems to me that either all connections are forced to use encryption or all connections may be able to not use encryption at all. I want all external connections to be encrypted (no choice) and all internal connections (behind the firewall) to not be encrypted.
I need to encrypt both SQL 2005 and 2008R2. Both are running on Windows 2008 Std
Can this be done at all?
You could use a SSL wrapper/proxy like stunnel, then set the firewall to allow external connections only to the port where said SSL wrapper runs.

Using SSL certificate in Database

I was exploring SSL certificates and its advantages. There I came across using SSL certificate for Database connection. I am confused with why we need secure connection with database. Since if secure connection is established between client and server, anyways server is what going to connect and fetch from Database. Can someone help me in understanding why we need secure connection with Database? Thanks in advance.
You need SSL when the connection method is not secure, such as attaching to a remote database over the Internet. It's probably not a bad idea in general even for an internal application if there is any risk that someone, such as employee, may be able to intercept and either view the data in plaintext or do a MITM attack and they're not otherwise authorized to completely control the database.
The main idea of SSL is to prevent man-in-the-middle attacks and to make sure the remote server is really who they say they are.

Server Load for SAP Secure Network Connection Encryption

If you turn on encryption in SAP between the client and the server using the Secure Network Connection, then is there a load placed on the server to do all the encryption work? How big a load? Is it equivalent to the difference between HTTP and HTTPS on a web server?
Please clarify what you want to do.
Do you just want to create secure RFC connections from the SAP GUI to the SAP system? Which 3rd party security product will you be using (e.g. Kerberos).
Will you be using Single Sign On? i.e. via an AD server. If so, where will the secure connection be - full end to end?
With encryption, the main load is during the initial handshaking between the client and the server. During this process, keys are calculated and exchanged.
See the SNC User's Guide for information.
I have not seen any references to the load on the system. I did ask SAP OSS years ago but did not get a satisfactory reply.
You cannot compare the load of SNC (using DIAG) to HTTPS because the protocols are very different - DIAG is a lot leaner.
I have investigated the use of F5 servers. They can be used for software and hardware accelleration of HTTPS, but not for the DIAG protocol.