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 VisibilityLabelsProtos.VisibilityLabelsResponse addLabel(org.apache.hadoop.conf.Configuration conf, String label)
          Utility method for adding label to the system.
static VisibilityLabelsProtos.VisibilityLabelsResponse addLabels(org.apache.hadoop.conf.Configuration conf, String[] labels)
          Utility method for adding labels to the system.
static 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 VisibilityLabelsProtos.GetAuthsResponse getAuths(org.apache.hadoop.conf.Configuration conf, String user)
           
static VisibilityLabelsProtos.ListLabelsResponse listLabels(org.apache.hadoop.conf.Configuration conf, String regex)
          Retrieve the list of visibility labels defined in the system.
static 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

addLabel

public static 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 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 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 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 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 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 © 2015 The Apache Software Foundation. All Rights Reserved.