github-actions[bot] commented on code in PR #62747:
URL: https://github.com/apache/doris/pull/62747#discussion_r3129617489
##########
fe/fe-core/src/main/java/org/apache/doris/job/extensions/insert/streaming/StreamingInsertJob.java:
##########
@@ -297,6 +307,50 @@ private void init() {
}
}
+ private void resolveCloudCluster() throws AnalysisException {
+ String requested = validateComputeGroupProperty(properties);
+ if (requested != null) {
+ this.cloudCluster = requested;
Review Comment:
`validateComputeGroupProperty()` only covers the explicit `compute_group`
property. If the property is absent, this fallback stores
`ConnectContext.get().getCloudCluster()` directly. That is still unsafe for the
non-TVF path, because `ConnectContext.getCloudCluster()` returns
`session.cloud_cluster` immediately when it is set, and `SET cloud_cluster =
...` is not privilege-checked in `SetSessionVarOp` / `VariableMgr`. A user can
therefore do `SET cloud_cluster='cg_b'; CREATE JOB ... FROM MYSQL ...` with no
`compute_group`, and the job will persist `cg_b`; later
`StreamingMultiTblTask.sendWriteRequest()` and the `JdbcSourceOffsetProvider`
RPCs route to `StreamingJobUtils.selectBackend(cloudCluster)` directly, never
going through `CloudEnv.checkCloudClusterPriv()` /
`CloudCoordinator.prepare()`. This is distinct from the already-raised
explicit-`compute_group` issue because the property is absent here, so
`validateComputeGroupProperty()` is never entered. Please validate the fallbac
k cluster before persisting it, or reject session-sourced clusters for the
non-TVF path unless they have already been privilege-checked.
--
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]