@Test public void getOwnerFromGrpcClient() throws Exception { mConfiguration.set(PropertyKey.SECURITY_AUTHENTICATION_TYPE, AuthType.NOSASL.getAuthName()); assertEquals("", SecurityUtils.getOwnerFromGrpcClient(mConfiguration)); mConfiguration.set(PropertyKey.SECURITY_AUTHENTICATION_TYPE, AuthType.SIMPLE.getAuthName()); mConfiguration.set(PropertyKey.SECURITY_GROUP_MAPPING_CLASS, IdentityUserGroupsMapping.class.getName()); AuthenticatedClientUser.set("test_client_user"); assertEquals("test_client_user", SecurityUtils.getOwnerFromGrpcClient(mConfiguration)); }
public static String getOwnerFromGrpcClient(AlluxioConfiguration conf) { try { User user = AuthenticatedClientUser.get(conf); if (user == null) { return ""; } return user.getName(); } catch (IOException e) { return ""; } }
SecurityUtils { public static String getOwnerFromGrpcClient(AlluxioConfiguration conf) { try { User user = AuthenticatedClientUser.get(conf); if (user == null) { return ""; } return user.getName(); } catch (IOException e) { return ""; } } }
SecurityUtils { public static String getOwnerFromGrpcClient(AlluxioConfiguration conf) { try { User user = AuthenticatedClientUser.get(conf); if (user == null) { return ""; } return user.getName(); } catch (IOException e) { return ""; } } private  SecurityUtils(); }
SecurityUtils { public static String getOwnerFromGrpcClient(AlluxioConfiguration conf) { try { User user = AuthenticatedClientUser.get(conf); if (user == null) { return ""; } return user.getName(); } catch (IOException e) { return ""; } } private  SecurityUtils(); static boolean isSecurityEnabled(AlluxioConfiguration conf); static boolean isAuthenticationEnabled(AlluxioConfiguration conf); static boolean isAuthorizationEnabled(AlluxioConfiguration conf); static String getOwnerFromGrpcClient(AlluxioConfiguration conf); static String getGroupFromGrpcClient(AlluxioConfiguration conf); static String getOwner(UserState userState); static String getGroup(UserState userState, AlluxioConfiguration conf); static LoginContext createLoginContext(AuthType authType, Subject subject,
      ClassLoader classLoader, Configuration configuration, CallbackHandler callbackHandler); }
SecurityUtils { public static String getOwnerFromGrpcClient(AlluxioConfiguration conf) { try { User user = AuthenticatedClientUser.get(conf); if (user == null) { return ""; } return user.getName(); } catch (IOException e) { return ""; } } private  SecurityUtils(); static boolean isSecurityEnabled(AlluxioConfiguration conf); static boolean isAuthenticationEnabled(AlluxioConfiguration conf); static boolean isAuthorizationEnabled(AlluxioConfiguration conf); static String getOwnerFromGrpcClient(AlluxioConfiguration conf); static String getGroupFromGrpcClient(AlluxioConfiguration conf); static String getOwner(UserState userState); static String getGroup(UserState userState, AlluxioConfiguration conf); static LoginContext createLoginContext(AuthType authType, Subject subject,
      ClassLoader classLoader, Configuration configuration, CallbackHandler callbackHandler);  }