public interface AccessControlMetadata
| Modifier and Type | Method and Description |
|---|---|
default void |
createRole(ConnectorSession session,
String role,
Optional<HivePrincipal> grantor)
Creates the specified role.
|
default void |
dropRole(ConnectorSession session,
String role)
Drops the specified role.
|
default void |
grantRoles(ConnectorSession connectorSession,
Set<String> roles,
Set<HivePrincipal> grantees,
boolean adminOption,
Optional<HivePrincipal> grantor)
Grants the specified roles to the specified grantees
|
default void |
grantTablePrivileges(ConnectorSession session,
SchemaTableName tableName,
Set<Privilege> privileges,
HivePrincipal grantee,
boolean grantOption)
Grants the specified privilege to the specified user on the specified table
|
default Set<RoleGrant> |
listApplicableRoles(ConnectorSession session,
HivePrincipal principal)
List applicable roles, including the transitive grants, for the specified principal
|
default Set<String> |
listEnabledRoles(ConnectorSession session)
List applicable roles, including the transitive grants, in given session
|
default Set<RoleGrant> |
listRoleGrants(ConnectorSession session,
HivePrincipal principal)
List role grants for a given principal, not recursively.
|
default Set<String> |
listRoles(ConnectorSession session)
List available roles.
|
default List<GrantInfo> |
listTablePrivileges(ConnectorSession session,
List<SchemaTableName> tableName)
List the table privileges granted to the specified grantee for the tables that have the specified prefix considering the selected session role
|
default void |
revokeRoles(ConnectorSession connectorSession,
Set<String> roles,
Set<HivePrincipal> grantees,
boolean adminOption,
Optional<HivePrincipal> grantor)
Revokes the specified roles from the specified grantees
|
default void |
revokeTablePrivileges(ConnectorSession session,
SchemaTableName tableName,
Set<Privilege> privileges,
HivePrincipal grantee,
boolean grantOption)
Revokes the specified privilege on the specified table from the specified user
|
default void createRole(ConnectorSession session, String role, Optional<HivePrincipal> grantor)
grantor - represents the principal specified by WITH ADMIN statementdefault void dropRole(ConnectorSession session, String role)
default Set<String> listRoles(ConnectorSession session)
default Set<RoleGrant> listRoleGrants(ConnectorSession session, HivePrincipal principal)
default void grantRoles(ConnectorSession connectorSession, Set<String> roles, Set<HivePrincipal> grantees, boolean adminOption, Optional<HivePrincipal> grantor)
grantor - represents the principal specified by GRANTED BY statementdefault void revokeRoles(ConnectorSession connectorSession, Set<String> roles, Set<HivePrincipal> grantees, boolean adminOption, Optional<HivePrincipal> grantor)
grantor - represents the principal specified by GRANTED BY statementdefault Set<RoleGrant> listApplicableRoles(ConnectorSession session, HivePrincipal principal)
default Set<String> listEnabledRoles(ConnectorSession session)
default void grantTablePrivileges(ConnectorSession session, SchemaTableName tableName, Set<Privilege> privileges, HivePrincipal grantee, boolean grantOption)
default void revokeTablePrivileges(ConnectorSession session, SchemaTableName tableName, Set<Privilege> privileges, HivePrincipal grantee, boolean grantOption)
default List<GrantInfo> listTablePrivileges(ConnectorSession session, List<SchemaTableName> tableName)
Copyright © 2012–2020. All rights reserved.