org.apache.hadoop.hive.ql.security
Class DummyHiveMetastoreAuthorizationProvider

java.lang.Object
  extended by org.apache.hadoop.hive.ql.security.DummyHiveMetastoreAuthorizationProvider
All Implemented Interfaces:
HiveAuthorizationProvider, HiveMetastoreAuthorizationProvider

public class DummyHiveMetastoreAuthorizationProvider
extends Object
implements HiveMetastoreAuthorizationProvider


Nested Class Summary
static class DummyHiveMetastoreAuthorizationProvider.AuthCallContextType
           
 
Field Summary
static List<org.apache.hadoop.hive.ql.security.DummyHiveMetastoreAuthorizationProvider.AuthCallContext> authCalls
           
protected  HiveAuthenticationProvider authenticator
           
static org.apache.commons.logging.Log LOG
           
 
Constructor Summary
DummyHiveMetastoreAuthorizationProvider()
           
 
Method Summary
 void authorize(Database db, Privilege[] readRequiredPriv, Privilege[] writeRequiredPriv)
          Authorization privileges against a database object.
 void authorize(Partition part, Privilege[] readRequiredPriv, Privilege[] writeRequiredPriv)
          Authorization privileges against a hive partition object.
 void authorize(Privilege[] readRequiredPriv, Privilege[] writeRequiredPriv)
          Authorization user level privileges.
 void authorize(Table table, Partition part, List<String> columns, Privilege[] readRequiredPriv, Privilege[] writeRequiredPriv)
          Authorization privileges against a list of columns.
 void authorize(Table table, Privilege[] readRequiredPriv, Privilege[] writeRequiredPriv)
          Authorization privileges against a hive table object.
 HiveAuthenticationProvider getAuthenticator()
           
 Configuration getConf()
           
 void init(Configuration conf)
           
 void setAuthenticator(HiveAuthenticationProvider authenticator)
           
 void setConf(Configuration conf)
           
 void setMetaStoreHandler(HiveMetaStore.HMSHandler handler)
          Allows invoker of HiveMetaStoreAuthorizationProvider to send in a hive metastore handler that can be used to make calls to test whether or not authorizations can/will succeed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

authenticator

protected HiveAuthenticationProvider authenticator

authCalls

public static final List<org.apache.hadoop.hive.ql.security.DummyHiveMetastoreAuthorizationProvider.AuthCallContext> authCalls

LOG

public static final org.apache.commons.logging.Log LOG
Constructor Detail

DummyHiveMetastoreAuthorizationProvider

public DummyHiveMetastoreAuthorizationProvider()
Method Detail

getConf

public Configuration getConf()

setConf

public void setConf(Configuration conf)

getAuthenticator

public HiveAuthenticationProvider getAuthenticator()
Specified by:
getAuthenticator in interface HiveAuthorizationProvider

setAuthenticator

public void setAuthenticator(HiveAuthenticationProvider authenticator)
Specified by:
setAuthenticator in interface HiveAuthorizationProvider

init

public void init(Configuration conf)
          throws HiveException
Specified by:
init in interface HiveAuthorizationProvider
Throws:
HiveException

authorize

public void authorize(Privilege[] readRequiredPriv,
                      Privilege[] writeRequiredPriv)
               throws HiveException,
                      AuthorizationException
Description copied from interface: HiveAuthorizationProvider
Authorization user level privileges.

Specified by:
authorize in interface HiveAuthorizationProvider
Parameters:
readRequiredPriv - a list of privileges needed for inputs.
writeRequiredPriv - a list of privileges needed for outputs.
Throws:
HiveException
AuthorizationException

authorize

public void authorize(Database db,
                      Privilege[] readRequiredPriv,
                      Privilege[] writeRequiredPriv)
               throws HiveException,
                      AuthorizationException
Description copied from interface: HiveAuthorizationProvider
Authorization privileges against a database object.

Specified by:
authorize in interface HiveAuthorizationProvider
Parameters:
db - database
readRequiredPriv - a list of privileges needed for inputs.
writeRequiredPriv - a list of privileges needed for outputs.
Throws:
HiveException
AuthorizationException

authorize

public void authorize(Table table,
                      Privilege[] readRequiredPriv,
                      Privilege[] writeRequiredPriv)
               throws HiveException,
                      AuthorizationException
Description copied from interface: HiveAuthorizationProvider
Authorization privileges against a hive table object.

Specified by:
authorize in interface HiveAuthorizationProvider
Parameters:
table - table object
readRequiredPriv - a list of privileges needed for inputs.
writeRequiredPriv - a list of privileges needed for outputs.
Throws:
HiveException
AuthorizationException

authorize

public void authorize(Partition part,
                      Privilege[] readRequiredPriv,
                      Privilege[] writeRequiredPriv)
               throws HiveException,
                      AuthorizationException
Description copied from interface: HiveAuthorizationProvider
Authorization privileges against a hive partition object.

Specified by:
authorize in interface HiveAuthorizationProvider
Parameters:
part - partition object
readRequiredPriv - a list of privileges needed for inputs.
writeRequiredPriv - a list of privileges needed for outputs.
Throws:
HiveException
AuthorizationException

authorize

public void authorize(Table table,
                      Partition part,
                      List<String> columns,
                      Privilege[] readRequiredPriv,
                      Privilege[] writeRequiredPriv)
               throws HiveException,
                      AuthorizationException
Description copied from interface: HiveAuthorizationProvider
Authorization privileges against a list of columns. If the partition object is not null, look at the column grants for the given partition. Otherwise look at the table column grants.

Specified by:
authorize in interface HiveAuthorizationProvider
Parameters:
table - table object
part - partition object
columns - a list of columns
readRequiredPriv - a list of privileges needed for inputs.
writeRequiredPriv - a list of privileges needed for outputs.
Throws:
HiveException
AuthorizationException

setMetaStoreHandler

public void setMetaStoreHandler(HiveMetaStore.HMSHandler handler)
Description copied from interface: HiveMetastoreAuthorizationProvider
Allows invoker of HiveMetaStoreAuthorizationProvider to send in a hive metastore handler that can be used to make calls to test whether or not authorizations can/will succeed. Intended to be called before any of the authorize methods are called.

Specified by:
setMetaStoreHandler in interface HiveMetastoreAuthorizationProvider


Copyright © 2012 The Apache Software Foundation