You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@sentry.apache.org by "kalyan kumar kalvagadda (JIRA)" <ji...@apache.org> on 2018/03/08 14:50:00 UTC

[jira] [Comment Edited] (SENTRY-2154) Update schema to grant privileges to user

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

kalyan kumar kalvagadda edited comment on SENTRY-2154 at 3/8/18 2:49 PM:
-------------------------------------------------------------------------

I suggest using below tables for the storing the user privileges.
 # 
|{color:#205081}*Entity Table*{color}| | | |
|*Column Name*|*Column Type*|*Constraints*| |
|ENTITY_ID|long|Primary Key| |
|ENTITY_NAME|Varchar|Unique| |
|ENTITY_TYPE|ENUM|(USER)|Can be extended in future.|
| | | | |
| | | |{color:#205081} {color}|
|{color:#205081}*Sentry_Entity_Privilege_Map*{color}| | | |
|*Column Name*|*Column Type*|*Constraints*| |
|ENTITY_ID|long|Foreign key constraint on entity table| |
|DB_PRIVILEGE_ID|Long|Foreign key constraint on SENTRY_DB_PRIVILEGE table| |


was (Author: kkalyan):
New tables should be added to accommodate this.
 # 
|{color:#205081}*Entity Table*{color}| | | |
|*Column Name*|*Column Type*|*Constraints*| |
|ENTITY_ID|long|Primary Key| |
|ENTITY_NAME|Varchar|Unique| |
|ENTITY_TYPE|ENUM|(USER)|Can be extended in future.|
| | | | |
| | | |{color:#205081} {color}|
|{color:#205081}*Sentry_Entity_Privilege_Map*{color}| | | |
|*Column Name*|*Column Type*|*Constraints*| |
|ENTITY_ID|long|Foreign key constraint on entity table| |
|DB_PRIVILEGE_ID|Long|Foreign key constraint on SENTRY_DB_PRIVILEGE table| |

> Update schema to grant privileges to user
> -----------------------------------------
>
>                 Key: SENTRY-2154
>                 URL: https://issues.apache.org/jira/browse/SENTRY-2154
>             Project: Sentry
>          Issue Type: Sub-task
>          Components: Sentry
>    Affects Versions: 2.1.0
>            Reporter: Na Li
>            Priority: Major
>             Fix For: 2.1.0
>
>
> Need to add new DB table to support grant user to privileges
> Also, a flag should be added in privilege table to indicate the privilege is created by user, or created by sentry implicitly. User can view the implicit privileges, but cannot change it directly



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)