You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sentry.apache.org by An Qin <aq...@qilinsoft.com> on 2016/10/13 08:57:44 UTC

How does Sentry authorize SQL Insert

Hi,

 

I developed a system with Sentry to authorize SQL users. When I execute
an insert SQL (insert into ...), I notice that it fires 3
PreReadTableEvents, and then a PreAlterTableEvent to
MetastoreAuthzBinding. Why is there a PreAlterTableEvent for this SQL?
The user has no permission to insert this table, so it throws a
MetaException for this event. This exception is sent to client side.
However, the data *is* inserted! How to response these pre events? Is it
a bug?

 

Thank you!

 

 

Qin An.

 


Re: How does Sentry authorize SQL Insert

Posted by Lenni Kuff <ls...@cloudera.com>.
Hi,
That does sound like a potential bug. What privileges have been granted to
the user (you can use SHOW CURRENT ROLES and SHOW GRANT ROLE to view the
privileges). Can you also share the full INSERT statement? We should follow
up with a JIRA if this is an issue.

Thanks,
Lenni

On Thu, Oct 13, 2016 at 4:57 AM, An Qin <aq...@qilinsoft.com> wrote:

> Hi,
>
>
>
> I developed a system with Sentry to authorize SQL users. When I execute
> an insert SQL (insert into ...), I notice that it fires 3
> PreReadTableEvents, and then a PreAlterTableEvent to
> MetastoreAuthzBinding. Why is there a PreAlterTableEvent for this SQL?
> The user has no permission to insert this table, so it throws a
> MetaException for this event. This exception is sent to client side.
> However, the data *is* inserted! How to response these pre events? Is it
> a bug?
>
>
>
> Thank you!
>
>
>
>
>
> Qin An.
>
>
>
>