org.apache.hadoop.hbase.security.visibility
Class VisibilityClient

java.lang.Object
  extended by org.apache.hadoop.hbase.security.visibility.VisibilityClient

@InterfaceAudience.Public
@InterfaceStability.Unstable
public class VisibilityClient
extends Object

Utility client for doing visibility labels admin operations.


Constructor Summary
VisibilityClient()
           
 
Method Summary
static org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabelsResponse addLabel(org.apache.hadoop.conf.Configuration conf, String label)
          Utility method for adding label to the system.
static org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabelsResponse addLabels(org.apache.hadoop.conf.Configuration conf, String[] labels)
          Utility method for adding labels to the system.
static org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabelsResponse clearAuths(org.apache.hadoop.conf.Configuration conf, String[] auths, String user)
          Removes given labels from user's globally authorized list of labels.
static org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.GetAuthsResponse getAuths(org.apache.hadoop.conf.Configuration conf, String user)
           
static boolean isCellVisibilityEnabled(org.apache.hadoop.conf.Configuration conf)
          Return true if cell visibility features are supported and enabled
static org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.ListLabelsResponse listLabels(org.apache.hadoop.conf.Configuration conf, String regex)
          Retrieve the list of visibility labels defined in the system.
static org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabelsResponse setAuths(org.apache.hadoop.conf.Configuration conf, String[] auths, String user)
          Sets given labels globally authorized for the user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VisibilityClient

public VisibilityClient()
Method Detail

isCellVisibilityEnabled

public static boolean isCellVisibilityEnabled(org.apache.hadoop.conf.Configuration conf)
                                       throws IOException
Return true if cell visibility features are supported and enabled

Parameters:
conf -
Returns:
true if cell visibility features are supported and enabled, false otherwise
Throws:
IOException

addLabel

public static org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabelsResponse addLabel(org.apache.hadoop.conf.Configuration conf,
                                                                                                                  String label)
                                                                                                           throws Throwable
Utility method for adding label to the system.

Parameters:
conf -
label -
Returns:
VisibilityLabelsResponse
Throws:
Throwable

addLabels

public static org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabelsResponse addLabels(org.apache.hadoop.conf.Configuration conf,
                                                                                                                   String[] labels)
                                                                                                            throws Throwable
Utility method for adding labels to the system.

Parameters:
conf -
labels -
Returns:
VisibilityLabelsResponse
Throws:
Throwable

setAuths

public static org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabelsResponse setAuths(org.apache.hadoop.conf.Configuration conf,
                                                                                                                  String[] auths,
                                                                                                                  String user)
                                                                                                           throws Throwable
Sets given labels globally authorized for the user.

Parameters:
conf -
auths -
user -
Returns:
VisibilityLabelsResponse
Throws:
Throwable

getAuths

public static org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.GetAuthsResponse getAuths(org.apache.hadoop.conf.Configuration conf,
                                                                                                          String user)
                                                                                                   throws Throwable
Parameters:
conf -
user -
Returns:
labels, the given user is globally authorized for.
Throws:
Throwable

clearAuths

public static org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabelsResponse clearAuths(org.apache.hadoop.conf.Configuration conf,
                                                                                                                    String[] auths,
                                                                                                                    String user)
                                                                                                             throws Throwable
Removes given labels from user's globally authorized list of labels.

Parameters:
conf -
auths -
user -
Returns:
VisibilityLabelsResponse
Throws:
Throwable

listLabels

public static org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.ListLabelsResponse listLabels(org.apache.hadoop.conf.Configuration conf,
                                                                                                              String regex)
                                                                                                       throws Throwable
Retrieve the list of visibility labels defined in the system.

Parameters:
conf -
regex - The regular expression to filter which labels are returned.
Returns:
labels The list of visibility labels defined in the system.
Throws:
Throwable


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