@InterfaceAudience.Private public class ExpAsStringVisibilityLabelServiceImpl extends Object implements org.apache.hadoop.hbase.security.visibility.VisibilityLabelService
Modifier and Type | Field and Description |
---|---|
private org.apache.hadoop.conf.Configuration |
conf |
private static byte[] |
DUMMY_VALUE |
private org.apache.hadoop.hbase.security.visibility.ExpressionExpander |
expressionExpander |
private org.apache.hadoop.hbase.security.visibility.ExpressionParser |
expressionParser |
private org.apache.hadoop.hbase.regionserver.Region |
labelsRegion |
private static org.slf4j.Logger |
LOG |
private List<org.apache.hadoop.hbase.security.visibility.ScanLabelGenerator> |
scanLabelGenerators |
private static byte |
STRING_SERIALIZATION_FORMAT |
private static org.apache.hadoop.hbase.Tag |
STRING_SERIALIZATION_FORMAT_TAG |
Constructor and Description |
---|
ExpAsStringVisibilityLabelServiceImpl() |
Modifier and Type | Method and Description |
---|---|
org.apache.hadoop.hbase.regionserver.OperationStatus[] |
addLabels(List<byte[]> labels) |
private static boolean |
checkForMatchingVisibilityTagsWithSortedOrder(List<org.apache.hadoop.hbase.Tag> putVisTags,
List<org.apache.hadoop.hbase.Tag> deleteVisTags) |
org.apache.hadoop.hbase.regionserver.OperationStatus[] |
clearAuths(byte[] user,
List<byte[]> authLabels) |
private byte[] |
createModifiedVisExpression(List<org.apache.hadoop.hbase.Tag> tags) |
private org.apache.hadoop.hbase.Tag |
createTag(org.apache.hadoop.hbase.security.visibility.expression.ExpressionNode node) |
List<org.apache.hadoop.hbase.Tag> |
createVisibilityExpTags(String visExpression,
boolean withSerializationFormat,
boolean checkAuths) |
byte[] |
encodeVisibilityForReplication(List<org.apache.hadoop.hbase.Tag> tags,
Byte serializationFormat) |
private void |
extractLabels(org.apache.hadoop.hbase.security.visibility.expression.ExpressionNode node,
List<String> labels,
List<String> notLabels) |
org.apache.hadoop.conf.Configuration |
getConf() |
List<String> |
getGroupAuths(String[] groups,
boolean systemCall) |
private static short |
getTagValuePartAsShort(org.apache.hadoop.hbase.Tag t,
int offset) |
private static String |
getTagValuePartAsString(org.apache.hadoop.hbase.Tag t,
int offset,
int length) |
List<String> |
getUserAuths(byte[] user,
boolean systemCall) |
org.apache.hadoop.hbase.security.visibility.VisibilityExpEvaluator |
getVisibilityExpEvaluator(org.apache.hadoop.hbase.security.visibility.Authorizations authorizations) |
boolean |
havingSystemAuth(org.apache.hadoop.hbase.security.User user) |
void |
init(org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment e) |
protected boolean |
isReadFromSystemAuthUser() |
List<String> |
listLabels(String regex) |
boolean |
matchVisibility(List<org.apache.hadoop.hbase.Tag> putTags,
Byte putTagsFormat,
List<org.apache.hadoop.hbase.Tag> deleteTags,
Byte deleteTagsFormat) |
org.apache.hadoop.hbase.regionserver.OperationStatus[] |
setAuths(byte[] user,
List<byte[]> authLabels) |
void |
setConf(org.apache.hadoop.conf.Configuration conf) |
private static final org.slf4j.Logger LOG
private static final byte[] DUMMY_VALUE
private static final byte STRING_SERIALIZATION_FORMAT
private static final org.apache.hadoop.hbase.Tag STRING_SERIALIZATION_FORMAT_TAG
private final org.apache.hadoop.hbase.security.visibility.ExpressionParser expressionParser
private final org.apache.hadoop.hbase.security.visibility.ExpressionExpander expressionExpander
private org.apache.hadoop.conf.Configuration conf
private org.apache.hadoop.hbase.regionserver.Region labelsRegion
private List<org.apache.hadoop.hbase.security.visibility.ScanLabelGenerator> scanLabelGenerators
public ExpAsStringVisibilityLabelServiceImpl()
public org.apache.hadoop.hbase.regionserver.OperationStatus[] addLabels(List<byte[]> labels) throws IOException
addLabels
in interface org.apache.hadoop.hbase.security.visibility.VisibilityLabelService
IOException
public org.apache.hadoop.hbase.regionserver.OperationStatus[] setAuths(byte[] user, List<byte[]> authLabels) throws IOException
setAuths
in interface org.apache.hadoop.hbase.security.visibility.VisibilityLabelService
IOException
public org.apache.hadoop.hbase.regionserver.OperationStatus[] clearAuths(byte[] user, List<byte[]> authLabels) throws IOException
clearAuths
in interface org.apache.hadoop.hbase.security.visibility.VisibilityLabelService
IOException
public List<String> getUserAuths(byte[] user, boolean systemCall) throws IOException
getUserAuths
in interface org.apache.hadoop.hbase.security.visibility.VisibilityLabelService
IOException
public List<String> getGroupAuths(String[] groups, boolean systemCall) throws IOException
getGroupAuths
in interface org.apache.hadoop.hbase.security.visibility.VisibilityLabelService
IOException
public List<String> listLabels(String regex) throws IOException
listLabels
in interface org.apache.hadoop.hbase.security.visibility.VisibilityLabelService
IOException
public List<org.apache.hadoop.hbase.Tag> createVisibilityExpTags(String visExpression, boolean withSerializationFormat, boolean checkAuths) throws IOException
createVisibilityExpTags
in interface org.apache.hadoop.hbase.security.visibility.VisibilityLabelService
IOException
public org.apache.hadoop.hbase.security.visibility.VisibilityExpEvaluator getVisibilityExpEvaluator(org.apache.hadoop.hbase.security.visibility.Authorizations authorizations) throws IOException
getVisibilityExpEvaluator
in interface org.apache.hadoop.hbase.security.visibility.VisibilityLabelService
IOException
protected boolean isReadFromSystemAuthUser() throws IOException
IOException
private org.apache.hadoop.hbase.Tag createTag(org.apache.hadoop.hbase.security.visibility.expression.ExpressionNode node) throws IOException
IOException
private void extractLabels(org.apache.hadoop.hbase.security.visibility.expression.ExpressionNode node, List<String> labels, List<String> notLabels)
public org.apache.hadoop.conf.Configuration getConf()
getConf
in interface org.apache.hadoop.conf.Configurable
public void setConf(org.apache.hadoop.conf.Configuration conf)
setConf
in interface org.apache.hadoop.conf.Configurable
public void init(org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment e) throws IOException
init
in interface org.apache.hadoop.hbase.security.visibility.VisibilityLabelService
IOException
public boolean havingSystemAuth(org.apache.hadoop.hbase.security.User user) throws IOException
havingSystemAuth
in interface org.apache.hadoop.hbase.security.visibility.VisibilityLabelService
IOException
public boolean matchVisibility(List<org.apache.hadoop.hbase.Tag> putTags, Byte putTagsFormat, List<org.apache.hadoop.hbase.Tag> deleteTags, Byte deleteTagsFormat) throws IOException
matchVisibility
in interface org.apache.hadoop.hbase.security.visibility.VisibilityLabelService
IOException
private static boolean checkForMatchingVisibilityTagsWithSortedOrder(List<org.apache.hadoop.hbase.Tag> putVisTags, List<org.apache.hadoop.hbase.Tag> deleteVisTags)
public byte[] encodeVisibilityForReplication(List<org.apache.hadoop.hbase.Tag> tags, Byte serializationFormat) throws IOException
encodeVisibilityForReplication
in interface org.apache.hadoop.hbase.security.visibility.VisibilityLabelService
IOException
private byte[] createModifiedVisExpression(List<org.apache.hadoop.hbase.Tag> tags) throws IOException
tags
- - all the tags associated with the current CellIOException
private static short getTagValuePartAsShort(org.apache.hadoop.hbase.Tag t, int offset)
private static String getTagValuePartAsString(org.apache.hadoop.hbase.Tag t, int offset, int length)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.