[
https://issues.apache.org/jira/browse/IMPALA-14884?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Fang-Yu Rao closed IMPALA-14884.
--------------------------------
Fix Version/s: Impala 5.0.0
Target Version: Impala 5.0.0
Resolution: Fixed
The patch has been merged.
> Consider supporting SHOW CURRENT GROUPS statement
> -------------------------------------------------
>
> Key: IMPALA-14884
> URL: https://issues.apache.org/jira/browse/IMPALA-14884
> Project: IMPALA
> Issue Type: Task
> Reporter: Fang-Yu Rao
> Assignee: Fang-Yu Rao
> Priority: Major
> Fix For: Impala 5.0.0
>
>
> Impala uses [RangerAuthorizationChecker#getUserGroups(User
> user)|https://github.com/apache/impala/blob/764e225292e07a8de11ed924dbdde4c9221b5ff8/fe/src/main/java/org/apache/impala/authorization/ranger/RangerAuthorizationChecker.java#L567-L578]
> to resolve the groups of a given user during authorization.
> {code:java}
> public Set<String> getUserGroups(User user) throws InternalException {
> Preconditions.checkNotNull(user);
> UserGroupInformation ugi;
> if (RuntimeEnv.INSTANCE.isTestEnv() ||
> BackendConfig.INSTANCE.useCustomizedUserGroupsMapperForRanger()) {
> ugi = UserGroupInformation.createUserForTesting(user.getShortName(),
> new String[]{user.getShortName()});
> } else {
> ugi = UserGroupInformation.createRemoteUser(user.getShortName());
> }
> return new HashSet<>(ugi.getGroups());
> }
> {code}
> It would be very helpful if Impala supports the {{SHOW CURRENT GROUPS}}
> statement that lists the groups associated with the current/effective user,
> especially when it's not easy to retrieve such information in an environment
> where the related command line tools are not installed.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)