Solved

MS Access linked tables with the SQL 2016 Always Encrypted

Posted on 2016-10-12
11
42 Views
Last Modified: 2016-10-16
Is it possible to use MS Access linked tables with the SQL 2016 Always Encrypted feature? I created a test table in SQL 2016 that has encrypted fields, and I've set the ODBC connection permissions. I can't seem to find any documentation beyond that specific to working in MS Access.
0
Comment
Question by:Michael Murphy
  • 4
  • 4
  • 2
11 Comments
 
LVL 11

Expert Comment

by:Nakul Vachhrajani
ID: 41841461
MS Access and MS SQL Server are two different DB platforms. Hence, you will not be able to use functionality provided by one (SQL Server) in another (Access).
0
 
LVL 84
ID: 41841720
The encryption/decryption is performed by the ADO.NET drivers, so no, you would not be able to do this.

See these articles for more in-depth information about this feature:

http://www.sqlmvp.org/always-encrypted-in-sql-server-2016/
http://www.databasejournal.com/features/mssql/exploration-of-sql-server-2016-always-encrypted-part-1.html
1
 

Author Comment

by:Michael Murphy
ID: 41841835
I'd initially read that "The only driver that can successfully support Always Encrypted feature is .NET 4.6". Then when doing some research for implementing always encrypted in our asp.net application I ran across this post https://msdn.microsoft.com/en-us/library/mt637351(v=sql.110).aspx titled "Using Always Encrypted with the Windows ODBC Driver".

We also have an Access application.  Since we use a Windows ODBC Driver to connect our Access front end to a SQl back end I thought there might be a way to make the always encrypted feature to work in that scenario. It would be great if the encryption could work in both applications.
0
 
LVL 11

Expert Comment

by:Nakul Vachhrajani
ID: 41841943
The article (https://msdn.microsoft.com/en-us/library/mt637351(v=sql.110).aspx) actually refers to clients using ODBC drivers, i.e. if a client uses ODBC connections, then Always Encrypted can be supported when accessing/working with data on an AlwaysEncrypted database.

Always Encrypted allows client applications to encrypt sensitive data and never reveal the data or the encryption keys to SQL Server or Azure SQL Database.

The pre-requisite first step in this article is to enable AlwaysEncrypted on the database (server-side operation) and this is only supported for SQL Server & Azure SQL Database.

The challenge with Access is that it has a totally different paradigm for data access, storage and manipulation when compared to SQL Server. Access is more of a file storage for local operations rather than a centralized database which is what makes it difficult to implement AlwaysEncrypted in Access.
0
 

Accepted Solution

by:
Michael Murphy earned 0 total points
ID: 41842222
With the new ODBC 13.1 driver, tweaking the new settings, and also importing the certificate from the sql server onto the client machine the linked tables will work.

In MS Access I've been able to read, edit, and insert all fields within a linked table that has Always Encrypted columns. It is linked via ODBC from the SQL Server.
0
Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

 
LVL 11

Expert Comment

by:Nakul Vachhrajani
ID: 41842532
I am not convinced. The traffic between the client and SQL Server would be using Always Encrypted, but I doubt if the traffic between SQL Server and linked Access database is encrypted.

What configuration did you have to do on the Access end to decrypt the Always Encrypted traffic? How did you validate that Access was using Always Encrypted?
0
 
LVL 84
ID: 41843374
Nakul,

I believe the author is referring to an Access application, and not Access in terms of data storage (local or otherwise). In this scenario, Access contains only the Forms, Reports, VBA Code, etc - so it is certainly possible the ODBC method would work, and I see no reason for objecting on those grounds.

If the data is encrypted on SQL Server, but not in the linked Access table, then I believe that would evidence enough that it works ...
2
 

Author Comment

by:Michael Murphy
ID: 41843566
I've tested with the ODBC 11 driver. The encrypted columns are not readable, editable, etc.

I've also tested with the ODBC 13 driver. The encrypted columns are readable, editable, etc. The table is also limited in its operation, as noted in the online documentation regarding the behaviors and limitations for tables with encrypted columns. Such as not being able to sort, etc.

When I try to run sql commands that would work on an unencrypted table, but are supposed to fail when Always Encrypted is enabled, the commands fail with encryption related errors.

My erro early on was that I had not correctly imported the certificate onto the client machine where MS Access is intalled. The certificate is a key piece of the puzzle. The ODBC driver alone will not work.
0
 

Author Comment

by:Michael Murphy
ID: 41843579
Also, Scott describes my scenario perfectly. I tend to just call it front end and back end with linked tables. I'll adjust my explanation in the future.

A lot of the documentation still indicates that the .net connection is the only option, and does not include reference to the new ODBC 13 driver which I was able to get to work in combination with the cert.

I should also note that deleting the linked table in Access, and then making a new linked connection was necessary. Just using the Linked Table Manager to refresh the linked tables after updating the ODBC driver was not sufficient. The Linked Table Manager method left the columns encrypted/unreadable. Replacing the links provided full functionality.
0
 
LVL 11

Expert Comment

by:Nakul Vachhrajani
ID: 41844014
Ok, now I get it. Thank-you, Scott & Michael for clarifying.

I thought Access was also involved as a data storage which is the point I was not convinced about. If Access is just being used as a front-end while the actual data storage was in SQL Server. Sure - that would be a valid case for Always Encrypted :)

Thanks again for the clarification and sorry for the confusion. I no longer have any objections.

Have a wonderful week-end!
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now