Class DenyAllAccessControl
- All Implemented Interfaces:
AccessControl
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanCreateViewWithExecuteFunction(SecurityContext context, QualifiedObjectName functionName) Is the identity allowed to create a view that executes the specified function?booleancanExecuteFunction(SecurityContext context, QualifiedObjectName functionName) Is the identity allowed to execute function?voidcheckCanAddColumns(SecurityContext context, QualifiedObjectName tableName) Check if identity is allowed to add columns to the specified table.voidcheckCanAlterColumn(SecurityContext context, QualifiedObjectName tableName) Check if identity is allowed to alter columns to the specified table.voidcheckCanCreateCatalog(SecurityContext context, String catalog) Check if identity is allowed to create the specified catalog.voidcheckCanCreateFunction(SecurityContext context, QualifiedObjectName functionName) Check if identity is allowed to create the specified function.voidcheckCanCreateMaterializedView(SecurityContext context, QualifiedObjectName materializedViewName, Map<String, Object> properties) Check if identity is allowed to create the specified materialized view.voidcheckCanCreateRole(SecurityContext context, String role, Optional<TrinoPrincipal> grantor, Optional<String> catalogName) Check if identity is allowed to create the specified role.voidcheckCanCreateSchema(SecurityContext context, CatalogSchemaName schemaName, Map<String, Object> properties) Check if identity is allowed to create the specified schema.voidcheckCanCreateTable(SecurityContext context, QualifiedObjectName tableName, Map<String, Object> properties) Check if identity is allowed to create the specified table with properties.voidcheckCanCreateView(SecurityContext context, QualifiedObjectName viewName) Check if identity is allowed to create the specified view.voidcheckCanCreateViewWithSelectFromColumns(SecurityContext context, QualifiedObjectName tableName, Set<String> columnNames) Check if identity is allowed to create a view that selects from the specified columns.voidcheckCanDeleteFromTable(SecurityContext context, QualifiedObjectName tableName) Check if identity is allowed to delete from the specified table.voidcheckCanDenySchemaPrivilege(SecurityContext context, Privilege privilege, CatalogSchemaName schemaName, TrinoPrincipal grantee) Check if identity is allowed to deny a privilege to the grantee on the specified schema.voidcheckCanDenyTablePrivilege(SecurityContext context, Privilege privilege, QualifiedObjectName tableName, TrinoPrincipal grantee) Check if identity is allowed to deny a privilege to the grantee on the specified table.voidcheckCanDropCatalog(SecurityContext context, String catalog) Check if identity is allowed to drop the specified catalog.voidcheckCanDropColumn(SecurityContext context, QualifiedObjectName tableName) Check if identity is allowed to drop columns from the specified table.voidcheckCanDropFunction(SecurityContext context, QualifiedObjectName functionName) Check if identity is allowed to drop the specified function.voidcheckCanDropMaterializedView(SecurityContext context, QualifiedObjectName materializedViewName) Check if identity is allowed to drop the specified materialized view.voidcheckCanDropRole(SecurityContext context, String role, Optional<String> catalogName) Check if identity is allowed to drop the specified role.voidcheckCanDropSchema(SecurityContext context, CatalogSchemaName schemaName) Check if identity is allowed to drop the specified schema.voidcheckCanDropTable(SecurityContext context, QualifiedObjectName tableName) Check if identity is allowed to drop the specified table.voidcheckCanDropView(SecurityContext context, QualifiedObjectName viewName) Check if identity is allowed to drop the specified view.voidcheckCanExecuteProcedure(SecurityContext context, QualifiedObjectName procedureName) Check if identity is allowed to execute procedurevoidcheckCanExecuteQuery(Identity identity) Checks if identity can execute a query.voidcheckCanExecuteTableProcedure(SecurityContext context, QualifiedObjectName tableName, String procedureName) Check if identity is allowed to execute given table procedure on given tablevoidcheckCanGrantRoles(SecurityContext context, Set<String> roles, Set<TrinoPrincipal> grantees, boolean adminOption, Optional<TrinoPrincipal> grantor, Optional<String> catalogName) Check if identity is allowed to grant the specified roles to the specified principals.voidcheckCanGrantSchemaPrivilege(SecurityContext context, Privilege privilege, CatalogSchemaName schemaName, TrinoPrincipal grantee, boolean grantOption) Check if identity is allowed to grant a privilege to the grantee on the specified schema.voidcheckCanGrantTablePrivilege(SecurityContext context, Privilege privilege, QualifiedObjectName tableName, TrinoPrincipal grantee, boolean grantOption) Check if identity is allowed to grant a privilege to the grantee on the specified table.voidcheckCanImpersonateUser(Identity identity, String userName) Check if the identity is allowed impersonate the specified user.voidcheckCanInsertIntoTable(SecurityContext context, QualifiedObjectName tableName) Check if identity is allowed to insert into the specified table.voidcheckCanKillQueryOwnedBy(Identity identity, Identity queryOwner) Checks if identity can kill a query owned by the specified user.voidcheckCanReadSystemInformation(Identity identity) Check if identity is allowed to read system information such as statistics, service registry, thread stacks, etc.voidcheckCanRefreshMaterializedView(SecurityContext context, QualifiedObjectName materializedViewName) Check if identity is allowed to refresh the specified materialized view.voidcheckCanRenameColumn(SecurityContext context, QualifiedObjectName tableName) Check if identity is allowed to rename a column in the specified table.voidcheckCanRenameMaterializedView(SecurityContext context, QualifiedObjectName viewName, QualifiedObjectName newViewName) Check if identity is allowed to rename the specified materialized view.voidcheckCanRenameSchema(SecurityContext context, CatalogSchemaName schemaName, String newSchemaName) Check if identity is allowed to rename the specified schema.voidcheckCanRenameTable(SecurityContext context, QualifiedObjectName tableName, QualifiedObjectName newTableName) Check if identity is allowed to rename the specified table.voidcheckCanRenameView(SecurityContext context, QualifiedObjectName viewName, QualifiedObjectName newViewName) Check if identity is allowed to rename the specified view.voidcheckCanRevokeRoles(SecurityContext context, Set<String> roles, Set<TrinoPrincipal> grantees, boolean adminOption, Optional<TrinoPrincipal> grantor, Optional<String> catalogName) Check if identity is allowed to revoke the specified roles from the specified principals.voidcheckCanRevokeSchemaPrivilege(SecurityContext context, Privilege privilege, CatalogSchemaName schemaName, TrinoPrincipal revokee, boolean grantOption) Check if identity is allowed to revoke a privilege from the revokee on the specified schema.voidcheckCanRevokeTablePrivilege(SecurityContext context, Privilege privilege, QualifiedObjectName tableName, TrinoPrincipal revokee, boolean grantOption) Check if identity is allowed to revoke a privilege from the revokee on the specified table.voidcheckCanSelectFromColumns(SecurityContext context, QualifiedObjectName tableName, Set<String> columnNames) Check if identity is allowed to select from the specified columns.voidcheckCanSetCatalogRole(SecurityContext context, String role, String catalog) Check if identity is allowed to set role for specified catalog.voidcheckCanSetCatalogSessionProperty(SecurityContext context, String catalogName, String propertyName) Check if identity is allowed to set the specified catalog property.voidcheckCanSetColumnComment(SecurityContext context, QualifiedObjectName tableName) Check if identity is allowed to comment the specified column.voidcheckCanSetMaterializedViewProperties(SecurityContext context, QualifiedObjectName materializedViewName, Map<String, Optional<Object>> properties) Check if identity is allowed to set the properties of the specified materialized view.voidcheckCanSetSchemaAuthorization(SecurityContext context, CatalogSchemaName schemaName, TrinoPrincipal principal) Check if identity is allowed to change the specified schema's user/role.voidcheckCanSetSystemSessionProperty(Identity identity, String propertyName) Check if identity is allowed to set the specified system property.voidcheckCanSetTableAuthorization(SecurityContext context, QualifiedObjectName tableName, TrinoPrincipal principal) Check if identity is allowed to change the specified table's user/role.voidcheckCanSetTableComment(SecurityContext context, QualifiedObjectName tableName) Check if identity is allowed to comment the specified table.voidcheckCanSetTableProperties(SecurityContext context, QualifiedObjectName tableName, Map<String, Optional<Object>> properties) Check if identity is allowed to set properties to the specified table.voidcheckCanSetUser(Optional<Principal> principal, String userName) Check if the principal is allowed to be the specified user.voidcheckCanSetViewAuthorization(SecurityContext context, QualifiedObjectName view, TrinoPrincipal principal) Check if identity is allowed to change the specified view's user/role.voidcheckCanSetViewComment(SecurityContext context, QualifiedObjectName viewName) Check if identity is allowed to comment the specified view.voidcheckCanShowColumns(SecurityContext context, CatalogSchemaTableName table) Check if identity is allowed to show columns of tables by executing SHOW COLUMNS, DESCRIBE etc.voidcheckCanShowCreateSchema(SecurityContext context, CatalogSchemaName schemaName) Check if identity is allowed to execute SHOW CREATE SCHEMA.voidcheckCanShowCreateTable(SecurityContext context, QualifiedObjectName tableName) Check if identity is allowed to execute SHOW CREATE TABLE, SHOW CREATE VIEW or SHOW CREATE MATERIALIZED VIEWvoidcheckCanShowCurrentRoles(SecurityContext context, Optional<String> catalogName) Check if identity is allowed to show current roles on the specified catalog.voidcheckCanShowFunctions(SecurityContext context, CatalogSchemaName schema) Check if identity is allowed to show functions by executing SHOW FUNCTIONS in a catalog schema.voidcheckCanShowRoleGrants(SecurityContext context, Optional<String> catalogName) Check if identity is allowed to show its own role grants on the specified catalog.voidcheckCanShowRoles(SecurityContext context, Optional<String> catalogName) Check if identity is allowed to show roles on the specified catalog.voidcheckCanShowSchemas(SecurityContext context, String catalogName) Check if identity is allowed to execute SHOW SCHEMAS in a catalog.voidcheckCanShowTables(SecurityContext context, CatalogSchemaName schema) Check if identity is allowed to show tables by executing SHOW TABLES, SHOW GRANTS etc.voidcheckCanTruncateTable(SecurityContext context, QualifiedObjectName tableName) Check if identity is allowed to truncate the specified table.voidcheckCanUpdateTableColumns(SecurityContext context, QualifiedObjectName tableName, Set<String> updatedColumnNames) Check if identity is allowed to update the specified table.voidcheckCanViewQueryOwnedBy(Identity identity, Identity queryOwner) Checks if identity can view a query owned by the specified user.voidcheckCanWriteSystemInformation(Identity identity) Check if identity is allowed to write system information such as marking nodes offline, or changing runtime flags.filterCatalogs(SecurityContext context, Set<String> catalogs) Filter the list of catalogs to those visible to the identity.filterColumns(SecurityContext context, String catalogName, Map<SchemaTableName, Set<String>> tableColumns) Filter lists of columns of multiple tables to those visible to the identity.filterFunctions(SecurityContext context, String catalogName, Set<SchemaFunctionName> functionNames) Filter the list of functions to those visible to the identity.filterQueriesOwnedBy(Identity identity, Collection<Identity> queryOwners) Filter the list of users to those the identity view query owned by the user.filterSchemas(SecurityContext context, String catalogName, Set<String> schemaNames) Filter the list of schemas in a catalog to those visible to the identity.filterTables(SecurityContext context, String catalogName, Set<SchemaTableName> tableNames) Filter the list of tables, materialized views and views to those visible to the identity.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.trino.security.AccessControl
getColumnMask, getRowFilters
-
Constructor Details
-
DenyAllAccessControl
public DenyAllAccessControl()
-
-
Method Details
-
checkCanImpersonateUser
Description copied from interface:AccessControlCheck if the identity is allowed impersonate the specified user.- Specified by:
checkCanImpersonateUserin interfaceAccessControl
-
checkCanSetUser
Description copied from interface:AccessControlCheck if the principal is allowed to be the specified user.- Specified by:
checkCanSetUserin interfaceAccessControl
-
checkCanReadSystemInformation
Description copied from interface:AccessControlCheck if identity is allowed to read system information such as statistics, service registry, thread stacks, etc. This is typically allowed for administrators and management tools.- Specified by:
checkCanReadSystemInformationin interfaceAccessControl
-
checkCanWriteSystemInformation
Description copied from interface:AccessControlCheck if identity is allowed to write system information such as marking nodes offline, or changing runtime flags. This is typically allowed for administrators.- Specified by:
checkCanWriteSystemInformationin interfaceAccessControl
-
checkCanExecuteQuery
Description copied from interface:AccessControlChecks if identity can execute a query.- Specified by:
checkCanExecuteQueryin interfaceAccessControl
-
checkCanViewQueryOwnedBy
Description copied from interface:AccessControlChecks if identity can view a query owned by the specified user. The method will not be called when the current user is the query owner.- Specified by:
checkCanViewQueryOwnedByin interfaceAccessControl
-
filterQueriesOwnedBy
public Collection<Identity> filterQueriesOwnedBy(Identity identity, Collection<Identity> queryOwners) Description copied from interface:AccessControlFilter the list of users to those the identity view query owned by the user. The method will not be called with the current user in the set.- Specified by:
filterQueriesOwnedByin interfaceAccessControl
-
checkCanKillQueryOwnedBy
Description copied from interface:AccessControlChecks if identity can kill a query owned by the specified user. The method will not be called when the current user is the query owner.- Specified by:
checkCanKillQueryOwnedByin interfaceAccessControl
-
checkCanCreateCatalog
Description copied from interface:AccessControlCheck if identity is allowed to create the specified catalog.- Specified by:
checkCanCreateCatalogin interfaceAccessControl
-
checkCanDropCatalog
Description copied from interface:AccessControlCheck if identity is allowed to drop the specified catalog.- Specified by:
checkCanDropCatalogin interfaceAccessControl
-
filterCatalogs
Description copied from interface:AccessControlFilter the list of catalogs to those visible to the identity.- Specified by:
filterCatalogsin interfaceAccessControl
-
checkCanCreateSchema
public void checkCanCreateSchema(SecurityContext context, CatalogSchemaName schemaName, Map<String, Object> properties) Description copied from interface:AccessControlCheck if identity is allowed to create the specified schema.- Specified by:
checkCanCreateSchemain interfaceAccessControl
-
checkCanDropSchema
Description copied from interface:AccessControlCheck if identity is allowed to drop the specified schema.- Specified by:
checkCanDropSchemain interfaceAccessControl
-
checkCanRenameSchema
public void checkCanRenameSchema(SecurityContext context, CatalogSchemaName schemaName, String newSchemaName) Description copied from interface:AccessControlCheck if identity is allowed to rename the specified schema.- Specified by:
checkCanRenameSchemain interfaceAccessControl
-
checkCanShowCreateSchema
Description copied from interface:AccessControlCheck if identity is allowed to execute SHOW CREATE SCHEMA.- Specified by:
checkCanShowCreateSchemain interfaceAccessControl
-
checkCanShowCreateTable
Description copied from interface:AccessControlCheck if identity is allowed to execute SHOW CREATE TABLE, SHOW CREATE VIEW or SHOW CREATE MATERIALIZED VIEW- Specified by:
checkCanShowCreateTablein interfaceAccessControl
-
checkCanSetSchemaAuthorization
public void checkCanSetSchemaAuthorization(SecurityContext context, CatalogSchemaName schemaName, TrinoPrincipal principal) Description copied from interface:AccessControlCheck if identity is allowed to change the specified schema's user/role.- Specified by:
checkCanSetSchemaAuthorizationin interfaceAccessControl
-
checkCanCreateTable
public void checkCanCreateTable(SecurityContext context, QualifiedObjectName tableName, Map<String, Object> properties) Description copied from interface:AccessControlCheck if identity is allowed to create the specified table with properties.- Specified by:
checkCanCreateTablein interfaceAccessControl
-
checkCanDropTable
Description copied from interface:AccessControlCheck if identity is allowed to drop the specified table.- Specified by:
checkCanDropTablein interfaceAccessControl
-
checkCanRenameTable
public void checkCanRenameTable(SecurityContext context, QualifiedObjectName tableName, QualifiedObjectName newTableName) Description copied from interface:AccessControlCheck if identity is allowed to rename the specified table.- Specified by:
checkCanRenameTablein interfaceAccessControl
-
checkCanSetTableProperties
public void checkCanSetTableProperties(SecurityContext context, QualifiedObjectName tableName, Map<String, Optional<Object>> properties) Description copied from interface:AccessControlCheck if identity is allowed to set properties to the specified table.- Specified by:
checkCanSetTablePropertiesin interfaceAccessControl
-
checkCanSetTableComment
Description copied from interface:AccessControlCheck if identity is allowed to comment the specified table.- Specified by:
checkCanSetTableCommentin interfaceAccessControl
-
checkCanSetViewComment
Description copied from interface:AccessControlCheck if identity is allowed to comment the specified view.- Specified by:
checkCanSetViewCommentin interfaceAccessControl
-
checkCanSetColumnComment
Description copied from interface:AccessControlCheck if identity is allowed to comment the specified column.- Specified by:
checkCanSetColumnCommentin interfaceAccessControl
-
checkCanShowTables
Description copied from interface:AccessControlCheck if identity is allowed to show tables by executing SHOW TABLES, SHOW GRANTS etc. in a catalog schema.NOTE: This method is only present to give users an error message when listing is not allowed. The
AccessControl.filterTables(io.trino.security.SecurityContext, java.lang.String, java.util.Set<io.trino.spi.connector.SchemaTableName>)method must filter all results for unauthorized users, since there are multiple ways to list tables.- Specified by:
checkCanShowTablesin interfaceAccessControl
-
filterTables
public Set<SchemaTableName> filterTables(SecurityContext context, String catalogName, Set<SchemaTableName> tableNames) Description copied from interface:AccessControlFilter the list of tables, materialized views and views to those visible to the identity.- Specified by:
filterTablesin interfaceAccessControl
-
checkCanShowColumns
Description copied from interface:AccessControlCheck if identity is allowed to show columns of tables by executing SHOW COLUMNS, DESCRIBE etc.NOTE: This method is only present to give users an error message when listing is not allowed. The
AccessControl.filterColumns(io.trino.security.SecurityContext, java.lang.String, java.util.Map<io.trino.spi.connector.SchemaTableName, java.util.Set<java.lang.String>>)method must filter all results for unauthorized users, since there are multiple ways to list columns.- Specified by:
checkCanShowColumnsin interfaceAccessControl
-
filterColumns
public Map<SchemaTableName,Set<String>> filterColumns(SecurityContext context, String catalogName, Map<SchemaTableName, Set<String>> tableColumns) Description copied from interface:AccessControlFilter lists of columns of multiple tables to those visible to the identity.- Specified by:
filterColumnsin interfaceAccessControl
-
checkCanShowSchemas
Description copied from interface:AccessControlCheck if identity is allowed to execute SHOW SCHEMAS in a catalog.NOTE: This method is only present to give users an error message when listing is not allowed. The
AccessControl.filterSchemas(io.trino.security.SecurityContext, 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.- Specified by:
checkCanShowSchemasin interfaceAccessControl
-
filterSchemas
public Set<String> filterSchemas(SecurityContext context, String catalogName, Set<String> schemaNames) Description copied from interface:AccessControlFilter the list of schemas in a catalog to those visible to the identity.- Specified by:
filterSchemasin interfaceAccessControl
-
checkCanAddColumns
Description copied from interface:AccessControlCheck if identity is allowed to add columns to the specified table.- Specified by:
checkCanAddColumnsin interfaceAccessControl
-
checkCanAlterColumn
Description copied from interface:AccessControlCheck if identity is allowed to alter columns to the specified table.- Specified by:
checkCanAlterColumnin interfaceAccessControl
-
checkCanRenameColumn
Description copied from interface:AccessControlCheck if identity is allowed to rename a column in the specified table.- Specified by:
checkCanRenameColumnin interfaceAccessControl
-
checkCanDropColumn
Description copied from interface:AccessControlCheck if identity is allowed to drop columns from the specified table.- Specified by:
checkCanDropColumnin interfaceAccessControl
-
checkCanSetTableAuthorization
public void checkCanSetTableAuthorization(SecurityContext context, QualifiedObjectName tableName, TrinoPrincipal principal) Description copied from interface:AccessControlCheck if identity is allowed to change the specified table's user/role.- Specified by:
checkCanSetTableAuthorizationin interfaceAccessControl
-
checkCanInsertIntoTable
Description copied from interface:AccessControlCheck if identity is allowed to insert into the specified table.- Specified by:
checkCanInsertIntoTablein interfaceAccessControl
-
checkCanDeleteFromTable
Description copied from interface:AccessControlCheck if identity is allowed to delete from the specified table.- Specified by:
checkCanDeleteFromTablein interfaceAccessControl
-
checkCanTruncateTable
Description copied from interface:AccessControlCheck if identity is allowed to truncate the specified table.- Specified by:
checkCanTruncateTablein interfaceAccessControl
-
checkCanUpdateTableColumns
public void checkCanUpdateTableColumns(SecurityContext context, QualifiedObjectName tableName, Set<String> updatedColumnNames) Description copied from interface:AccessControlCheck if identity is allowed to update the specified table.- Specified by:
checkCanUpdateTableColumnsin interfaceAccessControl
-
checkCanCreateView
Description copied from interface:AccessControlCheck if identity is allowed to create the specified view.- Specified by:
checkCanCreateViewin interfaceAccessControl
-
checkCanRenameView
public void checkCanRenameView(SecurityContext context, QualifiedObjectName viewName, QualifiedObjectName newViewName) Description copied from interface:AccessControlCheck if identity is allowed to rename the specified view.- Specified by:
checkCanRenameViewin interfaceAccessControl
-
checkCanSetViewAuthorization
public void checkCanSetViewAuthorization(SecurityContext context, QualifiedObjectName view, TrinoPrincipal principal) Description copied from interface:AccessControlCheck if identity is allowed to change the specified view's user/role.- Specified by:
checkCanSetViewAuthorizationin interfaceAccessControl
-
checkCanDropView
Description copied from interface:AccessControlCheck if identity is allowed to drop the specified view.- Specified by:
checkCanDropViewin interfaceAccessControl
-
checkCanCreateViewWithSelectFromColumns
public void checkCanCreateViewWithSelectFromColumns(SecurityContext context, QualifiedObjectName tableName, Set<String> columnNames) Description copied from interface:AccessControlCheck if identity is allowed to create a view that selects from the specified columns.- Specified by:
checkCanCreateViewWithSelectFromColumnsin interfaceAccessControl
-
checkCanCreateMaterializedView
public void checkCanCreateMaterializedView(SecurityContext context, QualifiedObjectName materializedViewName, Map<String, Object> properties) Description copied from interface:AccessControlCheck if identity is allowed to create the specified materialized view.- Specified by:
checkCanCreateMaterializedViewin interfaceAccessControl
-
checkCanRefreshMaterializedView
public void checkCanRefreshMaterializedView(SecurityContext context, QualifiedObjectName materializedViewName) Description copied from interface:AccessControlCheck if identity is allowed to refresh the specified materialized view.- Specified by:
checkCanRefreshMaterializedViewin interfaceAccessControl
-
checkCanDropMaterializedView
public void checkCanDropMaterializedView(SecurityContext context, QualifiedObjectName materializedViewName) Description copied from interface:AccessControlCheck if identity is allowed to drop the specified materialized view.- Specified by:
checkCanDropMaterializedViewin interfaceAccessControl
-
checkCanRenameMaterializedView
public void checkCanRenameMaterializedView(SecurityContext context, QualifiedObjectName viewName, QualifiedObjectName newViewName) Description copied from interface:AccessControlCheck if identity is allowed to rename the specified materialized view.- Specified by:
checkCanRenameMaterializedViewin interfaceAccessControl
-
checkCanSetMaterializedViewProperties
public void checkCanSetMaterializedViewProperties(SecurityContext context, QualifiedObjectName materializedViewName, Map<String, Optional<Object>> properties) Description copied from interface:AccessControlCheck if identity is allowed to set the properties of the specified materialized view.- Specified by:
checkCanSetMaterializedViewPropertiesin interfaceAccessControl
-
checkCanGrantSchemaPrivilege
public void checkCanGrantSchemaPrivilege(SecurityContext context, Privilege privilege, CatalogSchemaName schemaName, TrinoPrincipal grantee, boolean grantOption) Description copied from interface:AccessControlCheck if identity is allowed to grant a privilege to the grantee on the specified schema.- Specified by:
checkCanGrantSchemaPrivilegein interfaceAccessControl
-
checkCanDenySchemaPrivilege
public void checkCanDenySchemaPrivilege(SecurityContext context, Privilege privilege, CatalogSchemaName schemaName, TrinoPrincipal grantee) Description copied from interface:AccessControlCheck if identity is allowed to deny a privilege to the grantee on the specified schema.- Specified by:
checkCanDenySchemaPrivilegein interfaceAccessControl
-
checkCanRevokeSchemaPrivilege
public void checkCanRevokeSchemaPrivilege(SecurityContext context, Privilege privilege, CatalogSchemaName schemaName, TrinoPrincipal revokee, boolean grantOption) Description copied from interface:AccessControlCheck if identity is allowed to revoke a privilege from the revokee on the specified schema.- Specified by:
checkCanRevokeSchemaPrivilegein interfaceAccessControl
-
checkCanGrantTablePrivilege
public void checkCanGrantTablePrivilege(SecurityContext context, Privilege privilege, QualifiedObjectName tableName, TrinoPrincipal grantee, boolean grantOption) Description copied from interface:AccessControlCheck if identity is allowed to grant a privilege to the grantee on the specified table.- Specified by:
checkCanGrantTablePrivilegein interfaceAccessControl
-
checkCanDenyTablePrivilege
public void checkCanDenyTablePrivilege(SecurityContext context, Privilege privilege, QualifiedObjectName tableName, TrinoPrincipal grantee) Description copied from interface:AccessControlCheck if identity is allowed to deny a privilege to the grantee on the specified table.- Specified by:
checkCanDenyTablePrivilegein interfaceAccessControl
-
checkCanRevokeTablePrivilege
public void checkCanRevokeTablePrivilege(SecurityContext context, Privilege privilege, QualifiedObjectName tableName, TrinoPrincipal revokee, boolean grantOption) Description copied from interface:AccessControlCheck if identity is allowed to revoke a privilege from the revokee on the specified table.- Specified by:
checkCanRevokeTablePrivilegein interfaceAccessControl
-
checkCanSetSystemSessionProperty
Description copied from interface:AccessControlCheck if identity is allowed to set the specified system property.- Specified by:
checkCanSetSystemSessionPropertyin interfaceAccessControl
-
checkCanSetCatalogSessionProperty
public void checkCanSetCatalogSessionProperty(SecurityContext context, String catalogName, String propertyName) Description copied from interface:AccessControlCheck if identity is allowed to set the specified catalog property.- Specified by:
checkCanSetCatalogSessionPropertyin interfaceAccessControl
-
checkCanSelectFromColumns
public void checkCanSelectFromColumns(SecurityContext context, QualifiedObjectName tableName, Set<String> columnNames) Description copied from interface:AccessControlCheck if identity is allowed to select from the specified columns. The column set can be empty.- Specified by:
checkCanSelectFromColumnsin interfaceAccessControl
-
checkCanCreateRole
public void checkCanCreateRole(SecurityContext context, String role, Optional<TrinoPrincipal> grantor, Optional<String> catalogName) Description copied from interface:AccessControlCheck if identity is allowed to create the specified role.- Specified by:
checkCanCreateRolein interfaceAccessControl- Parameters:
catalogName- if present, the role catalog; otherwise the role is a system role
-
checkCanDropRole
Description copied from interface:AccessControlCheck if identity is allowed to drop the specified role.- Specified by:
checkCanDropRolein interfaceAccessControl- Parameters:
catalogName- if present, the role catalog; otherwise the role is a system role
-
checkCanGrantRoles
public void checkCanGrantRoles(SecurityContext context, Set<String> roles, Set<TrinoPrincipal> grantees, boolean adminOption, Optional<TrinoPrincipal> grantor, Optional<String> catalogName) Description copied from interface:AccessControlCheck if identity is allowed to grant the specified roles to the specified principals.- Specified by:
checkCanGrantRolesin interfaceAccessControl- Parameters:
catalogName- if present, the role catalog; otherwise the role is a system role
-
checkCanRevokeRoles
public void checkCanRevokeRoles(SecurityContext context, Set<String> roles, Set<TrinoPrincipal> grantees, boolean adminOption, Optional<TrinoPrincipal> grantor, Optional<String> catalogName) Description copied from interface:AccessControlCheck if identity is allowed to revoke the specified roles from the specified principals.- Specified by:
checkCanRevokeRolesin interfaceAccessControl- Parameters:
catalogName- if present, the role catalog; otherwise the role is a system role
-
checkCanSetCatalogRole
Description copied from interface:AccessControlCheck if identity is allowed to set role for specified catalog.- Specified by:
checkCanSetCatalogRolein interfaceAccessControl- Parameters:
catalog- the role catalog
-
checkCanShowRoles
Description copied from interface:AccessControlCheck if identity is allowed to show roles on the specified catalog.- Specified by:
checkCanShowRolesin interfaceAccessControl- Parameters:
catalogName- if present, the role catalog; otherwise the role is a system role
-
checkCanShowCurrentRoles
Description copied from interface:AccessControlCheck if identity is allowed to show current roles on the specified catalog.- Specified by:
checkCanShowCurrentRolesin interfaceAccessControl- Parameters:
catalogName- if present, the role catalog; otherwise the role is a system role
-
checkCanShowRoleGrants
Description copied from interface:AccessControlCheck if identity is allowed to show its own role grants on the specified catalog.- Specified by:
checkCanShowRoleGrantsin interfaceAccessControl- Parameters:
catalogName- if present, the role catalog; otherwise the role is a system role
-
checkCanExecuteProcedure
Description copied from interface:AccessControlCheck if identity is allowed to execute procedure- Specified by:
checkCanExecuteProcedurein interfaceAccessControl
-
canExecuteFunction
Description copied from interface:AccessControlIs the identity allowed to execute function?- Specified by:
canExecuteFunctionin interfaceAccessControl
-
canCreateViewWithExecuteFunction
public boolean canCreateViewWithExecuteFunction(SecurityContext context, QualifiedObjectName functionName) Description copied from interface:AccessControlIs the identity allowed to create a view that executes the specified function?- Specified by:
canCreateViewWithExecuteFunctionin interfaceAccessControl
-
checkCanExecuteTableProcedure
public void checkCanExecuteTableProcedure(SecurityContext context, QualifiedObjectName tableName, String procedureName) Description copied from interface:AccessControlCheck if identity is allowed to execute given table procedure on given table- Specified by:
checkCanExecuteTableProcedurein interfaceAccessControl
-
checkCanShowFunctions
Description copied from interface:AccessControlCheck if identity is allowed to show functions by executing SHOW FUNCTIONS in a catalog schema.NOTE: This method is only present to give users an error message when listing is not allowed. The
AccessControl.filterFunctions(io.trino.security.SecurityContext, java.lang.String, java.util.Set<io.trino.spi.function.SchemaFunctionName>)method must filter all results for unauthorized users, since there are multiple ways to list functions.- Specified by:
checkCanShowFunctionsin interfaceAccessControl
-
filterFunctions
public Set<SchemaFunctionName> filterFunctions(SecurityContext context, String catalogName, Set<SchemaFunctionName> functionNames) Description copied from interface:AccessControlFilter the list of functions to those visible to the identity.- Specified by:
filterFunctionsin interfaceAccessControl
-
checkCanCreateFunction
Description copied from interface:AccessControlCheck if identity is allowed to create the specified function.- Specified by:
checkCanCreateFunctionin interfaceAccessControl
-
checkCanDropFunction
Description copied from interface:AccessControlCheck if identity is allowed to drop the specified function.- Specified by:
checkCanDropFunctionin interfaceAccessControl
-