Hi Team, I'm trying to integrate Apache Ranger wit...
# questions-and-troubleshooting
m
Hi Team, I'm trying to integrate Apache Ranger with StarRocks, all tables are accessible as per policies but if I run any query directly on view it is accessible and showing data even though policy is restricted. Am I missing something here? StarRocks version - 3.4.2 and Ranger - 2.4.1
Could someone check this please?
r
Can you share the ranger policies that you used?
m
I have policies like this in attached screenshot, I have multi tenant architecture.
demo
is one tenant and it should have access to only demo_events,demo tables and demo views, similarly for all different tenants I have same policies, but with demo user I can able to read views directly from other databases but If I run show databases/show tables in otherdb, I can't see any tables/views. If I run
select * from <othertenantdb>.<view>, it is showing data
but same query on table of othertenantdb, it is denying like
Copy code
select * from <othertenantdb>.<table> - access denied
May I know if something wrong here or policies can't be applied to starrocks views?
@Robert Raharjo could you pls check once?
Any inputs on this?
@Robert Raharjo
g
Hi we have same issue with 3.5.12 starrocks, seems view access dont works. In our configuration we create user in starrocks with 0 grants and we even didnt added it in ranger however this user has access to select any views.
Root cause: A bug in StarRocks source code (
ColumnPrivilege.java
). When
access_control = ranger
is enabled, the authorization check for views is completely skipped. The code only performs column-level checks via the query optimizer, but views are not physical scan operators, so the column set comes back empty and no privilege check runs at all. The proper
checkViewAction()
call only exists in the native RBAC branch and is never reached when Ranger is active. https://github.com/StarRocks/starrocks/blob/branch-3.5/fe/fe-core/src/main/java/com/starrocks/authorization/ColumnPrivilege.java
m
@Giorgi Chitashvili any fix for this in latest starrocks version or any bug raised?
g
Hi, seems its no fix or bug reports.