public interface AuthorizationService
| Modifier and Type | Method and Description |
|---|---|
void |
authorizeDataRead(String token,
String keyspace,
String table)
Using the provided token will perform pre-authorization and if not successful throws an
exception.
|
void |
authorizeDataWrite(String token,
String keyspace,
String table,
List<TypedKeyValue> typedKeyValues,
Scope scope)
Using the provided token will perform pre-authorization where possible.
|
void |
authorizeDataWrite(String token,
String keyspace,
String table,
Scope scope)
Using the provided token will perform pre-authorization and if not successful throws an
exception.
|
ResultSet |
authorizedDataRead(Callable<ResultSet> action,
String token,
String keyspace,
String table,
List<TypedKeyValue> typedKeyValues)
Using the provided token will perform pre-authorization where possible, executes the query
provided, and then authorizes the response of the query.
|
void |
authorizeSchemaRead(String token,
List<String> keyspaceNames,
List<String> tableNames)
Using the provided token will perform pre-authorization of accessing the provided resources.
|
void |
authorizeSchemaWrite(String token,
String keyspace,
String table,
Scope scope)
Using the provided token will perform pre-authorization where possible and if not successful
throws an exception.
|
ResultSet authorizedDataRead(Callable<ResultSet> action, String token, String keyspace, String table, List<TypedKeyValue> typedKeyValues) throws Exception
action - A QueryBuilder object to be executed and authorized against a token.token - The authenticated token to use for authorization.keyspace - The keyspace containing the table with data to be read.table - The table within the provided keyspace containing the data to be read.typedKeyValues - A list of TypedKeyValue that will be used in the query and should
be authorized against the token.Exception - An exception relating to the failure to authorize.void authorizeDataRead(String token, String keyspace, String table) throws UnauthorizedException
token - The authenticated token to use for authorization.keyspace - The keyspace containing the table with data to be read.table - The table within the provided keyspace containing the data to be read.UnauthorizedException - An exception relating to the failure to authorize.void authorizeDataWrite(String token, String keyspace, String table, Scope scope) throws UnauthorizedException
token - The authenticated token to use for authorization.keyspace - Either the keyspace containing the resource to be modified or the actual
resource being modified.table - The table within the provided keyspace containing the data to be modified.scope - The table within the provided keyspace that is being modified.UnauthorizedException - An exception relating to the failure to authorize.void authorizeDataWrite(String token, String keyspace, String table, List<TypedKeyValue> typedKeyValues, Scope scope) throws UnauthorizedException
token - The authenticated token to use for authorization.typedKeyValues - A list of TypedKeyValue that will be used in the query and should
be authorized against the token.scope - The Scope of the action to be performed.UnauthorizedException - An exception relating to the failure to authorize.void authorizeSchemaRead(String token, List<String> keyspaceNames, List<String> tableNames) throws UnauthorizedException
token - The authenticated token to use for authorization.keyspaceNames - Either the keyspace(s) containing the resource(s) to be read or the actual
resource being read.tableNames - The table(s) within the provided keyspace(s) that is being read.UnauthorizedException - An exception relating to the failure to authorize.void authorizeSchemaWrite(String token, String keyspace, String table, Scope scope) throws UnauthorizedException
token - The authenticated token to use for authorization.keyspace - Either the keyspace containing the resource to be modified or the actual
resource being modified.table - The table within the provided keyspace that is being modified.scope - The Scope of the action to be performed.UnauthorizedException - An exception relating to the failure to authorize.Copyright © 2020. All rights reserved.