|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.security.visibility.VisibilityUtils
@InterfaceAudience.Private public class VisibilityUtils
Utility method to support visibility
Field Summary | |
---|---|
static Tag |
SORTED_ORDINAL_SERIALIZATION_FORMAT_TAG
|
static String |
SYSTEM_LABEL
|
static String |
VISIBILITY_LABEL_GENERATOR_CLASS
|
Constructor Summary | |
---|---|
VisibilityUtils()
|
Method Summary | |
---|---|
static List<Tag> |
createVisibilityExpTags(String visExpression,
boolean withSerializationFormat,
boolean checkAuths,
Set<Integer> auths,
VisibilityLabelOrdinalProvider ordinalProvider)
|
static Filter |
createVisibilityLabelFilter(HRegion region,
Authorizations authorizations)
|
static Byte |
extractAndPartitionTags(Cell cell,
List<Tag> visTags,
List<Tag> nonVisTags)
Extracts and partitions the visibility tags and nonVisibility Tags |
static Byte |
extractVisibilityTags(Cell cell,
List<Tag> tags)
Extract the visibility tags of the given Cell into the given List |
static User |
getActiveUser()
|
static byte[] |
getDataToWriteToZooKeeper(Map<String,Integer> existingLabels)
Creates the labels data to be written to zookeeper. |
static List<ScanLabelGenerator> |
getScanLabelGenerators(org.apache.hadoop.conf.Configuration conf)
|
static Pair<List<String>,List<String>> |
getSystemAndSuperUsers(org.apache.hadoop.conf.Configuration conf)
Get the super users and groups defined in the configuration. |
static byte[] |
getUserAuthsDataToWriteToZooKeeper(Map<String,List<Integer>> userAuths)
Creates the user auth data to be written to zookeeper. |
static boolean |
isVisibilityTagsPresent(Cell cell)
|
static List<VisibilityLabelsProtos.VisibilityLabel> |
readLabelsFromZKData(byte[] data)
Reads back from the zookeeper. |
static VisibilityLabelsProtos.MultiUserAuthorizations |
readUserAuthsFromZKData(byte[] data)
Reads back User auth data written to zookeeper. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String VISIBILITY_LABEL_GENERATOR_CLASS
public static final String SYSTEM_LABEL
public static final Tag SORTED_ORDINAL_SERIALIZATION_FORMAT_TAG
Constructor Detail |
---|
public VisibilityUtils()
Method Detail |
---|
public static byte[] getDataToWriteToZooKeeper(Map<String,Integer> existingLabels)
existingLabels
-
public static Pair<List<String>,List<String>> getSystemAndSuperUsers(org.apache.hadoop.conf.Configuration conf) throws IOException
conf
-
IOException
public static byte[] getUserAuthsDataToWriteToZooKeeper(Map<String,List<Integer>> userAuths)
userAuths
-
public static List<VisibilityLabelsProtos.VisibilityLabel> readLabelsFromZKData(byte[] data) throws DeserializationException
data
-
DeserializationException
public static VisibilityLabelsProtos.MultiUserAuthorizations readUserAuthsFromZKData(byte[] data) throws DeserializationException
data
-
DeserializationException
public static List<ScanLabelGenerator> getScanLabelGenerators(org.apache.hadoop.conf.Configuration conf)
conf
- The configuration to use
IllegalArgumentException
- when any of the specified ScanLabelGenerator class can not be loaded.public static Byte extractVisibilityTags(Cell cell, List<Tag> tags)
cell
- - the celltags
- - the array that will be populated if visibility tags are present
public static Byte extractAndPartitionTags(Cell cell, List<Tag> visTags, List<Tag> nonVisTags)
cell
- - the cell for which we would extract and partition the
visibility and non visibility tagsvisTags
- - all the visibilty tags of type TagType.VISIBILITY_TAG_TYPE would
be added to this listnonVisTags
- - all the non visibility tags would be added to this list
public static boolean isVisibilityTagsPresent(Cell cell)
public static Filter createVisibilityLabelFilter(HRegion region, Authorizations authorizations) throws IOException
IOException
public static User getActiveUser() throws IOException
IOException
- When there is IOE in getting the system user (During non-RPC handling).public static List<Tag> createVisibilityExpTags(String visExpression, boolean withSerializationFormat, boolean checkAuths, Set<Integer> auths, VisibilityLabelOrdinalProvider ordinalProvider) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |