使用每个用户数据的单独密钥对SQL Server Azure数据库中的数据进行加密 [英] Encrypting data in SQL Server Azure database with separate key for each user's data

查看:71
本文介绍了使用每个用户数据的单独密钥对SQL Server Azure数据库中的数据进行加密的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试基于Azure SQL数据库后端创建服务.

I'm trying to create a service based on an Azure SQL Database backend.

该服务将是多租户,并且将包含来自多个客户端"(可能成千上万)的高度敏感的信息,这些信息必须严格彼此隔离,并严格防止数据泄漏. 根据设计"

The service will be multi-tenant, and would contain highly sensitive information from multiple "clients" (potentially hundreds of thousands), that must be strictly isolated from one another and secured heavily against data leaks. "by design"

使用这么多单个数据库是不可行的,因为将会有很多客户端,每个客户端的信息很少.

Using so many individual databases would not be feasible, as there will be a lot of clients with very little information per client.

我已经研究过Azure提供的透明加密,但这实际上会将整个数据库加密为一个,因此换句话说,它将无法防止客户端或其他人之间的泄漏;由于开发错误或敌对攻击,非常重要的一点是,一个客户"的信息永远不会落入他人的手中.

I have looked into the transparent encryption offered by Azure, but this would essentially encrypt the whole database as one, so it would in other words not protect against leaks between clients or someone else; due to development errors, or hostile attacks, and it's very critical that one "client's" information never comes into anyone else's hands.

所以我真正想要实现的是,使用不同的密钥对数据库中每个客户端的数据进行加密,以便您必须从每个客户端(从其物理"位置)获取密钥以进行解密您可能设法从该特定客户端的数据库中提取的任何数据,几乎任何人都做不到.

So what I would really like to achieve, is to encrypt each client's data in the database with a different key, so that you would have to obtain the key from each client (from their "physical" location) to de-crypt any data you might manage to extract from the database for that particular client, which would be virtually impossible for anyone to do.

我的意思清楚吗?

你们对我有任何关于如何解决此问题的建议,或者是否知道允许此功能的任何第三方解决方案?还有其他建议吗?

Do you guys have any suggestions for me on how to manage this problem, or know of any third party solution that allows for this functionality? Any other advise?

推荐答案

您要在一张表中按设计"保护/隔离租户,为什么不签出

You're looking at protecting/isolating the tenants "by design" in a single table, why not check out Row Level Security. You could configure it to serve up only the applicable rows to a specific tenant.

这并不能直接解决您最初的问题,即有关为每个租户使用单独的密钥加密数据的问题;如果每个租户都有单独的表,则可以通过始终加密,但是如果您要处理20万个密钥,这在密钥管理中似乎有些复杂.

This doesn't directly address your initial question about encrypting the data with a separate key for each tenant; If you have a separate table for each tenant, then you could do this via Always Encrypted, but this would seem to have some complexity in key management, if you're trying to handle 200k keys.

AFAIK,没有本地SQL Server功能可以使用不同的密钥对属于租户的每一行行进行加密,但是可能还存在一些我尚未见过的优雅解决方案.当然,您可以在应用程序端执行此操作并将其存储在SQL中,不会有任何问题.诀窍与管理大量密钥的基于AE的解决方案相同.

AFAIK, there isn't a native SQL Server functionality to encrypt each set of rows that belongs to a tenant with a distinct key- but there may be some elegant solutions that I haven't seen yet; Of course, you could do this on the app side and store it in SQL and there would be no issues; the trick would be the same as the AE based solution above- managing a large number of keys.

这篇关于使用每个用户数据的单独密钥对SQL Server Azure数据库中的数据进行加密的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆