You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2021/11/16 06:08:21 UTC

[GitHub] [iotdb] BraggingMan opened a new issue #4399: [0.12.4]用户与角色UDF权限赋予问题,非root用户查询返回空值时,报错"Msg: 602: No permissions for this operation UDTF"

BraggingMan opened a new issue #4399:
URL: https://github.com/apache/iotdb/issues/4399


   **Describe the bug**
   iotdb 0.12.4修复了0.12.2版本中用户与角色UDF权限赋予非root无法正确生效的问题,可参考[Issue-4308](https://github.com/apache/iotdb/issues/4308)。但是当我们使用非root用户进行UDF查询时,如果查询的值不存在,依然报错"Msg: 602: No permissions for this operation UDTF"。这会给用户误导。希望可以在新版本中修复。
   
   **To Reproduce**
   Steps to reproduce the behavior:
   1. 使用root用户登录sbin/start-cli.sh -h 127.0.0.1 -p 6667 -u root -pw root
   2. 创建非root用户并赋权:
       CREATE ROLE udtf_test 'udtf_passwd'
       CREATE ROLE udtf_test_role
       GRANT ROLE udtf_test_role PRIVILEGES 'SET_STORAGE_GROUP','CREATE_TIMESERIES','INSERT_TIMESERIES','READ_TIMESERIES','DELETE_TIMESERIES','DROP_FUNCTION','CREATE_FUNCTION' ON root.test
       GRANT udtf_test_role TO udtf_test
   
   3.  使用root用户查询:
       select WTUR_PwrAt_Ra_F32 from root.test.20.123456789 where time >= 2021-01-01 and time<= 2021-01-31 23:59:59
   +----+
   |Time|
   +----+
   +----+
   
   4. 使用udtf_test用户查询:Msg: 602: No permissions for this operation UDTF。
   
   5. 执行命令,导入数据:
       insert into root.test.20.123456789(time, WTUR_PwrAt_Ra_F32) values(1,1)
   6. root用户和用户分别使用相同命令查询,得到相同的结果如下:
       select WTUR_PwrAt_Ra_F32 from root.test.20.123456789 where time >= 2021-01-01 and time<= 2021-01-31 23:59:59
   +----+-----------------------------------------+
   |Time|root.test.20.123456789.WTUR_PwrAt_Ra_F32|
   +----+-----------------------------------------+
   +----+-----------------------------------------+
   
   **Expected behavior**
   非root用户查询空表格时,应正确返回空值,而非报权限错误,这会使用户产生误解。
   
   Desktop (please complete the following information):
   
   OS: Amazon Linux


-- 
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: reviews-unsubscribe@iotdb.apache.org

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



[GitHub] [iotdb] yifuzhou commented on issue #4399: [v0.12.4]用户与角色UDF权限赋予问题,非root用户查询返回空值时,报错"Msg: 602: No permissions for this operation UDTF"

Posted by GitBox <gi...@apache.org>.
yifuzhou commented on issue #4399:
URL: https://github.com/apache/iotdb/issues/4399#issuecomment-1056842645


   I met this problem as well, I will fix it.


-- 
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: reviews-unsubscribe@iotdb.apache.org

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