public class DenyAllAccessControl extends Object implements AccessControl
| Constructor and Description |
|---|
DenyAllAccessControl() |
| Modifier and Type | Method and Description |
|---|---|
void |
checkCanAccessCatalog(Identity identity,
String catalogName)
Check whether identity is allowed to access catalog
|
void |
checkCanAddColumns(TransactionId transactionId,
Identity identity,
QualifiedObjectName tableName)
Check if identity is allowed to add columns to the specified table.
|
void |
checkCanCreateRole(TransactionId transactionId,
Identity identity,
String role,
Optional<PrestoPrincipal> grantor,
String catalogName)
Check if identity is allowed to create the specified role.
|
void |
checkCanCreateSchema(TransactionId transactionId,
Identity identity,
CatalogSchemaName schemaName)
Check if identity is allowed to create the specified schema.
|
void |
checkCanCreateTable(TransactionId transactionId,
Identity identity,
QualifiedObjectName tableName)
Check if identity is allowed to create the specified table.
|
void |
checkCanCreateView(TransactionId transactionId,
Identity identity,
QualifiedObjectName viewName)
Check if identity is allowed to create the specified view.
|
void |
checkCanCreateViewWithSelectFromColumns(TransactionId transactionId,
Identity identity,
QualifiedObjectName tableName,
Set<String> columnNames)
Check if identity is allowed to create a view that selects from the specified columns.
|
void |
checkCanDeleteFromTable(TransactionId transactionId,
Identity identity,
QualifiedObjectName tableName)
Check if identity is allowed to delete from the specified table.
|
void |
checkCanDropColumn(TransactionId transactionId,
Identity identity,
QualifiedObjectName tableName)
Check if identity is allowed to drop columns from the specified table.
|
void |
checkCanDropRole(TransactionId transactionId,
Identity identity,
String role,
String catalogName)
Check if identity is allowed to drop the specified role.
|
void |
checkCanDropSchema(TransactionId transactionId,
Identity identity,
CatalogSchemaName schemaName)
Check if identity is allowed to drop the specified schema.
|
void |
checkCanDropTable(TransactionId transactionId,
Identity identity,
QualifiedObjectName tableName)
Check if identity is allowed to drop the specified table.
|
void |
checkCanDropView(TransactionId transactionId,
Identity identity,
QualifiedObjectName viewName)
Check if identity is allowed to drop the specified view.
|
void |
checkCanGrantRoles(TransactionId transactionId,
Identity identity,
Set<String> roles,
Set<PrestoPrincipal> grantees,
boolean withAdminOption,
Optional<PrestoPrincipal> grantor,
String catalogName)
Check if identity is allowed to grant the specified roles to the specified principals.
|
void |
checkCanGrantTablePrivilege(TransactionId transactionId,
Identity identity,
Privilege privilege,
QualifiedObjectName tableName,
PrestoPrincipal grantee,
boolean withGrantOption)
Check if identity is allowed to grant a privilege to the grantee on the specified table.
|
void |
checkCanInsertIntoTable(TransactionId transactionId,
Identity identity,
QualifiedObjectName tableName)
Check if identity is allowed to insert into the specified table.
|
void |
checkCanRenameColumn(TransactionId transactionId,
Identity identity,
QualifiedObjectName tableName)
Check if identity is allowed to rename a column in the specified table.
|
void |
checkCanRenameSchema(TransactionId transactionId,
Identity identity,
CatalogSchemaName schemaName,
String newSchemaName)
Check if identity is allowed to rename the specified schema.
|
void |
checkCanRenameTable(TransactionId transactionId,
Identity identity,
QualifiedObjectName tableName,
QualifiedObjectName newTableName)
Check if identity is allowed to rename the specified table.
|
void |
checkCanRevokeRoles(TransactionId transactionId,
Identity identity,
Set<String> roles,
Set<PrestoPrincipal> grantees,
boolean adminOptionFor,
Optional<PrestoPrincipal> grantor,
String catalogName)
Check if identity is allowed to revoke the specified roles from the specified principals.
|
void |
checkCanRevokeTablePrivilege(TransactionId transactionId,
Identity identity,
Privilege privilege,
QualifiedObjectName tableName,
PrestoPrincipal revokee,
boolean grantOptionFor)
Check if identity is allowed to revoke a privilege from the revokee on the specified table.
|
void |
checkCanSelectFromColumns(TransactionId transactionId,
Identity identity,
QualifiedObjectName tableName,
Set<String> columnNames)
Check if identity is allowed to select from the specified columns.
|
void |
checkCanSetCatalogSessionProperty(TransactionId transactionId,
Identity identity,
String catalogName,
String propertyName)
Check if identity is allowed to set the specified catalog property.
|
void |
checkCanSetRole(TransactionId requiredTransactionId,
Identity identity,
String role,
String catalog)
Check if identity is allowed to set role for specified catalog.
|
void |
checkCanSetSystemSessionProperty(Identity identity,
String propertyName)
Check if identity is allowed to set the specified system property.
|
void |
checkCanSetTableComment(TransactionId transactionId,
Identity identity,
QualifiedObjectName tableName)
Check if identity is allowed to comment the specified table.
|
void |
checkCanSetUser(Optional<Principal> principal,
String userName)
Check if the principal is allowed to be the specified user.
|
void |
checkCanShowColumnsMetadata(TransactionId transactionId,
Identity identity,
CatalogSchemaTableName table)
Check if identity is allowed to show columns of tables by executing SHOW COLUMNS, DESCRIBE etc.
|
void |
checkCanShowCurrentRoles(TransactionId transactionId,
Identity identity,
String catalogName)
Check if identity is allowed to show current roles on the specified catalog.
|
void |
checkCanShowRoleGrants(TransactionId transactionId,
Identity identity,
String catalogName)
Check if identity is allowed to show its own role grants on the specified catalog.
|
void |
checkCanShowRoles(TransactionId transactionId,
Identity identity,
String catalogName)
Check if identity is allowed to show roles on the specified catalog.
|
void |
checkCanShowSchemas(TransactionId transactionId,
Identity identity,
String catalogName)
Check if identity is allowed to execute SHOW SCHEMAS in a catalog.
|
void |
checkCanShowTablesMetadata(TransactionId transactionId,
Identity identity,
CatalogSchemaName schema)
Check if identity is allowed to show metadata of tables by executing SHOW TABLES, SHOW GRANTS etc.
|
Set<String> |
filterCatalogs(Identity identity,
Set<String> catalogs)
Filter the list of catalogs to those visible to the identity.
|
List<ColumnMetadata> |
filterColumns(TransactionId transactionId,
Identity identity,
CatalogSchemaTableName tableName,
List<ColumnMetadata> columns)
Filter the list of columns to those visible to the identity.
|
Set<String> |
filterSchemas(TransactionId transactionId,
Identity identity,
String catalogName,
Set<String> schemaNames)
Filter the list of schemas in a catalog to those visible to the identity.
|
Set<SchemaTableName> |
filterTables(TransactionId transactionId,
Identity identity,
String catalogName,
Set<SchemaTableName> tableNames)
Filter the list of tables and views to those visible to the identity.
|
public void checkCanSetUser(Optional<Principal> principal, String userName)
AccessControlcheckCanSetUser in interface AccessControlpublic Set<String> filterCatalogs(Identity identity, Set<String> catalogs)
AccessControlfilterCatalogs in interface AccessControlpublic void checkCanAccessCatalog(Identity identity, String catalogName)
AccessControlcheckCanAccessCatalog in interface AccessControlpublic void checkCanCreateSchema(TransactionId transactionId, Identity identity, CatalogSchemaName schemaName)
AccessControlcheckCanCreateSchema in interface AccessControlpublic void checkCanDropSchema(TransactionId transactionId, Identity identity, CatalogSchemaName schemaName)
AccessControlcheckCanDropSchema in interface AccessControlpublic void checkCanRenameSchema(TransactionId transactionId, Identity identity, CatalogSchemaName schemaName, String newSchemaName)
AccessControlcheckCanRenameSchema in interface AccessControlpublic void checkCanCreateTable(TransactionId transactionId, Identity identity, QualifiedObjectName tableName)
AccessControlcheckCanCreateTable in interface AccessControlpublic void checkCanDropTable(TransactionId transactionId, Identity identity, QualifiedObjectName tableName)
AccessControlcheckCanDropTable in interface AccessControlpublic void checkCanRenameTable(TransactionId transactionId, Identity identity, QualifiedObjectName tableName, QualifiedObjectName newTableName)
AccessControlcheckCanRenameTable in interface AccessControlpublic void checkCanSetTableComment(TransactionId transactionId, Identity identity, QualifiedObjectName tableName)
AccessControlcheckCanSetTableComment in interface AccessControlpublic void checkCanShowTablesMetadata(TransactionId transactionId, Identity identity, CatalogSchemaName schema)
AccessControl
NOTE: This method is only present to give users an error message when listing is not allowed.
The AccessControl.filterTables(io.prestosql.transaction.TransactionId, io.prestosql.spi.security.Identity, java.lang.String, java.util.Set<io.prestosql.spi.connector.SchemaTableName>) method must filter all results for unauthorized users,
since there are multiple ways to list tables.
checkCanShowTablesMetadata in interface AccessControlpublic Set<SchemaTableName> filterTables(TransactionId transactionId, Identity identity, String catalogName, Set<SchemaTableName> tableNames)
AccessControlfilterTables in interface AccessControlpublic void checkCanShowColumnsMetadata(TransactionId transactionId, Identity identity, CatalogSchemaTableName table)
AccessControl
NOTE: This method is only present to give users an error message when listing is not allowed.
The AccessControl.filterColumns(io.prestosql.transaction.TransactionId, io.prestosql.spi.security.Identity, io.prestosql.spi.connector.CatalogSchemaTableName, java.util.List<io.prestosql.spi.connector.ColumnMetadata>) method must filter all results for unauthorized users,
since there are multiple ways to list columns.
checkCanShowColumnsMetadata in interface AccessControlpublic List<ColumnMetadata> filterColumns(TransactionId transactionId, Identity identity, CatalogSchemaTableName tableName, List<ColumnMetadata> columns)
AccessControlfilterColumns in interface AccessControlpublic void checkCanShowSchemas(TransactionId transactionId, Identity identity, String catalogName)
AccessControl
NOTE: This method is only present to give users an error message when listing is not allowed.
The AccessControl.filterSchemas(io.prestosql.transaction.TransactionId, io.prestosql.spi.security.Identity, java.lang.String, java.util.Set<java.lang.String>) method must filter all results for unauthorized users,
since there are multiple ways to list schemas.
checkCanShowSchemas in interface AccessControlpublic Set<String> filterSchemas(TransactionId transactionId, Identity identity, String catalogName, Set<String> schemaNames)
AccessControlfilterSchemas in interface AccessControlpublic void checkCanAddColumns(TransactionId transactionId, Identity identity, QualifiedObjectName tableName)
AccessControlcheckCanAddColumns in interface AccessControlpublic void checkCanRenameColumn(TransactionId transactionId, Identity identity, QualifiedObjectName tableName)
AccessControlcheckCanRenameColumn in interface AccessControlpublic void checkCanDropColumn(TransactionId transactionId, Identity identity, QualifiedObjectName tableName)
AccessControlcheckCanDropColumn in interface AccessControlpublic void checkCanInsertIntoTable(TransactionId transactionId, Identity identity, QualifiedObjectName tableName)
AccessControlcheckCanInsertIntoTable in interface AccessControlpublic void checkCanDeleteFromTable(TransactionId transactionId, Identity identity, QualifiedObjectName tableName)
AccessControlcheckCanDeleteFromTable in interface AccessControlpublic void checkCanCreateView(TransactionId transactionId, Identity identity, QualifiedObjectName viewName)
AccessControlcheckCanCreateView in interface AccessControlpublic void checkCanDropView(TransactionId transactionId, Identity identity, QualifiedObjectName viewName)
AccessControlcheckCanDropView in interface AccessControlpublic void checkCanCreateViewWithSelectFromColumns(TransactionId transactionId, Identity identity, QualifiedObjectName tableName, Set<String> columnNames)
AccessControlcheckCanCreateViewWithSelectFromColumns in interface AccessControlpublic void checkCanGrantTablePrivilege(TransactionId transactionId, Identity identity, Privilege privilege, QualifiedObjectName tableName, PrestoPrincipal grantee, boolean withGrantOption)
AccessControlcheckCanGrantTablePrivilege in interface AccessControlpublic void checkCanRevokeTablePrivilege(TransactionId transactionId, Identity identity, Privilege privilege, QualifiedObjectName tableName, PrestoPrincipal revokee, boolean grantOptionFor)
AccessControlcheckCanRevokeTablePrivilege in interface AccessControlpublic void checkCanSetSystemSessionProperty(Identity identity, String propertyName)
AccessControlcheckCanSetSystemSessionProperty in interface AccessControlpublic void checkCanSetCatalogSessionProperty(TransactionId transactionId, Identity identity, String catalogName, String propertyName)
AccessControlcheckCanSetCatalogSessionProperty in interface AccessControlpublic void checkCanSelectFromColumns(TransactionId transactionId, Identity identity, QualifiedObjectName tableName, Set<String> columnNames)
AccessControlcheckCanSelectFromColumns in interface AccessControlpublic void checkCanCreateRole(TransactionId transactionId, Identity identity, String role, Optional<PrestoPrincipal> grantor, String catalogName)
AccessControlcheckCanCreateRole in interface AccessControlpublic void checkCanDropRole(TransactionId transactionId, Identity identity, String role, String catalogName)
AccessControlcheckCanDropRole in interface AccessControlpublic void checkCanGrantRoles(TransactionId transactionId, Identity identity, Set<String> roles, Set<PrestoPrincipal> grantees, boolean withAdminOption, Optional<PrestoPrincipal> grantor, String catalogName)
AccessControlcheckCanGrantRoles in interface AccessControlpublic void checkCanRevokeRoles(TransactionId transactionId, Identity identity, Set<String> roles, Set<PrestoPrincipal> grantees, boolean adminOptionFor, Optional<PrestoPrincipal> grantor, String catalogName)
AccessControlcheckCanRevokeRoles in interface AccessControlpublic void checkCanSetRole(TransactionId requiredTransactionId, Identity identity, String role, String catalog)
AccessControlcheckCanSetRole in interface AccessControlpublic void checkCanShowRoles(TransactionId transactionId, Identity identity, String catalogName)
AccessControlcheckCanShowRoles in interface AccessControlpublic void checkCanShowCurrentRoles(TransactionId transactionId, Identity identity, String catalogName)
AccessControlcheckCanShowCurrentRoles in interface AccessControlpublic void checkCanShowRoleGrants(TransactionId transactionId, Identity identity, String catalogName)
AccessControlcheckCanShowRoleGrants in interface AccessControlCopyright © 2012–2019. All rights reserved.