JackieTien97 opened a new pull request, #19234: URL: https://github.com/apache/iotdb/pull/19234
## Description Tree-model CQ execution bypasses the normal query authorization step, leaving the parsed query with an unrestricted READ_DATA scope. Check the CQ owner's current permissions before each execution so the query uses the same authorized path filtering and error handling as ordinary tree-model queries. For example, a CQ owner with READ_DATA only on `root.cq_read_auth.source.s1` and WRITE_DATA on `root.cq_read_auth.target.**` runs: ```sql SELECT * INTO root.cq_read_auth.target(::) FROM root.cq_read_auth.source ``` Previously, this also copied `source.s2` into the target without READ_DATA on that series. After this change, only `s1` is copied. Revoking the remaining READ_DATA privilege prevents new rows from being copied, and granting READ_DATA again allows subsequent windows to produce results. Add regression coverage for ordinary queries and ALIGN BY DEVICE. The tests create a CQ with a future schedule boundary and invoke the scheduler's DataNode RPC for fixed windows on every DataNode, covering partial authorization, revocation, and reauthorization without timing-dependent sleeps. ## Validation - Targeted clean reactor `verify` with SimpleIT: 2 tests passed, no failures or skips. - Targeted ClusterIT using the same built node templates: 2 tests passed, no failures or skips. - Full-reactor `mvn test-compile -DskipTests` for the default locale. - Full-reactor `mvn test-compile -DskipTests -P with-zh-locale`. - Spotless and the integration-test selection check passed. This PR has: - [x] been self-reviewed. - [x] added integration tests. - [x] been tested in 1 ConfigNode + 1 DataNode and 1 ConfigNode + 3 DataNode clusters. ##### Key changed classes - `DataNodeInternalRPCServiceImpl` - `IoTDBCQExecIT` -- 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]
