You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Andres de la Peña (Jira)" <ji...@apache.org> on 2023/02/01 10:26:00 UTC

[jira] [Commented] (CASSANDRA-18069) Add a new UNMASK permission

    [ https://issues.apache.org/jira/browse/CASSANDRA-18069?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17682958#comment-17682958 ] 

Andres de la Peña commented on CASSANDRA-18069:
-----------------------------------------------

Here is the PR adding the new {{UNMASK}} permission, and the PR updating auth dtests for it:
||PR||CI||
|[trunk|https://github.com/apache/cassandra/pull/2125]|[j8|https://app.circleci.com/pipelines/github/adelapena/cassandra/2615/workflows/235677a7-aae1-444f-a8c3-6dba4ae3df2d] [j11|https://app.circleci.com/pipelines/github/adelapena/cassandra/2615/workflows/f9fc47b8-ffba-4655-8e08-234006fa33ce]|
|[dtest|https://github.com/apache/cassandra-dtest/pull/208]|

The patch is based on the one allowing to attach masking functions to table columns, CASSANDRA-18068.

CC [~blerer]

> Add a new UNMASK permission
> ---------------------------
>
>                 Key: CASSANDRA-18069
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-18069
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Feature/Dynamic Data Masking
>            Reporter: Andres de la Peña
>            Assignee: Andres de la Peña
>            Priority: Normal
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Add a new UNMASK permission allowing users with that permission to see the data masked by the masking functions attached to columns introduced by CASSANDRA-18068, as defined by [CEP-20|https://cwiki.apache.org/confluence/display/CASSANDRA/CEP-20%3A+Dynamic+Data+Masking].
> It would look like:
> {code}
> > CREATE TABLE patients (
>       id timeuuid PRIMARY KEY,
>       name text MASKED WITH default(),
>       birth date MASKED WITH default()
>       );
>  
> > INSERT INTO patients(id, name, birth) VALUES (now(), 'alice', '1982-12-21');
>  
> > CREATE USER unprivileged_user WITH PASSWORD 'xyz';
> > CREATE USER privileged_user WITH PASSWORD 'zyx';
>  
> > GRANT SELECT ON TABLE patients TO unprivileged_user;
> > GRANT SELECT ON TABLE patients TO privileged_user;
> > GRANT UNMASK ON TABLE patients TO privileged_user;
>  
> > LOGIN unprivileged_user
>  
> > SELECT name, birth FROM patients WHERE id=db2b372f-f91b-4537-b46b-c478f8330c29;
>  
>  name    | birth
> ---------+------------
>  alXXXXe | 1900-01-01 
>              
> > LOGIN privileged_user
> > SELECT name, birth FROM patients WHERE id=db2b372f-f91b-4537-b46b-c478f8330c29;
>  
>  name  | birth
> -------+------------
>  alice | 1982-12-21
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org