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

show role grants against object

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      It would be nice to have a command that would show all roles that have grants against a particular object. For example if I do the following commands.

      grant select on table j1 to role analyst;
      grant select on table j1 to role analyst1;
      grant select on table j1 to role analyst2;
      

      I would like to do something like this:

      show grant roles on table j1;
      

      and then it displays something like this:

      +-----------+--------+------------+---------+-----------------+-----------------+------------+---------------+-------------------+----------+
      | database  | table  | partition  | column  | principal_name  | principal_type  | privilege  | grant_option  |    grant_time     | grantor  |
      +-----------+--------+------------+---------+-----------------+-----------------+------------+---------------+-------------------+----------+
      | default   |   j1   |            |         | analyst         | ROLE            | select     | false         | 1416861983065000  | hive     |
      | default   |   j1   |            |         | analyst1        | ROLE            | select     | false         | 1416861983065000  | hive     |
      | default   |   j1   |            |         | analyst2        | ROLE            | select     | false         | 1416861983065000  | hive     |
      +-----------+--------+------------+---------+-----------------+-----------------+------------+---------------+-------------------+----------+
      

      Attachments

        Activity

          People

            johndee Johndee Burks
            johndee Johndee Burks
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: