-
Notifications
You must be signed in to change notification settings - Fork 297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Column Encryption (Always Encrypted) support in SqlClient for .NET Core #11
Comments
guys, has this been fixed or? |
CoreFx SqlClient does not currently support column encryption |
@corivera, do we have any plans on this feature? |
We don't have any plans for it at the moment, we (SqlClient team) will have to discuss it. |
Thanks for you info. I think it would be highly demanded feature as column encryption is widely used. Hope to see this feature being implemented soon. |
Related dotnet/efcore#9142. |
Need this |
The lack of Always Encrypted is a real drag on promoting .net Core where I am, because security is paramount. |
Actually I had reported this separately, so technically my issue is a duplicate. But I've been looking at explicit server-based value encryption (using ENCRYPTBYKEY etc), and it seems there are no .net libraries out there that support this either? |
What is going on with this? We really need this now! |
Just starting a new enterprise project, we had decided on .Net Core but are switching to .Net Framework over this issue - I just removed the .Net Core projects from the solution and am retargeting ASP.Net Core at the .Net Framework. It is a shame Core isn't yet mature enough for us, but at the end of the day you've got the resources you've got. |
@corivera : Similar to @mattd73uk, we've started an enterprise project and just found out always encrypted is not supported in .Net Core. Basically we will have to switch back to the .Net Framework unless we hear otherwise. Is there any indication on when this feature would likely be added? |
We had the same demand during mid of 2017 in one of our enterprise project that uses AE feature from a .NET Core API, reached through the Microsoft premier support, but could not find any timelines for this functionality, I don't think its even present in their future milestones. Wondering when they will add support for column encryption in CoreFX sql client. Finally, we had to target the API to .NET Framework and use EF 6.x instead of Core. |
Ouch, this has burned me today horribly. Tomorrow we are deploying to production. Which means that today we start migrating users across from an old system across to a new one. Then I get hit by this...... |
While I was looking forward to trying .NET Core out for a new project the lack of support for column encryption and the lack of support for AccessToken means I will have to build the project on .Net Framework instead. |
Always Encrypted is definitely still on our radar. We don't have a timeline for it at the moment, though. There are a few items that we believe are higher on the list. We are open to prioritization changes, though (vote up comments on this issue). |
I've commented on another thread regarding this already - but with your recent push on GDPR it shocks me that this isn't available. It's fairly critical to stop people from rolling their own methods to encrypt data in columns (which as we know from experience never ends well). Being forced to use .NET Framework for such "basic" (from an outside perspective) functionality isn't really acceptable, when there's such a huge push to use .NET Core. |
@David-Engel We cannot use the latest SQL and .net Core due to this. We had hours and hours of rework which had to be done because of this and we aren't the only ones. This should have already been done imo. |
Here we are at the midpoint of 2018. To find out now that this critical piece of functionality is even at this late date not under development is deeply disappointing. Like these others, I've had to push back on timelines to move to .net core. Prospective dates are in order here. When? |
Always Encrypted came out in 2016. We are a complete newer version of SQL Server ahead and at least 4 versions of .net framework ahead since it came out and we still don't have support for core. This makes no sense! |
…pInternal (#18276) * Fixed comment for TimeSpan.SecondsPerTick * Fixed comment on Thread.SleepInternal Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
…pInternal (#18276) * Fixed comment for TimeSpan.SecondsPerTick * Fixed comment on Thread.SleepInternal Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
I hope to see this feature in the next version of System.Data.SqlClient. |
I share your hope as I need a solution to comply the GDPR's rules. |
With all the data security push from GDPR and others, we really need this fix ASAP |
we really need this fix ASAP. This feature will be release with .Net Core 2.2 ? |
Any news on this ? would be nice to not have to use .net framework for bigger projects... |
We pushed an update to the Microsoft.Data.SqlClient 1.0 preview. It should resolve the issues noted around Always Encrypted. @sebader - I want to note, though, custom key store providers like the Azure Key Vault provider need to be updated to work with Microsoft.Data.SqlClient. Only the built-in providers will work until that happens (hopefully soon!). So the example you were following using Azure Key Vault still won't work. But this example, which uses the built-in Windows Certificate Store provider, should work as expected after changing from System.Data.SqlClient to Microsoft.Data.SqlClient: |
thanks for the update @David-Engel ! Too bad though about KeyVault missing yet. I'm using Azure Functions so Windows Cert store is no good for me ;-) |
@sebader I'm not sure. We've pinged the team who owns it. I don't think that project is public. |
As recently announced in the .NET Blog, focus on new SqlClient features an improvements is moving to the new Microsoft.Data.SqlClient package. For this reason, we are moving this issue to the new repo at https://github.com/dotnet/SqlClient. We will still use https://github.com/dotnet/corefx to track issues on other providers like System.Data.Odbc and System.Data.OleDB, and general ADO.NET and .NET data access issues. |
@David-Engel could you recommend the best place to watch for updated Azure Key Vault support? We're using certificate store for the moment but trying to catch all the places that need cert updates is a pain and we'd love to migrate in the near term. |
@divega How can this change be incorporated into the EFCore.SqlServer? because System.Data.SqlClient is one of the dependencies of EFCore.SqlServer. |
@kedarchinchvalkar There are two relatively small steps:
I lifted the code from GitHub for the last Microsoft.EntityFrameworkCore.SqlServer 2.x release for
Then I updated my service registration for AddDbContext as follows, where I construct a
Works like a charm. I even think the step of constructing the DbConnection may be unnecessary and you can use the raw string value for UseSqlServer(), but haven't tried it. Feel free to experiment. |
@lsuarez5280 I'm not sure. I'll be sure to update this issue if I hear anything, though. |
@kedarchinchvalkar, EF Core 3.0 will switch to depend directly on Microsoft.Data.SqlClient. This change is coming probably in the next preview. |
@David-Engel should we have a separate issue to track Azure Key Vault support? I am not very familiar with the feature, but it seems we need to follow up internally with the owners of https://www.nuget.org/packages/Microsoft.SqlServer.Management.AlwaysEncrypted.AzureKeyVaultProvider. |
Its giving an error on UserSqlServer() as, 'Microsoft.EntityFrameworkCore.SqlServerDbContextOptionsExtensions.UseSqlServer(Microsoft.EntityFrameworkCore.DbContextOptionsBuilder, System.Data.Common.DbConnection, System.Action<Microsoft.EntityFrameworkCore.Infrastructure.SqlServerDbContextOptionsBuilder>)' |
@kedarchinchvalkar That sounds like you may have reference problems in your project with multiple SQL Server EF Relational packages imported somehow, but is not related to the code. Those method prototypes are exactly the same. |
Yes, You're right. There was a duplicate reference due to "Microsoft.AspNetCore.All" package. Thank you so much. Program now builds perfectly. I have applied column encryption on database table columns. InvalidCastException: Unable to cast object of type 'System.Byte[]' to type 'System.String'.
|
Any updates on above? |
@kedarchinchvalkar I'm gonna guess that you haven't actually added |
@Isuarez5280 : Thank you so much for the suggestion. I will open it as a new issue. |
Thank you so much @lsuarez5280 and @divega |
We believe the originally reported issue has been addressed in Microsoft.Data.SqlClient (NetCore), please open new issues for any specific usecase, closing the issue. |
When using a DbContext with a ConnectionString like
I get the following error
StackTrace
The issue is about adding support for the Column Encryption Setting to the .NET Core ADO.NET SqlClient.
The text was updated successfully, but these errors were encountered: