Class SqlStandardAccessControlMetadata
java.lang.Object
io.trino.plugin.hive.security.SqlStandardAccessControlMetadata
- All Implemented Interfaces:
AccessControlMetadata
-
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateRole(ConnectorSession session, String role, Optional<HivePrincipal> grantor) Creates the specified role.voiddropRole(ConnectorSession session, String role) Drops the specified role.getSchemaOwner(ConnectorSession session, String schemaName) Get the owner on the specified schemavoidgrantRoles(ConnectorSession session, Set<String> roles, Set<HivePrincipal> grantees, boolean adminOption, Optional<HivePrincipal> grantor) Grants the specified roles to the specified granteesvoidgrantTablePrivileges(ConnectorSession session, SchemaTableName schemaTableName, Set<Privilege> privileges, HivePrincipal grantee, boolean grantOption) Grants the specified privilege to the specified user on the specified tablelistApplicableRoles(ConnectorSession session, HivePrincipal principal) List applicable roles, including the transitive grants, for the specified principallistEnabledRoles(ConnectorSession session) List applicable roles, including the transitive grants, in given sessionlistRoleGrants(ConnectorSession session, HivePrincipal principal) List role grants for a given principal, not recursively.listRoles(ConnectorSession session) List available roles.listTablePrivileges(ConnectorSession session, List<SchemaTableName> tableNames) List the table privileges granted to the specified grantee for the tables that have the specified prefix considering the selected session rolevoidrevokeRoles(ConnectorSession session, Set<String> roles, Set<HivePrincipal> grantees, boolean adminOption, Optional<HivePrincipal> grantor) Revokes the specified roles from the specified granteesvoidrevokeTablePrivileges(ConnectorSession session, SchemaTableName schemaTableName, Set<Privilege> privileges, HivePrincipal grantee, boolean grantOption) Revokes the specified privilege on the specified table from the specified userMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.trino.plugin.hive.security.AccessControlMetadata
grantSchemaPrivileges, isUsingSystemSecurity, revokeSchemaPrivileges, roleExists
-
Constructor Details
-
SqlStandardAccessControlMetadata
-
-
Method Details
-
createRole
Description copied from interface:AccessControlMetadataCreates the specified role.- Specified by:
createRolein interfaceAccessControlMetadata- Parameters:
grantor- represents the principal specified by WITH ADMIN statement
-
dropRole
Description copied from interface:AccessControlMetadataDrops the specified role.- Specified by:
dropRolein interfaceAccessControlMetadata
-
listRoles
Description copied from interface:AccessControlMetadataList available roles.- Specified by:
listRolesin interfaceAccessControlMetadata
-
listRoleGrants
Description copied from interface:AccessControlMetadataList role grants for a given principal, not recursively.- Specified by:
listRoleGrantsin interfaceAccessControlMetadata
-
grantRoles
public void grantRoles(ConnectorSession session, Set<String> roles, Set<HivePrincipal> grantees, boolean adminOption, Optional<HivePrincipal> grantor) Description copied from interface:AccessControlMetadataGrants the specified roles to the specified grantees- Specified by:
grantRolesin interfaceAccessControlMetadata- Parameters:
grantor- represents the principal specified by GRANTED BY statement
-
revokeRoles
public void revokeRoles(ConnectorSession session, Set<String> roles, Set<HivePrincipal> grantees, boolean adminOption, Optional<HivePrincipal> grantor) Description copied from interface:AccessControlMetadataRevokes the specified roles from the specified grantees- Specified by:
revokeRolesin interfaceAccessControlMetadata- Parameters:
grantor- represents the principal specified by GRANTED BY statement
-
listApplicableRoles
Description copied from interface:AccessControlMetadataList applicable roles, including the transitive grants, for the specified principal- Specified by:
listApplicableRolesin interfaceAccessControlMetadata
-
listEnabledRoles
Description copied from interface:AccessControlMetadataList applicable roles, including the transitive grants, in given session- Specified by:
listEnabledRolesin interfaceAccessControlMetadata
-
getSchemaOwner
Description copied from interface:AccessControlMetadataGet the owner on the specified schema- Specified by:
getSchemaOwnerin interfaceAccessControlMetadata
-
grantTablePrivileges
public void grantTablePrivileges(ConnectorSession session, SchemaTableName schemaTableName, Set<Privilege> privileges, HivePrincipal grantee, boolean grantOption) Description copied from interface:AccessControlMetadataGrants the specified privilege to the specified user on the specified table- Specified by:
grantTablePrivilegesin interfaceAccessControlMetadata
-
revokeTablePrivileges
public void revokeTablePrivileges(ConnectorSession session, SchemaTableName schemaTableName, Set<Privilege> privileges, HivePrincipal grantee, boolean grantOption) Description copied from interface:AccessControlMetadataRevokes the specified privilege on the specified table from the specified user- Specified by:
revokeTablePrivilegesin interfaceAccessControlMetadata
-
listTablePrivileges
public List<GrantInfo> listTablePrivileges(ConnectorSession session, List<SchemaTableName> tableNames) Description copied from interface:AccessControlMetadataList the table privileges granted to the specified grantee for the tables that have the specified prefix considering the selected session role- Specified by:
listTablePrivilegesin interfaceAccessControlMetadata
-