|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.hive.ql.security.authorization.plugin.HiveAuthorizerImpl
@InterfaceAudience.LimitedPrivate(value="") @InterfaceStability.Evolving public class HiveAuthorizerImpl
Convenience implementation of HiveAuthorizer.
You can customize the behavior by passing different implementations of
HiveAccessController and HiveAuthorizationValidator to constructor.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.apache.hadoop.hive.ql.security.authorization.plugin.HiveAuthorizer |
|---|
HiveAuthorizer.VERSION |
| Constructor Summary | |
|---|---|
HiveAuthorizerImpl(HiveAccessController accessController,
HiveAuthorizationValidator authValidator)
|
|
| Method Summary | |
|---|---|
void |
applyAuthorizationConfigPolicy(HiveConf hiveConf)
Modify the given HiveConf object to configure authorization related parameters or other parameters related to hive security |
void |
checkPrivileges(HiveOperationType hiveOpType,
List<HivePrivilegeObject> inputHObjs,
List<HivePrivilegeObject> outputHObjs)
Check if user has privileges to do this action on these objects |
void |
createRole(String roleName,
HivePrincipal adminGrantor)
Create role |
void |
dropRole(String roleName)
Drop role |
List<String> |
getAllRoles()
|
List<String> |
getCurrentRoleNames()
|
List<HiveRoleGrant> |
getPrincipalGrantInfoForRole(String roleName)
Get the grant information for principals granted the given role |
List<HiveRoleGrant> |
getRoleGrantInfoForPrincipal(HivePrincipal principal)
Get the grant information of roles the given principal belongs to |
HiveAuthorizer.VERSION |
getVersion()
|
void |
grantPrivileges(List<HivePrincipal> hivePrincipals,
List<HivePrivilege> hivePrivileges,
HivePrivilegeObject hivePrivObject,
HivePrincipal grantorPrincipal,
boolean grantOption)
Grant privileges for principals on the object |
void |
grantRole(List<HivePrincipal> hivePrincipals,
List<String> roles,
boolean grantOption,
HivePrincipal grantorPrinc)
Grant roles in given roles list to principals in given hivePrincipals list |
void |
revokePrivileges(List<HivePrincipal> hivePrincipals,
List<HivePrivilege> hivePrivileges,
HivePrivilegeObject hivePrivObject,
HivePrincipal grantorPrincipal,
boolean grantOption)
Revoke privileges for principals on the object |
void |
revokeRole(List<HivePrincipal> hivePrincipals,
List<String> roles,
boolean grantOption,
HivePrincipal grantorPrinc)
Revoke roles in given roles list to principals in given hivePrincipals list |
void |
setCurrentRole(String roleName)
Set the current role to roleName argument |
List<HivePrivilegeInfo> |
showPrivileges(HivePrincipal principal,
HivePrivilegeObject privObj)
Show privileges for given principal on given object |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HiveAuthorizerImpl(HiveAccessController accessController,
HiveAuthorizationValidator authValidator)
| Method Detail |
|---|
public void grantPrivileges(List<HivePrincipal> hivePrincipals,
List<HivePrivilege> hivePrivileges,
HivePrivilegeObject hivePrivObject,
HivePrincipal grantorPrincipal,
boolean grantOption)
throws HiveAuthzPluginException,
HiveAccessControlException
HiveAuthorizer
grantPrivileges in interface HiveAuthorizerHiveAuthzPluginException
HiveAccessControlException
public void revokePrivileges(List<HivePrincipal> hivePrincipals,
List<HivePrivilege> hivePrivileges,
HivePrivilegeObject hivePrivObject,
HivePrincipal grantorPrincipal,
boolean grantOption)
throws HiveAuthzPluginException,
HiveAccessControlException
HiveAuthorizer
revokePrivileges in interface HiveAuthorizerHiveAuthzPluginException
HiveAccessControlException
public void createRole(String roleName,
HivePrincipal adminGrantor)
throws HiveAuthzPluginException,
HiveAccessControlException
HiveAuthorizer
createRole in interface HiveAuthorizeradminGrantor - - The user in "[ WITH ADMIN HiveAuthzPluginException
HiveAccessControlException
public void dropRole(String roleName)
throws HiveAuthzPluginException,
HiveAccessControlException
HiveAuthorizer
dropRole in interface HiveAuthorizerHiveAuthzPluginException
HiveAccessControlException
public void grantRole(List<HivePrincipal> hivePrincipals,
List<String> roles,
boolean grantOption,
HivePrincipal grantorPrinc)
throws HiveAuthzPluginException,
HiveAccessControlException
HiveAuthorizer
grantRole in interface HiveAuthorizerHiveAuthzPluginException
HiveAccessControlException
public void revokeRole(List<HivePrincipal> hivePrincipals,
List<String> roles,
boolean grantOption,
HivePrincipal grantorPrinc)
throws HiveAuthzPluginException,
HiveAccessControlException
HiveAuthorizer
revokeRole in interface HiveAuthorizerHiveAuthzPluginException
HiveAccessControlException
public void checkPrivileges(HiveOperationType hiveOpType,
List<HivePrivilegeObject> inputHObjs,
List<HivePrivilegeObject> outputHObjs)
throws HiveAuthzPluginException,
HiveAccessControlException
HiveAuthorizer
checkPrivileges in interface HiveAuthorizerHiveAuthzPluginException
HiveAccessControlException
public List<String> getAllRoles()
throws HiveAuthzPluginException,
HiveAccessControlException
getAllRoles in interface HiveAuthorizerHiveAuthzPluginException
HiveAccessControlException
public List<HivePrivilegeInfo> showPrivileges(HivePrincipal principal,
HivePrivilegeObject privObj)
throws HiveAuthzPluginException,
HiveAccessControlException
HiveAuthorizer
showPrivileges in interface HiveAuthorizerHiveAuthzPluginException
HiveAccessControlExceptionpublic HiveAuthorizer.VERSION getVersion()
getVersion in interface HiveAuthorizer
public void setCurrentRole(String roleName)
throws HiveAccessControlException,
HiveAuthzPluginException
HiveAuthorizer
setCurrentRole in interface HiveAuthorizerHiveAccessControlException
HiveAuthzPluginException
public List<String> getCurrentRoleNames()
throws HiveAuthzPluginException
getCurrentRoleNames in interface HiveAuthorizerHiveAuthzPluginException
public List<HiveRoleGrant> getPrincipalGrantInfoForRole(String roleName)
throws HiveAuthzPluginException,
HiveAccessControlException
HiveAuthorizer
getPrincipalGrantInfoForRole in interface HiveAuthorizerHiveAuthzPluginException
HiveAccessControlException
public List<HiveRoleGrant> getRoleGrantInfoForPrincipal(HivePrincipal principal)
throws HiveAuthzPluginException,
HiveAccessControlException
HiveAuthorizer
getRoleGrantInfoForPrincipal in interface HiveAuthorizerHiveAuthzPluginException
HiveAccessControlExceptionpublic void applyAuthorizationConfigPolicy(HiveConf hiveConf)
HiveAuthorizer
applyAuthorizationConfigPolicy in interface HiveAuthorizer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||