您如何动态掩盖通过Azure保存为JSON的数据?

发布于 2025-02-11 20:19:50 字数 831 浏览 2 评论 0原文

我正在尝试通过Azure SQL数据库掩盖敏感数据。 数据作为正常文本保存,一列作为XML保存,另一列作为JSON保存。 我已经尝试在数据库中添加规则,但是当我打开SSM并运行一个选择语句时,它不适用于列中的任何数据(正常文本,XML或JSON保存数据)

,没有任何用户排除使用未掩盖的数据。 只想了解当我在SSM上执行选择时,为什么没有掩盖数据。

我的规则看起来如下:

XML规则

”

json规则:

“

文本规则:

“

我的sql Statment:

从database_name中选择top(1000) *

I'm trying to mask sensitive data via an Azure SQL database.
The data is saved as normal text and one column as XML and another saved as json.
I've tried adding rules to the database but when I open SSMS and run a select statement it does not apply to any of the data in the columns (normal text, xml or json saved data)

There's no user excluded to see unmasked data.
Just want to understand why the data is not masked when I perform a select on SSMS.

My rules look like the below:

XML Rule

XML Rule

JSON Rule:

Json Rule

Text Rule:

Text rule

My SQL statment:

SELECT TOP (1000) * from database_Name

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

烟沫凡尘 2025-02-18 20:19:50

Microsoft文档它说,

Azure Active Directory(Azure AD)或SQL中的身份包含在掩蔽过程中,应访问未掩盖的敏感数据。

也许您将数据访问SQL AdminAzure AD用户,因此您可以看到敏感数据。

通过在数据库的多层中隐藏不需要的用户的重要信息,您可以防止访问和获得控制。您可以向用户授予或删除UNMASK许可。

Microsoft-documentation 它说,

请允许用户


GRANT UNMASK ON Data.Membership TO USER;

用户下文中的数据


EXECUTE AS USER='USER';

在授予用户许可之后 数据下撤销


REVOKE UNMASK ON Data.Membership FROM USER;

数据

“在此处输入图像说明”

从用户

“在此处输入映像”

从:

使用Azure门户掩盖

授予和撤销许可

As mentioned in Microsoft Document it says,

The identities in Azure Active Directory (Azure AD) or SQL are included in the masking process and should have access to the unmasked sensitive data.

Maybe you are accessing data as SQL admin or Azure AD user because of that you can see sensitive data.

By hiding important information from unwanted users at multiple layers of the database, you may prevent access and gain control. You may give or remove UNMASK permission to a user.

The code taken from Microsoft-documentation it says,

Give UNMASK permission to user


GRANT UNMASK ON Data.Membership TO USER;

To Query the data under the context of user


EXECUTE AS USER='USER';

To revoke UNMASK permissions


REVOKE UNMASK ON Data.Membership FROM USER;

Data after granting permission to user

enter image description here

Data after removing permission from user

enter image description here

Taken Reference from:

SQL Database dynamic data masking with the Azure portal

Granting and Revoking the Permission

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文