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

Csaba Ringhofer commented on IMPALA-9242:
-----------------------------------------

1.
> However, I did not understand why using TreePrivilegeCache directly would 
> double the memory? Is it because you will still need to store them separately 
> for each individual user/role?
If we would want to use TreePrivilegeCache as it is (importing it from Sentry), 
we would still need the CatalogObjectCache in Principal to support updates from 
statestored.  TreePrivilegeCache could be a next layer of cache that would be 
recreated every time there is a privilege added/dropped for the principal.

2.
> I am not very familiar with Ranger implementation. Do we cache privileges for 
> Ranger too?
Ranger seems to do its own caching according to
https://github.com/apache/impala/blob/1bf92120dd4cf7df3fd9764ef9fcb2b061b87644/fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java#L60



> Access check should only check against the privileges of the authorizable
> -------------------------------------------------------------------------
>
>                 Key: IMPALA-9242
>                 URL: https://issues.apache.org/jira/browse/IMPALA-9242
>             Project: IMPALA
>          Issue Type: Improvement
>            Reporter: Vihang Karajgaonkar
>            Assignee: Csaba Ringhofer
>            Priority: Major
>
> Currently, according to the implementation of 
> https://github.com/apache/sentry/blob/branch-2.1.0/sentry-provider/sentry-provider-cache/src/main/java/org/apache/sentry/provider/cache/SimpleCacheProviderBackend.java#L64
> each access check request in Sentry is done against all the privileges of the 
> user. Instead, we can reduce the number of privilege checks significantly, if 
> we use this API in 
> https://github.com/apache/sentry/blob/master/sentry-provider/sentry-provider-cache/src/main/java/org/apache/sentry/provider/cache/PrivilegeCache.java#L46
> Unfortunately, SENTRY-1291 which is merged in master branch of Sentry is 
> unavailable. However, if we can have a interface side changes in 
> PrivilegeCache, Impala can implement a prefix-tree based {{PrivilegeCache}} 
> so that number of privileges returned are only related to the given 
> authorizable. This API can then be used in SimpleCacheProviderBackend to 
> reduce the processing time required to check access for a large number of 
> objects in large setups.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to