You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "Akshat-Jain (via GitHub)" <gi...@apache.org> on 2026/03/13 05:46:04 UTC

[PR] Fix authorization failure for table(append(...)) queries caused by quoted datasource names in resource check (druid)

Akshat-Jain opened a new pull request, #19147:
URL: https://github.com/apache/druid/pull/19147

   ### Description
   
   Problem: `SELECT * FROM TABLE(APPEND('testTable1', 'testTable2'))` was returning 403 Forbidden even when the user has READ permission on both datasources, because the authorization check was matching against quoted names (`'testTable1'`) instead of unquoted names (`testTable1`).
   
   This PR's changes are the following:
     - Fix 403 authorization error when querying with `TABLE(APPEND(...))` syntax
     - `TableAppendMacro#computeResources()` was using `operand.toString()` which included SQL quotes around datasource names (e.g., `'testTable1'` instead of `testTable1`), causing permission matching to fail
     - Changed to `((SqlLiteral) operand).getValueAs(String.class)` to extract the unquoted datasource name
     - Added resource analysis test for `TABLE(APPEND(...))` in `DruidPlannerResourceAnalyzeTest`. Also verified with basic-security enabled, `select * from table(append('t1','t2'))` succeeds for a user with READ permission on `t1` and `t2`
   
   <hr>
   
   This PR has:
   
   - [x] been self-reviewed.


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] Fix authorization failure for table(append(...)) queries caused by quoted datasource names in resource check (druid)

Posted by "Akshat-Jain (via GitHub)" <gi...@apache.org>.
Akshat-Jain merged PR #19147:
URL: https://github.com/apache/druid/pull/19147


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org