[
https://issues.apache.org/jira/browse/HBASE-11438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14087157#comment-14087157
]
ramkrishna.s.vasudevan commented on HBASE-11438:
------------------------------------------------
bq.While using it in Authorizations and addLabels the user can simply specify
the special characters as a normal String. Like 'a&B'. But when the same has to
be use in cell visibility it has to be quoted so that the system can
differentiate between '&' use in the label and '&' used as an operator in an
expression.
As stated above in the comment we don't need to do any quote() while adding
labels and while using it in authorizations. Because if we do that then the
addLabel logic has to have a parsing logic and that should create a string
without the quote that was added additionally. So we just allow the user to
specify any such Strings as a normal java String.
But when we use in Cell Visibility we would ensure that the user uses quotes
for special characters and for characters like '&','!', etc so that while
parsing the expression we would be knowing that there is a usage of special
characters. So while parsing this cell visibility expression if there is an
occurence of any special character we just fail it. Hence the Authorizations
does not have any validation because we just allow any string to be specified
there. Similar is the case with addLabels.
Regarding the usage of list of bytes and converting it into String, I think it
is needed because we have to recreate the string without double quotes that was
additionally added while doing quote(). Let me check that once again.
> [Visibility Controller] Support UTF8 character as Visibility Labels
> -------------------------------------------------------------------
>
> Key: HBASE-11438
> URL: https://issues.apache.org/jira/browse/HBASE-11438
> Project: HBase
> Issue Type: Improvement
> Components: security
> Affects Versions: 0.98.4
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
> Fix For: 0.98.6
>
> Attachments: HBASE-11438_v1.patch, HBASE-11438_v2.patch,
> HBASE-11438_v3.patch, HBASE-11438_v4.patch, HBASE-11438_v5.patch,
> HBASE-11438_v6.patch, HBASE-11438_v7.patch
>
>
> This would be an action item that we would be addressing so that the
> visibility labels could have UTF8 characters in them. Also allow the user to
> use a client supplied API that allows to specify the visibility labels inside
> double quotes such that UTF8 characters and cases like &, |, ! and double
> quotes itself could be specified with proper escape sequence. Accumulo too
> provides one such API in the client side.
--
This message was sent by Atlassian JIRA
(v6.2#6252)