Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-17848

Fix incorrect resource name in LIST PERMISSION output

    XMLWordPrintableJSON

Details

    Description

      When producing the resource name, it seems to assume that the content in the `[]` is the function's input type, where it could also be part of the function name, as long as it is quoted. Here is an example to reproduce. In cqlsh,

      > CREATE FUNCTION test."admin_created_udf[org.apache.cassandra.db.marshal.LongType]"(input int) RETURNS NULL ON NULL INPUT RETURNS int LANGUAGE java AS 'return 42;';
      
      > LIST EXECUTE OF user;
       role  | username | resource                                | permission
      -------+----------+-----------------------------------------+------------
       user  |    user  | <function test.admin_created_udf(long)> |    EXECUTE
      
      (1 rows)
      

      The input should be "int", but in the output, it says "long".

      If the content enclosed by "[]" is not a valid class, the LIST PERMISSION request always fails for the user with "ConfigurationException: Unable to find abstract-type class".

      The bug is discovered by Piotr Sarna.

      Attachments

        Issue Links

          Activity

            People

              yifanc Yifan Cai
              yifanc Yifan Cai
              Yifan Cai
              Berenguer Blasi, Sam Tunnicliffe
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m