Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
com.cloudera.impala.util.SentryPolicyService Class Reference
Collaboration diagram for com.cloudera.impala.util.SentryPolicyService:

Classes

class  SentryServiceClient
 

Public Member Functions

 SentryPolicyService (SentryConfig config)
 
void dropRole (User requestingUser, String roleName, boolean ifExists) throws ImpalaException
 
void createRole (User requestingUser, String roleName, boolean ifNotExists) throws ImpalaException
 
void grantRoleToGroup (User requestingUser, String roleName, String groupName) throws ImpalaException
 
void revokeRoleFromGroup (User requestingUser, String roleName, String groupName) throws ImpalaException
 
void grantRolePrivilege (User requestingUser, String roleName, TPrivilege privilege) throws ImpalaException
 
void revokeRolePrivilege (User requestingUser, String roleName, TPrivilege privilege) throws ImpalaException
 
List< TSentryRole > listUserRoles (User requestingUser) throws ImpalaException
 
List< TSentryRole > listAllRoles (User requestingUser) throws ImpalaException
 
List< TSentryPrivilege > listRolePrivileges (User requestingUser, String roleName) throws ImpalaException
 

Static Public Member Functions

static TPrivilege sentryPrivilegeToTPrivilege (TSentryPrivilege sentryPriv)
 

Private Attributes

final String ACCESS_DENIED_ERROR_MSG
 
final SentryConfig config_
 

Static Private Attributes

static final Logger LOG = LoggerFactory.getLogger(SentryPolicyService.class)
 

Detailed Description

Wrapper around the SentryService APIs that are used by Impala and Impala tests.

Definition at line 44 of file SentryPolicyService.java.

Constructor & Destructor Documentation

com.cloudera.impala.util.SentryPolicyService.SentryPolicyService ( SentryConfig  config)
inline

Member Function Documentation

void com.cloudera.impala.util.SentryPolicyService.createRole ( User  requestingUser,
String  roleName,
boolean  ifNotExists 
) throws ImpalaException
inline

Creates a new role.

Parameters
requestingUser- The requesting user.
roleName- The role to create.
ifNotExists- If true, no error is thrown if the role already exists.
Exceptions
ImpalaException- On any error creating the role.

Definition at line 134 of file SentryPolicyService.java.

References com.cloudera.impala.util.SentryPolicyService.ACCESS_DENIED_ERROR_MSG.

void com.cloudera.impala.util.SentryPolicyService.dropRole ( User  requestingUser,
String  roleName,
boolean  ifExists 
) throws ImpalaException
inline

Drops a role.

Parameters
requestingUser- The requesting user.
roleName- The role to drop.
ifExists- If true, no error is thrown if the role does not exist.
Exceptions
ImpalaException- On any error dropping the role.

Definition at line 105 of file SentryPolicyService.java.

References com.cloudera.impala.util.SentryPolicyService.ACCESS_DENIED_ERROR_MSG.

void com.cloudera.impala.util.SentryPolicyService.grantRolePrivilege ( User  requestingUser,
String  roleName,
TPrivilege  privilege 
) throws ImpalaException
inline

Grants privileges to an existing role.

Parameters
requestingUser- The requesting user.
roleName- The role to grant privileges to (case insensitive).
privilege- The privilege to grant.
Exceptions
ImpalaException- On any error

Definition at line 216 of file SentryPolicyService.java.

References com.cloudera.impala.util.SentryPolicyService.ACCESS_DENIED_ERROR_MSG.

void com.cloudera.impala.util.SentryPolicyService.grantRoleToGroup ( User  requestingUser,
String  roleName,
String  groupName 
) throws ImpalaException
inline

Grants a role to a group.

Parameters
requestingUser- The requesting user.
roleName- The role to grant to a group. Role must already exist.
groupName- The group to grant the role to.
Exceptions
ImpalaException- On any error.

Definition at line 162 of file SentryPolicyService.java.

References com.cloudera.impala.util.SentryPolicyService.ACCESS_DENIED_ERROR_MSG.

List<TSentryRole> com.cloudera.impala.util.SentryPolicyService.listAllRoles ( User  requestingUser) throws ImpalaException
inline
List<TSentryPrivilege> com.cloudera.impala.util.SentryPolicyService.listRolePrivileges ( User  requestingUser,
String  roleName 
) throws ImpalaException
inline

Lists all privileges granted to a role.

Definition at line 349 of file SentryPolicyService.java.

References com.cloudera.impala.util.SentryPolicyService.ACCESS_DENIED_ERROR_MSG.

Referenced by com.cloudera.impala.util.SentryProxy.PolicyReader.run().

List<TSentryRole> com.cloudera.impala.util.SentryPolicyService.listUserRoles ( User  requestingUser) throws ImpalaException
inline

Lists all roles granted to all groups a user belongs to.

Definition at line 312 of file SentryPolicyService.java.

References com.cloudera.impala.util.SentryPolicyService.ACCESS_DENIED_ERROR_MSG.

void com.cloudera.impala.util.SentryPolicyService.revokeRoleFromGroup ( User  requestingUser,
String  roleName,
String  groupName 
) throws ImpalaException
inline

Removes a role from a group.

Parameters
requestingUser- The requesting user.
roleName- The role name to remove.
groupName- The group to remove the role from.
Exceptions
InternalException- On any error.

Definition at line 189 of file SentryPolicyService.java.

References com.cloudera.impala.util.SentryPolicyService.ACCESS_DENIED_ERROR_MSG.

void com.cloudera.impala.util.SentryPolicyService.revokeRolePrivilege ( User  requestingUser,
String  roleName,
TPrivilege  privilege 
) throws ImpalaException
inline

Revokes privileges from an existing role.

Parameters
requestingUser- The requesting user.
roleName- The role to grant privileges to (case insensitive).
privilege- The privilege to grant to the object.
Exceptions
ImpalaException- On any error

Definition at line 267 of file SentryPolicyService.java.

References com.cloudera.impala.util.SentryPolicyService.ACCESS_DENIED_ERROR_MSG.

static TPrivilege com.cloudera.impala.util.SentryPolicyService.sentryPrivilegeToTPrivilege ( TSentryPrivilege  sentryPriv)
inlinestatic

Utility function that converts a TSentryPrivilege to an Impala TPrivilege object.

Definition at line 369 of file SentryPolicyService.java.

References impala_udf.ALL.

Member Data Documentation

final SentryConfig com.cloudera.impala.util.SentryPolicyService.config_
private
final Logger com.cloudera.impala.util.SentryPolicyService.LOG = LoggerFactory.getLogger(SentryPolicyService.class)
staticprivate

Definition at line 45 of file SentryPolicyService.java.


The documentation for this class was generated from the following file: