GenericAuthorizer
public interface Authorizer
Today no object based authorization is supported.
Modifier and Type | Field | Description |
---|---|---|
static int |
CREATE_ROLE_PRIV |
|
static int |
CREATE_SCHEMA_PRIV |
|
static int |
DELETE_PRIV |
|
static int |
DROP_ROLE_PRIV |
|
static int |
DROP_SCHEMA_PRIV |
|
static int |
EXECUTE_PRIV |
|
static int |
INSERT_PRIV |
|
static int |
JAR_WRITE_OP |
database jar write operation
|
static int |
MIN_SELECT_PRIV |
|
static int |
MODIFY_SCHEMA_PRIV |
|
static int |
NULL_PRIV |
|
static int |
PRIV_TYPE_COUNT |
|
static int |
PROPERTY_WRITE_OP |
database property write operation
|
static java.lang.String |
PUBLIC_AUTHORIZATION_ID |
The public authorization ID is defined by the SQL2003 spec as implying all users.
|
static int |
REFERENCES_PRIV |
|
static int |
SELECT_PRIV |
|
static int |
SQL_ARBITARY_OP |
Any other SQL operation
|
static int |
SQL_CALL_OP |
SQL CALL/VALUE operation
|
static int |
SQL_DDL_OP |
SQL DDL operation
|
static int |
SQL_SELECT_OP |
SQL SELECT operation
|
static int |
SQL_WRITE_OP |
SQL write (insert,update,delete) operation
|
static java.lang.String |
SYSTEM_AUTHORIZATION_ID |
The system authorization ID is defined by the SQL2003 spec as the grantor
of privileges to object owners.
|
static int |
TRIGGER_PRIV |
|
static int |
UPDATE_PRIV |
|
static int |
USAGE_PRIV |
Modifier and Type | Method | Description |
---|---|---|
void |
authorize(int operation) |
Verify the connected user is authorized to perform the requested
operation.
|
void |
authorize(java.util.List<StatementPermission> requiredPermissionsList,
Activation activation) |
Verify the connected user possesses the indicated permissions
|
void |
authorize(Activation activation,
int operation) |
Verify the connected user is authorized to perform the requested
operation.
|
boolean |
isReadOnlyConnection() |
Get the readOnly status for this authorizer's connection.
|
void |
refresh() |
Refresh this authorizer to reflect a change in the database
permissions.
|
void |
setReadOnlyConnection(boolean on,
boolean authorize) |
Set the readOnly status for this authorizer's connection.
|
static final int SQL_WRITE_OP
static final int SQL_SELECT_OP
static final int SQL_ARBITARY_OP
static final int SQL_CALL_OP
static final int SQL_DDL_OP
static final int PROPERTY_WRITE_OP
static final int JAR_WRITE_OP
static final int NULL_PRIV
static final int SELECT_PRIV
static final int UPDATE_PRIV
static final int REFERENCES_PRIV
static final int INSERT_PRIV
static final int DELETE_PRIV
static final int TRIGGER_PRIV
static final int EXECUTE_PRIV
static final int USAGE_PRIV
static final int MIN_SELECT_PRIV
static final int PRIV_TYPE_COUNT
static final int CREATE_SCHEMA_PRIV
static final int MODIFY_SCHEMA_PRIV
static final int DROP_SCHEMA_PRIV
static final int CREATE_ROLE_PRIV
static final int DROP_ROLE_PRIV
static final java.lang.String SYSTEM_AUTHORIZATION_ID
static final java.lang.String PUBLIC_AUTHORIZATION_ID
void authorize(int operation) throws StandardException
operation
- the enumeration code for the requsted operation.StandardException
- Thrown if the operation is not allowedvoid authorize(Activation activation, int operation) throws StandardException
activation
- holds the list of tables, columns, and routines used.operation
- the enumeration code for the requsted operation.StandardException
- Thrown if the operation is not allowedvoid authorize(java.util.List<StatementPermission> requiredPermissionsList, Activation activation) throws StandardException
requiredPermissionsList
- the required permissionsactivation
- holds the execution logicStandardException
- Thrown if the operation is not allowedboolean isReadOnlyConnection()
void setReadOnlyConnection(boolean on, boolean authorize) throws StandardException
on
- true means set the connection to read only mode,
false means set the connection to read wrte mode.authorize
- true means to verify the caller has authority
to set the connection and false means do not check.StandardException
- Oops not allowed.void refresh() throws StandardException
StandardException
- Oops.Apache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.