[
https://issues.apache.org/jira/browse/SENTRY-2242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16528003#comment-16528003
]
kalyan kumar kalvagadda commented on SENTRY-2242:
-------------------------------------------------
[~LinaAtAustin] With the change added SENTRY-2274 we make sure that we all the
owner privileges when owner change is done to make sure that there is only one
owner privilege.
We can close this issue as will not fix?
> Add schema changes to limit one one user as owner privilege per object
> ----------------------------------------------------------------------
>
> Key: SENTRY-2242
> URL: https://issues.apache.org/jira/browse/SENTRY-2242
> Project: Sentry
> Issue Type: Sub-task
> Components: Sentry
> Affects Versions: 2.1.0
> Reporter: kalyan kumar kalvagadda
> Assignee: kalyan kumar kalvagadda
> Priority: Major
>
> Currently user<-> privileges is implemented to handle privileges to owners of
> the respective objects. There can not be more than one owner to single object
> (database/table) so restriction should be added either at the application or
> the database schema to prevent it from happening.
> I feel schema change is the best way to do it for now as there is no plan to
> implement user privileges in near future. In future when user privileges
> feature is implemented this change could be reverted and restriction can be
> added at application.
> *Current Schema:*
> {noformat}
> ALTER TABLE `SENTRY_USER_DB_PRIVILEGE_MAP`
> ADD CONSTRAINT `SENTRY_USER_DB_PRIVILEGE_MAP_PK` PRIMARY KEY
> (`USER_ID`,`DB_PRIVILEGE_ID`);
> {noformat}
> *Proposed Solution:*
> {noformat}
> ALTER TABLE `SENTRY_USER_DB_PRIVILEGE_MAP`
> ADD CONSTRAINT `SENTRY_USER_DB_PRIVILEGE_MAP_PK` PRIMARY KEY
> (`DB_PRIVILEGE_ID`);
> {noformat}
> With this change DB_PRIVILEGE_ID would be the primary key and this restrict
> same privilege to be granted to another user.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)