Uploaded image for project: 'Sentry'
  1. Sentry
  2. SENTRY-2520

Show tablescope privileges when using listPrivilegsbyAuthorizable method

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.7.0
    • Fix Version/s: None
    • Component/s: Service
    • Labels:
      None

      Description

      We use sentry1.7 as a privileges control and admin model,kind of like HUE.Now we want list all tables privielges of one db.I try to call method listPrivilegsbyAuthorizable´╝îonly get db level privileges.

      ```

      Map<String, Set<String>> roleToPrivMap = new HashMap<>();
      List<? extends Authorizable> dbAuthrizable = Lists.newArrayList(
      new Server(SERVERNAME), new Database(dbName));

      Set<List<? extends Authorizable>> authorizableSet = Sets.newHashSet();
      authorizableSet.add(dbAuthrizable);

      Map<TSentryAuthorizable, TSentryPrivilegeMap> authPrivMap = client
      .listPrivilegsbyAuthorizable(REQUESTUSER, authorizableSet, null, null);

      ```

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              maixiaohai maixiaohai
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: