public class DefaultAuthorizationValidator extends Object implements AuthorizationValidator
AuthorizationValidator.CommandType| Modifier and Type | Field and Description |
|---|---|
static String |
IGNORE_UNAUTHORIZED_ASTERISK |
| Constructor and Description |
|---|
DefaultAuthorizationValidator() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasRole(String roleName,
CommandContext commandContext)
Uses the context or other information to determine if the current user has the given role name.
|
boolean |
isAccessible(AbstractMetadataRecord record,
CommandContext commandContext)
Determines if the metadata record is accessible in system queries
|
void |
setPolicyDecider(PolicyDecider policyDecider) |
boolean |
validate(String[] originalSql,
Command command,
QueryMetadataInterface metadata,
CommandContext commandContext,
AuthorizationValidator.CommandType commandType)
Validates the given command.
|
public static final String IGNORE_UNAUTHORIZED_ASTERISK
public boolean validate(String[] originalSql, Command command, QueryMetadataInterface metadata, CommandContext commandContext, AuthorizationValidator.CommandType commandType) throws QueryValidatorException, TeiidComponentException
AuthorizationValidatorAuthorizationValidator.CommandType.USER command, the command object should not be modified.
Any modification must be fully resolved using the associated QueryMetadataInterface. Returning true for a
AuthorizationValidator.CommandType.PREPARED or AuthorizationValidator.CommandType.CACHED commands means that the matching prepared plan or cache entry
will not be used.validate in interface AuthorizationValidatororiginalSql - array of commands will typically contain only a single string, but may have multiple for batched updates.command - the parsed and resolved command.QueryValidatorExceptionTeiidComponentExceptionpublic boolean hasRole(String roleName, CommandContext commandContext)
AuthorizationValidatorhasRole in interface AuthorizationValidatorpublic void setPolicyDecider(PolicyDecider policyDecider)
public boolean isAccessible(AbstractMetadataRecord record, CommandContext commandContext)
AuthorizationValidatorisAccessible in interface AuthorizationValidatorCopyright © 2018 JBoss by Red Hat. All rights reserved.