Uploaded image for project: 'Sentry (Retired)'
  1. Sentry (Retired)
  2. SENTRY-848

[column level privilege] if grant user column level select privilege, DESCRIBE FORMATTED table[.column] shouldn't require extra table level privilege

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • 1.5.1
    • None
    • None
    • None

    Description

      create table test_tb(s string, i int);
      grant select(s) on table test_tb to role test_role;
      grant role test_role to group test_user;
      

      use test_user to login,

      describe formatted test_tb s;
      Error: Error while compiling statement: FAILED: SemanticException No valid privileges
       Required privileges for this query: Server=server1->Db=test_db->Table=test_tb->action=insert;Server=server1->Db=test_db->Table=test_tb->action=select; (state=42000,code=40000)
      

      How about describe [formatted] test_tb; do we allow test_user to list his permitted columns? for example,

      -----------------------------+

      col_name data_type comment

      -----------------------------+

      s string  

      -----------------------------+
      2 rows selected (0.167 seconds)

      However "ANALYZE TABLE test_tb COMPUTE STATISTICS FOR COLUMNS s" is allowed for test_user.

      Attachments

        1. SENTRY-848-001.patch
          12 kB
          Ke Jia
        2. SENTRY-848-002.patch
          12 kB
          Ke Jia
        3. SENTRY-848-002.patch
          12 kB
          Ke Jia
        4. SENTRY-848-003.patch
          14 kB
          Ke Jia

        Issue Links

          Activity

            People

              Jk_Self Ke Jia
              anneyu Anne Yu
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: