String errMsg = "Error authorizing command " + command; try { authorizeCommandThrowEx(ss, type, command);
/** * Authorize command of given type, arguments and for service hosts (for Service Type authorization) * * @param ss - session state * @param type - operation type * @param command - command args * @param serviceObject - service object * @return null if there was no authorization error. Otherwise returns CommandProcessorResponse * capturing the authorization error */ static CommandProcessorResponse authorizeCommandAndServiceObject(SessionState ss, HiveOperationType type, List<String> command, String serviceObject) { if (ss == null) { // ss can be null in unit tests return null; } if (ss.isAuthorizationModeV2() && HiveConf.getBoolVar(ss.getConf(), HiveConf.ConfVars.HIVE_AUTHORIZATION_ENABLED)) { String errMsg = "Error authorizing command " + command; try { authorizeCommandThrowEx(ss, type, command, serviceObject); // authorized to perform action return null; } catch (HiveAuthzPluginException | HiveAccessControlException e) { LOG.error(errMsg, e); return CommandProcessorResponse.create(e); } } return null; }
String errMsg = "Error authorizing command " + command; try { authorizeCommandThrowEx(ss, type, command);
String errMsg = "Error authorizing command " + command; try { authorizeCommandThrowEx(ss, type, command);