private void validateEntitlements(DataPolicy.PermissionType actionCode, Context auditContext, Map<String, ? extends LanguageObject> nameToSymbolMap) { if (nameToSymbolMap.isEmpty()) { return; } Collection<String> inaccessibleResources = getInaccessibleResources(actionCode, nameToSymbolMap.keySet(), auditContext); if(inaccessibleResources.isEmpty()) { return; } List<LanguageObject> inaccessibleSymbols = new ArrayList<LanguageObject>(inaccessibleResources.size()); for (String name : inaccessibleResources) { inaccessibleSymbols.add(nameToSymbolMap.get(name)); } // CASE 2362 - do not include the names of the elements for which the user // is not authorized in the exception message handleValidationError( QueryPlugin.Util.getString("ERR.018.005.0095", commandContext.getUserName(), actionCode), //$NON-NLS-1$ inaccessibleSymbols); }
private void validateEntitlements(DataPolicy.PermissionType actionCode, Context auditContext, Map<String, ? extends LanguageObject> nameToSymbolMap) { if (nameToSymbolMap.isEmpty()) { return; } Collection<String> inaccessibleResources = getInaccessibleResources(actionCode, nameToSymbolMap.keySet(), auditContext); if(inaccessibleResources.isEmpty()) { return; } List<LanguageObject> inaccessibleSymbols = new ArrayList<LanguageObject>(inaccessibleResources.size()); for (String name : inaccessibleResources) { inaccessibleSymbols.add(nameToSymbolMap.get(name)); } // CASE 2362 - do not include the names of the elements for which the user // is not authorized in the exception message handleValidationError( QueryPlugin.Util.getString("ERR.018.005.0095", commandContext.getUserName(), actionCode), //$NON-NLS-1$ inaccessibleSymbols); }
private void validateEntitlements(DataPolicy.PermissionType actionCode, Context auditContext, Map<String, ? extends LanguageObject> nameToSymbolMap) { if (nameToSymbolMap.isEmpty()) { return; } Collection<String> inaccessibleResources = getInaccessibleResources(actionCode, nameToSymbolMap.keySet(), auditContext); if(inaccessibleResources.isEmpty()) { return; } List<LanguageObject> inaccessibleSymbols = new ArrayList<LanguageObject>(inaccessibleResources.size()); for (String name : inaccessibleResources) { inaccessibleSymbols.add(nameToSymbolMap.get(name)); } // CASE 2362 - do not include the names of the elements for which the user // is not authorized in the exception message handleValidationError( QueryPlugin.Util.getString("ERR.018.005.0095", commandContext.getUserName(), actionCode), //$NON-NLS-1$ inaccessibleSymbols); }
private void validateTemp(DataPolicy.PermissionType action, String resource, boolean schema, LanguageObject object, Context context) { Set<String> resources = Collections.singleton(resource); logRequest(resources, context); boolean allowed = decider.isTempAccessible(action, schema?resource:null, context, commandContext); logResult(resources, context, allowed); if (!allowed) { handleValidationError( QueryPlugin.Util.getString("ERR.018.005.0095", commandContext.getUserName(), "CREATE_TEMPORARY_TABLES"), //$NON-NLS-1$ //$NON-NLS-2$ Arrays.asList(object)); } }
private void validateTemp(DataPolicy.PermissionType action, String resource, boolean schema, LanguageObject object, Context context) { Set<String> resources = Collections.singleton(resource); logRequest(resources, context); boolean allowed = decider.isTempAccessible(action, schema?resource:null, context, commandContext); logResult(resources, context, allowed); if (!allowed) { handleValidationError( QueryPlugin.Util.getString("ERR.018.005.0095", commandContext.getUserName(), "CREATE_TEMPORARY_TABLES"), //$NON-NLS-1$ //$NON-NLS-2$ Arrays.asList(object)); } }
private void validateTemp(DataPolicy.PermissionType action, String resource, boolean schema, LanguageObject object, Context context) { Set<String> resources = Collections.singleton(resource); logRequest(resources, context); boolean allowed = decider.isTempAccessible(action, schema?resource:null, context, commandContext); logResult(resources, context, allowed); if (!allowed) { handleValidationError( QueryPlugin.Util.getString("ERR.018.005.0095", commandContext.getUserName(), "CREATE_TEMPORARY_TABLES"), //$NON-NLS-1$ //$NON-NLS-2$ Arrays.asList(object)); } }
public AuditEnitity(AuditMessage msg) { this.context = msg.getContext(); this.activity = msg.getActivity(); this.resources = StringUtil.toString(msg.getResources()); if (msg.getCommandContext() != null) { this.requestId = msg.getCommandContext().getRequestId(); this.principal = msg.getCommandContext().getUserName(); this.vdbName = msg.getCommandContext().getVdbName(); this.vdbVersion = msg.getCommandContext().getVdbVersion(); this.sessionId = msg.getCommandContext().getSession().getSessionId(); this.applicationName = msg.getCommandContext().getSession().getApplicationName(); } else if (msg.getLogonInfo() != null) { this.authType = msg.getLogonInfo().getAuthType(); this.userName = msg.getLogonInfo().getUserName(); this.clientHostName = msg.getLogonInfo().getClientHostName(); this.clientIpAddress = msg.getLogonInfo().getClientIpAddress(); this.clientMac = msg.getLogonInfo().getClientMac(); this.passThrough = msg.getLogonInfo().isPassThrough(); } }