/** * Authorizes request from to the DRPC server. * * @param context the client request context * @param operation the operation requested by the DRPC server * @param params a Map with any key-value entries of use to the authorization implementation */ @Override public boolean permit(ReqContext context, String operation, Map<String, Object> params) { if ("execute".equals(operation)) { return permitClientRequest(context, operation, params); } else if ("failRequest".equals(operation) || "fetchRequest".equals(operation) || "result".equals(operation)) { return permitInvocationRequest(context, operation, params); } // Deny unsupported operations. LOG.warn("Denying unsupported operation \"" + operation + "\" from " + context.remoteAddress()); return false; } }
/** * Authorizes request from to the DRPC server. * @param context the client request context * @param operation the operation requested by the DRPC server * @param params a Map with any key-value entries of use to the authorization implementation */ @Override public boolean permit(ReqContext context, String operation, Map params) { if ("execute".equals(operation)) { return permitClientRequest(context, operation, params); } else if ("failRequest".equals(operation) || "fetchRequest".equals(operation) || "result".equals(operation)) { return permitInvocationRequest(context, operation, params); } // Deny unsupported operations. LOG.warn("Denying unsupported operation \""+operation+"\" from "+ context.remoteAddress()); return false; } }