@Test public void testGetAllRolesPrivileges() throws Exception { Map<String, Set<TSentryPrivilege>> allPrivileges; allPrivileges = sentryStore.getAllRolesPrivileges(); assertNotNull(allPrivileges); assertTrue(allPrivileges.isEmpty()); final String ROLE1 = "role1"; final TSentryPrivilege ROLE1_PRIV1 = toTSentryPrivilege("ALL", "TABLE", "server1", "db1", "table1"); final TSentryPrivilege ROLE1_PRIV2 = toTSentryPrivilege("SELECT", "TABLE", "server1", "db1", "table2"); createRole(ROLE1); sentryStore.alterSentryGrantPrivileges(SentryPrincipalType.ROLE, ROLE1, Sets.newHashSet(ROLE1_PRIV1), null); sentryStore.alterSentryGrantPrivileges(SentryPrincipalType.ROLE, ROLE1, Sets.newHashSet(ROLE1_PRIV2), null); final String ROLE2 = "role2"; final TSentryPrivilege ROLE2_PRIV1 = toTSentryPrivilege("INSERT", "DATABASE", "server1", "db1", ""); final TSentryPrivilege ROLE2_PRIV2 = toTSentryPrivilege("ALL", "SERVER", "server1", "", ""); createRole(ROLE2); sentryStore.alterSentryGrantPrivileges(SentryPrincipalType.ROLE, ROLE2, Sets.newHashSet(ROLE2_PRIV1), null); sentryStore.alterSentryGrantPrivileges(SentryPrincipalType.ROLE, ROLE2, Sets.newHashSet(ROLE2_PRIV2), null); final String ROLE3 = "role3"; createRole(ROLE3); allPrivileges = sentryStore.getAllRolesPrivileges(); assertEquals(3, allPrivileges.size()); assertEquals(2, allPrivileges.get(ROLE1).size()); assertTrue(allPrivileges.get(ROLE1).contains(ROLE1_PRIV1)); assertTrue(allPrivileges.get(ROLE1).contains(ROLE1_PRIV2)); assertEquals(2, allPrivileges.get(ROLE2).size()); assertTrue(allPrivileges.get(ROLE2).contains(ROLE2_PRIV1)); assertTrue(allPrivileges.get(ROLE2).contains(ROLE2_PRIV2)); assertEquals(0, allPrivileges.get(ROLE3).size()); }
@Override public Map<String, Set<TSentryPrivilege>> getAllRolesPrivileges() throws Exception { return tm.executeTransaction( pm -> { pm.setDetachAllOnCommit(false); Query query = pm.newQuery(MSentryRole.class); query.addExtension(LOAD_RESULTS_AT_COMMIT, "false"); FetchGroup grp = pm.getFetchGroup(MSentryRole.class, "fetchPrivileges"); grp.addMember("privileges"); pm.getFetchPlan().addGroup("fetchPrivileges"); List<MSentryRole> mSentryRoles = (List<MSentryRole>)query.execute(); if (mSentryRoles == null || mSentryRoles.isEmpty()) { return Collections.emptyMap(); } Map<String, Set<TSentryPrivilege>> allRolesPrivileges = Maps.newHashMap(); for (MSentryRole mSentryRole : mSentryRoles) { Set<TSentryPrivilege> tPrivileges = convertToTSentryPrivileges(mSentryRole.getPrivileges()); allRolesPrivileges.put(mSentryRole.getRoleName(), tPrivileges); } return allRolesPrivileges; } ); }
SentryStore implements SentryStoreInterface { @Override public Map<String, Set<TSentryPrivilege>> getAllRolesPrivileges() throws Exception { return tm.executeTransaction( pm -> { pm.setDetachAllOnCommit(false); Query query = pm.newQuery(MSentryRole.class); query.addExtension(LOAD_RESULTS_AT_COMMIT, "false"); FetchGroup grp = pm.getFetchGroup(MSentryRole.class, "fetchPrivileges"); grp.addMember("privileges"); pm.getFetchPlan().addGroup("fetchPrivileges"); List<MSentryRole> mSentryRoles = (List<MSentryRole>)query.execute(); if (mSentryRoles == null || mSentryRoles.isEmpty()) { return Collections.emptyMap(); } Map<String, Set<TSentryPrivilege>> allRolesPrivileges = Maps.newHashMap(); for (MSentryRole mSentryRole : mSentryRoles) { Set<TSentryPrivilege> tPrivileges = convertToTSentryPrivileges(mSentryRole.getPrivileges()); allRolesPrivileges.put(mSentryRole.getRoleName(), tPrivileges); } return allRolesPrivileges; } ); } }
SentryStore implements SentryStoreInterface { @Override public Map<String, Set<TSentryPrivilege>> getAllRolesPrivileges() throws Exception { return tm.executeTransaction( pm -> { pm.setDetachAllOnCommit(false); Query query = pm.newQuery(MSentryRole.class); query.addExtension(LOAD_RESULTS_AT_COMMIT, "false"); FetchGroup grp = pm.getFetchGroup(MSentryRole.class, "fetchPrivileges"); grp.addMember("privileges"); pm.getFetchPlan().addGroup("fetchPrivileges"); List<MSentryRole> mSentryRoles = (List<MSentryRole>)query.execute(); if (mSentryRoles == null || mSentryRoles.isEmpty()) { return Collections.emptyMap(); } Map<String, Set<TSentryPrivilege>> allRolesPrivileges = Maps.newHashMap(); for (MSentryRole mSentryRole : mSentryRoles) { Set<TSentryPrivilege> tPrivileges = convertToTSentryPrivileges(mSentryRole.getPrivileges()); allRolesPrivileges.put(mSentryRole.getRoleName(), tPrivileges); } return allRolesPrivileges; } ); } SentryStore(Configuration conf); }
SentryStore implements SentryStoreInterface { @Override public Map<String, Set<TSentryPrivilege>> getAllRolesPrivileges() throws Exception { return tm.executeTransaction( pm -> { pm.setDetachAllOnCommit(false); Query query = pm.newQuery(MSentryRole.class); query.addExtension(LOAD_RESULTS_AT_COMMIT, "false"); FetchGroup grp = pm.getFetchGroup(MSentryRole.class, "fetchPrivileges"); grp.addMember("privileges"); pm.getFetchPlan().addGroup("fetchPrivileges"); List<MSentryRole> mSentryRoles = (List<MSentryRole>)query.execute(); if (mSentryRoles == null || mSentryRoles.isEmpty()) { return Collections.emptyMap(); } Map<String, Set<TSentryPrivilege>> allRolesPrivileges = Maps.newHashMap(); for (MSentryRole mSentryRole : mSentryRoles) { Set<TSentryPrivilege> tPrivileges = convertToTSentryPrivileges(mSentryRole.getPrivileges()); allRolesPrivileges.put(mSentryRole.getRoleName(), tPrivileges); } return allRolesPrivileges; } ); } SentryStore(Configuration conf); static Properties getDataNucleusProperties(Configuration conf); void setPersistUpdateDeltas(boolean persistUpdateDeltas); TransactionManager getTransactionManager(); CounterWait getCounterWait(); synchronized void stop(); MSentryRole getRole(PersistenceManager pm, String roleName); @SuppressWarnings("unchecked") List<MSentryRole> getAllRoles(PersistenceManager pm); MSentryUser getUser(PersistenceManager pm, String userName); void createSentryUser(final String userName); void createSentryRole(final String roleName); Gauge<Long> getRoleCountGauge(); Gauge<Long> getPrivilegeCountGauge(); Gauge<Long> getGenericModelPrivilegeCountGauge(); Gauge<Long> getGroupCountGauge(); Gauge<Long> getAuthzObjectsCountGauge(); Gauge<Long> getAuthzPathsCountGauge(); Gauge<Integer> getHMSWaitersCountGauge(); Gauge<Long> getLastNotificationIdGauge(); Gauge<Long> getLastPathsSnapshotIdGauge(); Gauge<Long> getPermChangeIdGauge(); Gauge<Long> getPathChangeIdGauge(); void clearHmsPathInformation(); void purgeDeltaChangeTables(); void purgeNotificationIdTable(); @Override void alterSentryRoleGrantPrivileges(final String roleName,
    final Set<TSentryPrivilege> privileges); @Override void alterSentryRoleGrantPrivileges(final String roleName,
    final Set<TSentryPrivilege> privileges,
    final Map<TSentryPrivilege, Update> privilegesUpdateMap); void alterSentryUserGrantPrivileges(final String userName,
    final Set<TSentryPrivilege> privileges); void alterSentryGrantOwnerPrivilege(final String principalName, SentryPrincipalType entityType,
                                              final TSentryPrivilege privilege,
                                              final Update update); @VisibleForTesting MSentryUser getMSentryUserByName(final String userName); void alterSentryUserRevokePrivileges(final String userName,
    final Set<TSentryPrivilege> tPrivileges); @Override void alterSentryRoleRevokePrivileges(final String roleName,
    final Set<TSentryPrivilege> tPrivileges); @Override void alterSentryRoleRevokePrivileges(final String roleName, final Set<TSentryPrivilege> tPrivileges,
    final Map<TSentryPrivilege, Update> privilegesUpdateMap); void dropSentryUser(final String userName); synchronized void dropSentryUser(final String userName,
      final Update update); void dropSentryRole(final String roleName); synchronized void dropSentryRole(final String roleName,
      final Update update); void alterSentryRoleAddGroups(final String grantorPrincipal,
      final String roleName, final Set<TSentryGroup> groupNames); synchronized void alterSentryRoleAddGroups(final String grantorPrincipal,
      final String roleName, final Set<TSentryGroup> groupNames,
      final Update update); void alterSentryRoleAddUsers(final String roleName,
      final Set<String> userNames); void alterSentryRoleDeleteUsers(final String roleName,
      final Set<String> userNames); void alterSentryRoleDeleteGroups(final String roleName,
      final Set<TSentryGroup> groupNames); synchronized void alterSentryRoleDeleteGroups(final String roleName,
      final Set<TSentryGroup> groupNames, final Update update); @VisibleForTesting MSentryRole getMSentryRoleByName(final String roleName); Set<TSentryPrivilege> getAllTSentryPrivilegesByUserName(String userName); TSentryPrivilegeMap listSentryPrivilegesByAuthorizable(Set<String> groups,
      TSentryActiveRoleSet activeRoles,
      TSentryAuthorizable authHierarchy, boolean isAdmin); List<SentryOwnerInfo> listOwnersByAuthorizable(TSentryAuthorizable authorizable); TSentryPrivilegeMap listSentryPrivilegesByAuthorizableForUser(Set<String> userNames,
      TSentryAuthorizable authHierarchy, boolean isAdmin); Set<TSentryPrivilege> getAllTSentryPrivilegesByRoleName(String roleName); Set<TSentryPrivilege> getTSentryPrivileges(SentryPrincipalType principalType, Set<String> principalNames,
                                                    TSentryAuthorizable authHierarchy); Set<TSentryRole> getTSentryRolesByGroupName(final Set<String> groupNames,
                                                     final boolean checkAllGroups); Set<String> getRoleNamesForGroups(final Set<String> groups); Set<String> getRoleNamesForUsers(final Set<String> users); Set<TSentryRole> getTSentryRolesByUserNames(final Set<String> users); Set<MSentryRole> getRolesForGroups(PersistenceManager pm, Set<String> groups); @Override Set<TSentryPrivilege> listSentryPrivilegesByUsersAndGroups(
      Set<String> groups, Set<String> users, TSentryActiveRoleSet roleSet,
      TSentryAuthorizable authHierarchy); Set<String> listSentryPrivilegesForProvider(
      Set<String> groups, Set<String> users, TSentryActiveRoleSet roleSet,
      TSentryAuthorizable authHierarchy); boolean hasAnyServerPrivileges(Set<String> groups, Set<String> users,
      TSentryActiveRoleSet roleSet, String server); @VisibleForTesting static Set<String> toTrimedLower(Set<String> s); void dropPrivilege(final TSentryAuthorizable tAuthorizable); synchronized void dropPrivilege(final TSentryAuthorizable tAuthorizable,
      final Update update); synchronized void updateOwnerPrivilege(final TSentryAuthorizable tAuthorizable,
      String ownerName,  SentryPrincipalType principalType,
      final List<Update> updates); void revokeOwnerPrivilegesCore(PersistenceManager pm, final TSentryAuthorizable tAuthorizable); void renamePrivilege(final TSentryAuthorizable oldTAuthorizable,
      final TSentryAuthorizable newTAuthorizable); synchronized void renamePrivilege(final TSentryAuthorizable oldTAuthorizable,
      final TSentryAuthorizable newTAuthorizable, final Update update); static String toNULLCol(String s); PermissionsImage retrieveFullPermssionsImage(); PathsUpdate retrieveFullPathsImageUpdate(final String[] prefixes); void persistFullPathsImage(final Map<String, Collection<String>> authzPaths,
      final long notificationID); void logPersistingFullSnapshotState(int totalNumberOfObjectsToPersist,
      int totalNumberOfPathsToPersist, int objectsPersistedCount, int pathsPersistedCount); void addAuthzPathsMapping(final String authzObj, final Collection<String> paths,
      final UniquePathsUpdate update); void deleteAuthzPathsMapping(final String authzObj, final Collection<String> paths,
      final UniquePathsUpdate update); void deleteAllAuthzPathsMapping(final String authzObj, final UniquePathsUpdate update); void renameAuthzPathsMapping(final String oldObj, final String newObj,
      final String oldPath, final String newPath, final UniquePathsUpdate update); void renameAuthzObj(final String oldObj, final String newObj,
      final UniquePathsUpdate update); boolean isAuthzPathsMappingEmpty(); boolean isHmsNotificationEmpty(); boolean isAuthzPathsSnapshotEmpty(); void updateAuthzPathsMapping(final String authzObj, final String oldPath,
        final String newPath, final UniquePathsUpdate update); @SuppressWarnings("unchecked") List<Map<String, Set<String>>> getGroupUserRoleMapList(final Collection<String> roleNames); List<MSentryPrivilege> getPrivilegesForAuthorizables(List<TSentryAuthorizable> authHierarchyList); Map<String, Set<TSentryPrivilege>> getRoleNameTPrivilegesMap(final String dbName,
        final String tableName); Set<String> getAllRoleNames(); void importSentryMetaData(final TSentryMappingData tSentryMappingData,
      final boolean isOverwriteForRole); static Set<String> rolesToRoleNames(final Iterable<MSentryRole> roles); void setLastProcessedNotificationID(final Long notificationId); void persistLastProcessedNotificationID(final Long notificationId); Long getLastProcessedPermChangeID(); Long getLastProcessedPathChangeID(); Long getLastProcessedNotificationID(); long getLastProcessedImageID(); MSentryPermChange getMSentryPermChangeByID(final long changeID); Boolean permChangeExists(final long changeID); Boolean pathChangeExists(final long changeID); MSentryPathChange getMSentryPathChangeByID(final long changeID); List<MSentryPathChange> getMSentryPathChanges(final long changeID); List<MSentryPermChange> getMSentryPermChanges(final long changeID); boolean validateDeltaChanges(final long changeID, List<T> changes); boolean isNotificationProcessed(final String hash); PrivilegePrincipal getEntity(PersistenceManager pm, String name, SentryPrincipalType type); @Override Map<String, Set<TSentryPrivilege>> getAllRolesPrivileges(); @Override Map<String, Set<TSentryPrivilege>> getAllUsersPrivileges(); }
SentryStore implements SentryStoreInterface { @Override public Map<String, Set<TSentryPrivilege>> getAllRolesPrivileges() throws Exception { return tm.executeTransaction( pm -> { pm.setDetachAllOnCommit(false); Query query = pm.newQuery(MSentryRole.class); query.addExtension(LOAD_RESULTS_AT_COMMIT, "false"); FetchGroup grp = pm.getFetchGroup(MSentryRole.class, "fetchPrivileges"); grp.addMember("privileges"); pm.getFetchPlan().addGroup("fetchPrivileges"); List<MSentryRole> mSentryRoles = (List<MSentryRole>)query.execute(); if (mSentryRoles == null || mSentryRoles.isEmpty()) { return Collections.emptyMap(); } Map<String, Set<TSentryPrivilege>> allRolesPrivileges = Maps.newHashMap(); for (MSentryRole mSentryRole : mSentryRoles) { Set<TSentryPrivilege> tPrivileges = convertToTSentryPrivileges(mSentryRole.getPrivileges()); allRolesPrivileges.put(mSentryRole.getRoleName(), tPrivileges); } return allRolesPrivileges; } ); } SentryStore(Configuration conf); static Properties getDataNucleusProperties(Configuration conf); void setPersistUpdateDeltas(boolean persistUpdateDeltas); TransactionManager getTransactionManager(); CounterWait getCounterWait(); synchronized void stop(); MSentryRole getRole(PersistenceManager pm, String roleName); @SuppressWarnings("unchecked") List<MSentryRole> getAllRoles(PersistenceManager pm); MSentryUser getUser(PersistenceManager pm, String userName); void createSentryUser(final String userName); void createSentryRole(final String roleName); Gauge<Long> getRoleCountGauge(); Gauge<Long> getPrivilegeCountGauge(); Gauge<Long> getGenericModelPrivilegeCountGauge(); Gauge<Long> getGroupCountGauge(); Gauge<Long> getAuthzObjectsCountGauge(); Gauge<Long> getAuthzPathsCountGauge(); Gauge<Integer> getHMSWaitersCountGauge(); Gauge<Long> getLastNotificationIdGauge(); Gauge<Long> getLastPathsSnapshotIdGauge(); Gauge<Long> getPermChangeIdGauge(); Gauge<Long> getPathChangeIdGauge(); void clearHmsPathInformation(); void purgeDeltaChangeTables(); void purgeNotificationIdTable(); @Override void alterSentryRoleGrantPrivileges(final String roleName,
    final Set<TSentryPrivilege> privileges); @Override void alterSentryRoleGrantPrivileges(final String roleName,
    final Set<TSentryPrivilege> privileges,
    final Map<TSentryPrivilege, Update> privilegesUpdateMap); void alterSentryUserGrantPrivileges(final String userName,
    final Set<TSentryPrivilege> privileges); void alterSentryGrantOwnerPrivilege(final String principalName, SentryPrincipalType entityType,
                                              final TSentryPrivilege privilege,
                                              final Update update); @VisibleForTesting MSentryUser getMSentryUserByName(final String userName); void alterSentryUserRevokePrivileges(final String userName,
    final Set<TSentryPrivilege> tPrivileges); @Override void alterSentryRoleRevokePrivileges(final String roleName,
    final Set<TSentryPrivilege> tPrivileges); @Override void alterSentryRoleRevokePrivileges(final String roleName, final Set<TSentryPrivilege> tPrivileges,
    final Map<TSentryPrivilege, Update> privilegesUpdateMap); void dropSentryUser(final String userName); synchronized void dropSentryUser(final String userName,
      final Update update); void dropSentryRole(final String roleName); synchronized void dropSentryRole(final String roleName,
      final Update update); void alterSentryRoleAddGroups(final String grantorPrincipal,
      final String roleName, final Set<TSentryGroup> groupNames); synchronized void alterSentryRoleAddGroups(final String grantorPrincipal,
      final String roleName, final Set<TSentryGroup> groupNames,
      final Update update); void alterSentryRoleAddUsers(final String roleName,
      final Set<String> userNames); void alterSentryRoleDeleteUsers(final String roleName,
      final Set<String> userNames); void alterSentryRoleDeleteGroups(final String roleName,
      final Set<TSentryGroup> groupNames); synchronized void alterSentryRoleDeleteGroups(final String roleName,
      final Set<TSentryGroup> groupNames, final Update update); @VisibleForTesting MSentryRole getMSentryRoleByName(final String roleName); Set<TSentryPrivilege> getAllTSentryPrivilegesByUserName(String userName); TSentryPrivilegeMap listSentryPrivilegesByAuthorizable(Set<String> groups,
      TSentryActiveRoleSet activeRoles,
      TSentryAuthorizable authHierarchy, boolean isAdmin); List<SentryOwnerInfo> listOwnersByAuthorizable(TSentryAuthorizable authorizable); TSentryPrivilegeMap listSentryPrivilegesByAuthorizableForUser(Set<String> userNames,
      TSentryAuthorizable authHierarchy, boolean isAdmin); Set<TSentryPrivilege> getAllTSentryPrivilegesByRoleName(String roleName); Set<TSentryPrivilege> getTSentryPrivileges(SentryPrincipalType principalType, Set<String> principalNames,
                                                    TSentryAuthorizable authHierarchy); Set<TSentryRole> getTSentryRolesByGroupName(final Set<String> groupNames,
                                                     final boolean checkAllGroups); Set<String> getRoleNamesForGroups(final Set<String> groups); Set<String> getRoleNamesForUsers(final Set<String> users); Set<TSentryRole> getTSentryRolesByUserNames(final Set<String> users); Set<MSentryRole> getRolesForGroups(PersistenceManager pm, Set<String> groups); @Override Set<TSentryPrivilege> listSentryPrivilegesByUsersAndGroups(
      Set<String> groups, Set<String> users, TSentryActiveRoleSet roleSet,
      TSentryAuthorizable authHierarchy); Set<String> listSentryPrivilegesForProvider(
      Set<String> groups, Set<String> users, TSentryActiveRoleSet roleSet,
      TSentryAuthorizable authHierarchy); boolean hasAnyServerPrivileges(Set<String> groups, Set<String> users,
      TSentryActiveRoleSet roleSet, String server); @VisibleForTesting static Set<String> toTrimedLower(Set<String> s); void dropPrivilege(final TSentryAuthorizable tAuthorizable); synchronized void dropPrivilege(final TSentryAuthorizable tAuthorizable,
      final Update update); synchronized void updateOwnerPrivilege(final TSentryAuthorizable tAuthorizable,
      String ownerName,  SentryPrincipalType principalType,
      final List<Update> updates); void revokeOwnerPrivilegesCore(PersistenceManager pm, final TSentryAuthorizable tAuthorizable); void renamePrivilege(final TSentryAuthorizable oldTAuthorizable,
      final TSentryAuthorizable newTAuthorizable); synchronized void renamePrivilege(final TSentryAuthorizable oldTAuthorizable,
      final TSentryAuthorizable newTAuthorizable, final Update update); static String toNULLCol(String s); PermissionsImage retrieveFullPermssionsImage(); PathsUpdate retrieveFullPathsImageUpdate(final String[] prefixes); void persistFullPathsImage(final Map<String, Collection<String>> authzPaths,
      final long notificationID); void logPersistingFullSnapshotState(int totalNumberOfObjectsToPersist,
      int totalNumberOfPathsToPersist, int objectsPersistedCount, int pathsPersistedCount); void addAuthzPathsMapping(final String authzObj, final Collection<String> paths,
      final UniquePathsUpdate update); void deleteAuthzPathsMapping(final String authzObj, final Collection<String> paths,
      final UniquePathsUpdate update); void deleteAllAuthzPathsMapping(final String authzObj, final UniquePathsUpdate update); void renameAuthzPathsMapping(final String oldObj, final String newObj,
      final String oldPath, final String newPath, final UniquePathsUpdate update); void renameAuthzObj(final String oldObj, final String newObj,
      final UniquePathsUpdate update); boolean isAuthzPathsMappingEmpty(); boolean isHmsNotificationEmpty(); boolean isAuthzPathsSnapshotEmpty(); void updateAuthzPathsMapping(final String authzObj, final String oldPath,
        final String newPath, final UniquePathsUpdate update); @SuppressWarnings("unchecked") List<Map<String, Set<String>>> getGroupUserRoleMapList(final Collection<String> roleNames); List<MSentryPrivilege> getPrivilegesForAuthorizables(List<TSentryAuthorizable> authHierarchyList); Map<String, Set<TSentryPrivilege>> getRoleNameTPrivilegesMap(final String dbName,
        final String tableName); Set<String> getAllRoleNames(); void importSentryMetaData(final TSentryMappingData tSentryMappingData,
      final boolean isOverwriteForRole); static Set<String> rolesToRoleNames(final Iterable<MSentryRole> roles); void setLastProcessedNotificationID(final Long notificationId); void persistLastProcessedNotificationID(final Long notificationId); Long getLastProcessedPermChangeID(); Long getLastProcessedPathChangeID(); Long getLastProcessedNotificationID(); long getLastProcessedImageID(); MSentryPermChange getMSentryPermChangeByID(final long changeID); Boolean permChangeExists(final long changeID); Boolean pathChangeExists(final long changeID); MSentryPathChange getMSentryPathChangeByID(final long changeID); List<MSentryPathChange> getMSentryPathChanges(final long changeID); List<MSentryPermChange> getMSentryPermChanges(final long changeID); boolean validateDeltaChanges(final long changeID, List<T> changes); boolean isNotificationProcessed(final String hash); PrivilegePrincipal getEntity(PersistenceManager pm, String name, SentryPrincipalType type); @Override Map<String, Set<TSentryPrivilege>> getAllRolesPrivileges(); @Override Map<String, Set<TSentryPrivilege>> getAllUsersPrivileges();  }