org.apache.hadoop.hbase.security
Class Superusers

java.lang.Object
  extended by org.apache.hadoop.hbase.security.Superusers

@InterfaceAudience.Private
public final class Superusers
extends Object

Keeps lists of superusers and super groups loaded from HBase configuration, checks if certain user is regarded as superuser.


Field Summary
static String SUPERUSER_CONF_KEY
          Configuration key for superusers
 
Method Summary
static List<String> getSuperUsers()
           
static void initialize(org.apache.hadoop.conf.Configuration conf)
          Should be called only once to pre-load list of super users and super groups from Configuration.
static boolean isSuperUser(String user)
          Deprecated. Use isSuperUser(User)
static boolean isSuperUser(User user)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SUPERUSER_CONF_KEY

public static final String SUPERUSER_CONF_KEY
Configuration key for superusers

See Also:
Constant Field Values
Method Detail

initialize

public static void initialize(org.apache.hadoop.conf.Configuration conf)
                       throws IOException
Should be called only once to pre-load list of super users and super groups from Configuration. This operation is idempotent.

Parameters:
conf - configuration to load users from
Throws:
IOException - if unable to initialize lists of superusers or super groups
IllegalStateException - if current user is null

isSuperUser

public static boolean isSuperUser(User user)
Parameters:
user - to check
Returns:
true if current user is a super user (whether as user running process, declared as individual superuser or member of supergroup), false otherwise.
Throws:
IllegalStateException - if lists of superusers/super groups haven't been initialized properly

isSuperUser

@Deprecated
public static boolean isSuperUser(String user)
Deprecated. Use isSuperUser(User)

Parameters:
user - to check
Returns:
true if user is a super user, false otherwise.
Throws:
IllegalStateException - if lists of superusers/super groups haven't been initialized properly

getSuperUsers

public static List<String> getSuperUsers()


Copyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.