Class VisibilityClient
java.lang.Object
org.apache.hadoop.hbase.security.visibility.VisibilityClient
Utility client for doing visibility labels admin operations.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.hadoop.hbase.shaded.protobuf.generated.VisibilityLabelsProtos.VisibilityLabelsResponse
addLabel
(Connection connection, String label) Utility method for adding label to the system.static org.apache.hadoop.hbase.shaded.protobuf.generated.VisibilityLabelsProtos.VisibilityLabelsResponse
addLabels
(Connection connection, String[] labels) Utility method for adding labels to the system.static org.apache.hadoop.hbase.shaded.protobuf.generated.VisibilityLabelsProtos.VisibilityLabelsResponse
clearAuths
(Connection connection, String[] auths, String user) Removes given labels from user's globally authorized list of labels.static org.apache.hadoop.hbase.shaded.protobuf.generated.VisibilityLabelsProtos.GetAuthsResponse
getAuths
(Connection connection, String user) Get the authorization for a given userstatic boolean
isCellVisibilityEnabled
(Connection connection) Return true if cell visibility features are supported and enabledstatic org.apache.hadoop.hbase.shaded.protobuf.generated.VisibilityLabelsProtos.ListLabelsResponse
listLabels
(Connection connection, String regex) Retrieve the list of visibility labels defined in the system.static org.apache.hadoop.hbase.shaded.protobuf.generated.VisibilityLabelsProtos.VisibilityLabelsResponse
setAuths
(Connection connection, String[] auths, String user) Sets given labels globally authorized for the user.private static org.apache.hadoop.hbase.shaded.protobuf.generated.VisibilityLabelsProtos.VisibilityLabelsResponse
setOrClearAuths
(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
public static org.apache.hadoop.hbase.shaded.protobuf.generated.VisibilityLabelsProtos.VisibilityLabelsResponse addLabel(Connection connection, String label) throws Throwable Utility method for adding label to the system.- Throws:
Throwable
-
addLabels
public static org.apache.hadoop.hbase.shaded.protobuf.generated.VisibilityLabelsProtos.VisibilityLabelsResponse addLabels(Connection connection, String[] labels) throws Throwable Utility method for adding labels to the system.- Throws:
Throwable
-
setAuths
public static org.apache.hadoop.hbase.shaded.protobuf.generated.VisibilityLabelsProtos.VisibilityLabelsResponse setAuths(Connection connection, String[] auths, String user) throws Throwable Sets given labels globally authorized for the user.- Throws:
Throwable
-
getAuths
public static org.apache.hadoop.hbase.shaded.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
public static org.apache.hadoop.hbase.shaded.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
public static org.apache.hadoop.hbase.shaded.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.shaded.protobuf.generated.VisibilityLabelsProtos.VisibilityLabelsResponse setOrClearAuths(Connection connection, String[] auths, String user, boolean setOrClear) throws IOException, org.apache.hbase.thirdparty.com.google.protobuf.ServiceException, Throwable - Throws:
IOException
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
Throwable
-