Class VisibilityClient
java.lang.Object
org.apache.hadoop.hbase.security.visibility.VisibilityClient
Utility client for doing visibility labels admin operations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabelsResponseDeprecated.static org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabelsResponseaddLabel(Connection connection, String label) Utility method for adding label to the system.static org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabelsResponseDeprecated.UseaddLabels(Connection,String[])instead.static org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabelsResponseaddLabels(Connection connection, String[] labels) Utility method for adding labels to the system.static org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabelsResponseclearAuths(org.apache.hadoop.conf.Configuration conf, String[] auths, String user) Deprecated.UseclearAuths(Connection,String[],String)instead.static org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabelsResponseclearAuths(Connection connection, String[] auths, String user) Removes given labels from user's globally authorized list of labels.static org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.GetAuthsResponseDeprecated.UsegetAuths(Connection,String)instead.static org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.GetAuthsResponsegetAuths(Connection connection, String user) Get the authorization for a given userstatic booleanisCellVisibilityEnabled(Connection connection) Return true if cell visibility features are supported and enabledstatic org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.ListLabelsResponselistLabels(org.apache.hadoop.conf.Configuration conf, String regex) Deprecated.UselistLabels(Connection,String)instead.static org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.ListLabelsResponselistLabels(Connection connection, String regex) Retrieve the list of visibility labels defined in the system.static org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabelsResponseDeprecated.UsesetAuths(Connection,String[],String)instead.static org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabelsResponsesetAuths(Connection connection, String[] auths, String user) Sets given labels globally authorized for the user.private static org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabelsResponsesetOrClearAuths(Connection connection, String[] auths, String user, boolean setOrClear)
-
Constructor Details
-
VisibilityClient
public VisibilityClient()
-
-
Method Details
-
isCellVisibilityEnabled
Return true if cell visibility features are supported and enabled- Parameters:
connection- The connection to use- Returns:
- true if cell visibility features are supported and enabled, false otherwise
- Throws:
IOException
-
addLabel
@Deprecated public static org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabelsResponse addLabel(org.apache.hadoop.conf.Configuration conf, String label) throws Throwable Deprecated.UseaddLabel(Connection,String)instead.Utility method for adding label to the system.- Throws:
Throwable
-
addLabel
public static org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabelsResponse addLabel(Connection connection, String label) throws Throwable Utility method for adding label to the system.- Throws:
Throwable
-
addLabels
@Deprecated public static org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabelsResponse addLabels(org.apache.hadoop.conf.Configuration conf, String[] labels) throws Throwable Deprecated.UseaddLabels(Connection,String[])instead.Utility method for adding labels to the system.- Throws:
Throwable
-
addLabels
public static org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabelsResponse addLabels(Connection connection, String[] labels) throws Throwable Utility method for adding labels to the system.- Throws:
Throwable
-
setAuths
@Deprecated public static org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabelsResponse setAuths(org.apache.hadoop.conf.Configuration conf, String[] auths, String user) throws Throwable Deprecated.UsesetAuths(Connection,String[],String)instead.Sets given labels globally authorized for the user.- Throws:
Throwable
-
setAuths
public static org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabelsResponse setAuths(Connection connection, String[] auths, String user) throws Throwable Sets given labels globally authorized for the user.- Throws:
Throwable
-
getAuths
@Deprecated public static org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.GetAuthsResponse getAuths(org.apache.hadoop.conf.Configuration conf, String user) throws Throwable Deprecated.UsegetAuths(Connection,String)instead.Returns labels, the given user is globally authorized for.- Throws:
Throwable
-
getAuths
public static org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.GetAuthsResponse getAuths(Connection connection, String user) throws Throwable Get the authorization for a given user- Parameters:
connection- the Connection instance to useuser- the user- Returns:
- labels the given user is globally authorized for
- Throws:
Throwable
-
listLabels
@Deprecated public static org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.ListLabelsResponse listLabels(org.apache.hadoop.conf.Configuration conf, String regex) throws Throwable Deprecated.UselistLabels(Connection,String)instead.Retrieve the list of visibility labels defined in the system.- Parameters:
conf- the configuration to useregex- The regular expression to filter which labels are returned.- Returns:
- labels The list of visibility labels defined in the system.
- Throws:
Throwable
-
listLabels
public static org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.ListLabelsResponse listLabels(Connection connection, String regex) throws Throwable Retrieve the list of visibility labels defined in the system.- Parameters:
connection- The Connection instance to use.regex- The regular expression to filter which labels are returned.- Returns:
- labels The list of visibility labels defined in the system.
- Throws:
Throwable
-
clearAuths
@Deprecated public static org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabelsResponse clearAuths(org.apache.hadoop.conf.Configuration conf, String[] auths, String user) throws Throwable Deprecated.UseclearAuths(Connection,String[],String)instead.Removes given labels from user's globally authorized list of labels.- Throws:
Throwable
-
clearAuths
public static org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabelsResponse clearAuths(Connection connection, String[] auths, String user) throws Throwable Removes given labels from user's globally authorized list of labels.- Throws:
Throwable
-
setOrClearAuths
private static org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabelsResponse setOrClearAuths(Connection connection, String[] auths, String user, boolean setOrClear) throws IOException, com.google.protobuf.ServiceException, Throwable - Throws:
IOExceptioncom.google.protobuf.ServiceExceptionThrowable
-
addLabel(Connection,String)instead.