tursodatabase/libsql

Dynamic data masking

開放

#90 建立於 2022年12月15日

 (1 則留言) (2 個反應) (0 位負責人)C (490 個分叉)batch import
enhancementhelp wanted

倉庫指標

星標
 (16,744 顆星)
PR 合併指標
 (平均合併 23小時 19分鐘) (30 天內合併 1 個 PR)

描述

SQL Server, for example, has a neat feature, which is useful for data protection:

https://learn.microsoft.com/en-us/sql/relational-databases/security/dynamic-data-masking?view=sql-server-ver16

What you can do is attach a "masking policy" to a column in a table. For example, email addresses (that are personal information) could be masked by having a MASKED WITH augmentation on a SQL table:

CREATE TABLE users(
    email TEXT MASKED WITH (FUNCTION = 'email()') NOT NULL,
);

Queries to the table would mask out the email address with an anonymized "anon@example.com" version, for example. However, users could still see their own email addresses with another SQL extension that SQL Server has:

EXECUTE AS USER = 'penberg';  

Dynamic data masking is particularly useful in scenarios where database is replicated and you want the extra layer of protection while still serving queries. Please note that there's bound to be some overlap with LumoSQL security features here.

貢獻者指南