github-actions[bot] commented on code in PR #68088:
URL: https://github.com/apache/doris/pull/68088#discussion_r4043546113


##########
fe/fe-core/src/main/java/org/apache/doris/tablefunction/TableBinlogFunction.java:
##########
@@ -126,6 +129,16 @@ public TableBinlogFunction(Map<String, String> params) 
throws AnalysisException
         }
     }
 
+    @Override
+    public void checkAuth(ConnectContext ctx) {
+        if (!Env.getCurrentEnv().getAccessManager().checkTblPriv(ctx, 
InternalCatalog.INTERNAL_CATALOG_NAME,

Review Comment:
   **[P2] Preserve column-scoped SELECT decisions**
   
   This always asks the authorization layer for a `TABLE` decision, but 
ordinary relations send their required column set to `checkColumnsPriv`; the 
built-in `Role.checkTblPriv` does not accept `SELECT_PRIV(k)`, and plugins 
likewise distinguish `TABLE` from `COLUMNS`. A user who can run `SELECT k FROM 
db.t` is therefore newly rejected by `SELECT k FROM binlog(...)` even when `k` 
is the only origin column referenced. `visitLogicalTVFRelation` already has the 
required-slot set but drops it here. Please either propagate/map required TVF 
outputs (map before-image fields to their origin and define a rule for 
TSO/LSN/op fields) and test column/plugin grants, or establish and test an 
explicit table-only security contract. Neither added test distinguishes those 
behaviors.



-- 
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]


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

Reply via email to