Package io.trino.security
Class ViewAccessControl
java.lang.Object
io.trino.security.ForwardingAccessControl
io.trino.security.ViewAccessControl
- All Implemented Interfaces:
AccessControl
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckCanCreateViewWithSelectFromColumns(SecurityContext context, QualifiedObjectName tableName, Set<String> columnNames) Check if identity is allowed to create a view that selects from the specified columns.voidcheckCanExecuteFunction(SecurityContext context, FunctionKind functionKind, QualifiedObjectName functionName) Check if identity is allowed to execute functionvoidcheckCanExecuteFunction(SecurityContext context, String functionName) Check if identity is allowed to execute functionvoidcheckCanGrantExecuteFunctionPrivilege(SecurityContext context, String functionName, Identity grantee, boolean grantOption) Check if identity is allowed to create a view that executes the function.voidcheckCanSelectFromColumns(SecurityContext context, QualifiedObjectName tableName, Set<String> columnNames) Check if identity is allowed to select from the specified columns.protected AccessControldelegate()filterColumns(SecurityContext context, CatalogSchemaTableName tableName, Set<String> columns) Filter the list of columns 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.getColumnMask(SecurityContext context, QualifiedObjectName tableName, String columnName, Type type) getRowFilters(SecurityContext context, QualifiedObjectName tableName) Methods inherited from class io.trino.security.ForwardingAccessControl
checkCanAddColumns, checkCanAlterColumn, checkCanCreateCatalog, checkCanCreateMaterializedView, checkCanCreateRole, checkCanCreateSchema, checkCanCreateTable, checkCanCreateView, checkCanDeleteFromTable, checkCanDenySchemaPrivilege, checkCanDenyTablePrivilege, checkCanDropCatalog, checkCanDropColumn, checkCanDropMaterializedView, checkCanDropRole, checkCanDropSchema, checkCanDropTable, checkCanDropView, checkCanExecuteProcedure, checkCanExecuteQuery, checkCanExecuteTableProcedure, checkCanGrantExecuteFunctionPrivilege, checkCanGrantRoles, checkCanGrantSchemaPrivilege, checkCanGrantTablePrivilege, checkCanImpersonateUser, checkCanInsertIntoTable, checkCanKillQueryOwnedBy, checkCanReadSystemInformation, checkCanRefreshMaterializedView, checkCanRenameColumn, checkCanRenameMaterializedView, checkCanRenameSchema, checkCanRenameTable, checkCanRenameView, checkCanRevokeRoles, checkCanRevokeSchemaPrivilege, checkCanRevokeTablePrivilege, checkCanSetCatalogRole, checkCanSetCatalogSessionProperty, checkCanSetColumnComment, checkCanSetMaterializedViewProperties, checkCanSetSchemaAuthorization, checkCanSetSystemSessionProperty, checkCanSetTableAuthorization, checkCanSetTableComment, checkCanSetTableProperties, checkCanSetUser, checkCanSetViewAuthorization, checkCanSetViewComment, checkCanShowColumns, checkCanShowCreateSchema, checkCanShowCreateTable, checkCanShowCurrentRoles, checkCanShowRoleGrants, checkCanShowRoles, checkCanShowSchemas, checkCanShowTables, checkCanTruncateTable, checkCanUpdateTableColumns, checkCanViewQueryOwnedBy, checkCanWriteSystemInformation, filterCatalogs, filterQueriesOwnedBy, filterSchemas, filterTables, of
-
Constructor Details
-
ViewAccessControl
-
-
Method Details
-
delegate
- Specified by:
delegatein classForwardingAccessControl
-
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- Overrides:
checkCanSelectFromColumnsin classForwardingAccessControl
-
filterColumns
public Set<String> filterColumns(SecurityContext context, CatalogSchemaTableName tableName, Set<String> columns) Description copied from interface:AccessControlFilter the list of columns to those visible to the identity.- Specified by:
filterColumnsin interfaceAccessControl- Overrides:
filterColumnsin classForwardingAccessControl
-
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- Overrides:
filterColumnsin classForwardingAccessControl
-
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- Overrides:
checkCanCreateViewWithSelectFromColumnsin classForwardingAccessControl
-
checkCanExecuteFunction
Description copied from interface:AccessControlCheck if identity is allowed to execute function- Specified by:
checkCanExecuteFunctionin interfaceAccessControl- Overrides:
checkCanExecuteFunctionin classForwardingAccessControl
-
checkCanExecuteFunction
public void checkCanExecuteFunction(SecurityContext context, FunctionKind functionKind, QualifiedObjectName functionName) Description copied from interface:AccessControlCheck if identity is allowed to execute function- Specified by:
checkCanExecuteFunctionin interfaceAccessControl- Overrides:
checkCanExecuteFunctionin classForwardingAccessControl
-
checkCanGrantExecuteFunctionPrivilege
public void checkCanGrantExecuteFunctionPrivilege(SecurityContext context, String functionName, Identity grantee, boolean grantOption) Description copied from interface:AccessControlCheck if identity is allowed to create a view that executes the function.- Specified by:
checkCanGrantExecuteFunctionPrivilegein interfaceAccessControl- Overrides:
checkCanGrantExecuteFunctionPrivilegein classForwardingAccessControl
-
getRowFilters
- Specified by:
getRowFiltersin interfaceAccessControl- Overrides:
getRowFiltersin classForwardingAccessControl
-
getColumnMask
public Optional<ViewExpression> getColumnMask(SecurityContext context, QualifiedObjectName tableName, String columnName, Type type) - Specified by:
getColumnMaskin interfaceAccessControl- Overrides:
getColumnMaskin classForwardingAccessControl
-