JingsongLi commented on PR #8112:
URL: https://github.com/apache/paimon/pull/8112#issuecomment-4637973449

   I think `getTableVia` loses the `via` authorization semantics after the 
table is returned.
   
   At `PrivilegedCatalog.java:162-166`, the wrapped table returned by 
`wrapped.getTableVia(table, via)` is re-wrapped with `identifier = table`. 
Later read methods in `PrivilegedFileStoreTable` check that identifier 
(`newSnapshotReader`, `statistics`, `store`, scans/reads through the privileged 
store, etc.). So a user who is allowed to select the view `via`, but not the 
base table `table`, can pass `getTableVia(...)` and then still fail when trying 
to read the returned table.
   
   For view penetration, the read path probably needs to preserve the `via` 
authorization context after `getTableVia` succeeds. Write/insert paths should 
still be handled carefully so selecting through a view does not grant write 
permission to the base table.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to