@InterfaceAudience.Private public class SQLStdHiveAccessController extends Object implements HiveAccessController
Modifier and Type | Field and Description |
---|---|
static org.apache.commons.logging.Log |
LOG |
Constructor and Description |
---|
SQLStdHiveAccessController(HiveMetastoreClientFactory metastoreClientFactory,
HiveConf conf,
HiveAuthenticationProvider authenticator,
HiveAuthzSessionContext ctx) |
public SQLStdHiveAccessController(HiveMetastoreClientFactory metastoreClientFactory, HiveConf conf, HiveAuthenticationProvider authenticator, HiveAuthzSessionContext ctx) throws HiveAuthzPluginException
HiveAuthzPluginException
public void grantPrivileges(List<HivePrincipal> hivePrincipals, List<HivePrivilege> hivePrivileges, HivePrivilegeObject hivePrivObject, HivePrincipal grantorPrincipal, boolean grantOption) throws HiveAuthzPluginException, HiveAccessControlException
grantPrivileges
in interface HiveAccessController
HiveAuthzPluginException
HiveAccessControlException
public List<String> getCurrentRoleNames() throws HiveAuthzPluginException
getCurrentRoleNames
in interface HiveAccessController
HiveAuthzPluginException
public void revokePrivileges(List<HivePrincipal> hivePrincipals, List<HivePrivilege> hivePrivileges, HivePrivilegeObject hivePrivObject, HivePrincipal grantorPrincipal, boolean grantOption) throws HiveAuthzPluginException, HiveAccessControlException
revokePrivileges
in interface HiveAccessController
HiveAuthzPluginException
HiveAccessControlException
public void createRole(String roleName, HivePrincipal adminGrantor) throws HiveAuthzPluginException, HiveAccessControlException
createRole
in interface HiveAccessController
HiveAuthzPluginException
HiveAccessControlException
public void dropRole(String roleName) throws HiveAuthzPluginException, HiveAccessControlException
dropRole
in interface HiveAccessController
HiveAuthzPluginException
HiveAccessControlException
public void grantRole(List<HivePrincipal> hivePrincipals, List<String> roleNames, boolean grantOption, HivePrincipal grantorPrinc) throws HiveAuthzPluginException, HiveAccessControlException
grantRole
in interface HiveAccessController
HiveAuthzPluginException
HiveAccessControlException
public void revokeRole(List<HivePrincipal> hivePrincipals, List<String> roleNames, boolean grantOption, HivePrincipal grantorPrinc) throws HiveAuthzPluginException, HiveAccessControlException
revokeRole
in interface HiveAccessController
HiveAuthzPluginException
HiveAccessControlException
public List<String> getAllRoles() throws HiveAuthzPluginException, HiveAccessControlException
getAllRoles
in interface HiveAccessController
HiveAuthzPluginException
HiveAccessControlException
public List<HiveRoleGrant> getPrincipalGrantInfoForRole(String roleName) throws HiveAuthzPluginException, HiveAccessControlException
getPrincipalGrantInfoForRole
in interface HiveAccessController
HiveAuthzPluginException
HiveAccessControlException
public static List<HiveRoleGrant> getHiveRoleGrants(IMetaStoreClient client, String roleName) throws Exception
Exception
public List<HivePrivilegeInfo> showPrivileges(HivePrincipal principal, HivePrivilegeObject privObj) throws HiveAuthzPluginException
showPrivileges
in interface HiveAccessController
HiveAuthzPluginException
public void setCurrentRole(String roleName) throws HiveAccessControlException, HiveAuthzPluginException
setCurrentRole
in interface HiveAccessController
HiveAccessControlException
HiveAuthzPluginException
public List<HiveRoleGrant> getRoleGrantInfoForPrincipal(HivePrincipal principal) throws HiveAuthzPluginException, HiveAccessControlException
getRoleGrantInfoForPrincipal
in interface HiveAccessController
HiveAuthzPluginException
HiveAccessControlException
public void applyAuthorizationConfigPolicy(HiveConf hiveConf) throws HiveAuthzPluginException
applyAuthorizationConfigPolicy
in interface HiveAccessController
HiveAuthzPluginException
Copyright © 2017 The Apache Software Foundation. All rights reserved.