[
https://issues.apache.org/jira/browse/HBASE-11411?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14044832#comment-14044832
]
Andrew Purtell commented on HBASE-11411:
----------------------------------------
Ok, Ram convinced me internally that cell first doesn't really work as intended
in 0.98 either.
I would like to see us just remove 'cell first' as an idea that isn't working
out. It cannot work by default on trunk after HBASE-11070. This is on me.
Leaving this issue open but think we should resolve it as Wont Fix and do
another JIRA to remove the concept and the related code.
> [AccessController] Cell level permissions were not checked when using
> CELL_FIRST_STRATEGY
> -----------------------------------------------------------------------------------------
>
> Key: HBASE-11411
> URL: https://issues.apache.org/jira/browse/HBASE-11411
> Project: HBase
> Issue Type: Bug
> Affects Versions: 0.98.3
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
> Attachments: HBASE-11411.patch
>
>
> In doing read operations with ACL we were checking there is read permission
> granted on the table
> {code}
> AuthResult authResult = permissionGranted(opType, user, env, families,
> Action.READ);
> HRegion region = getRegion(env);
> TableName table = getTableName(region);
> Map<ByteRange, Integer> cfVsMaxVersions = Maps.newHashMap();
> for (HColumnDescriptor hcd : region.getTableDesc().getFamilies()) {
> cfVsMaxVersions.put(new SimpleByteRange(hcd.getName()),
> hcd.getMaxVersions());
> }
> {code}
> If there is no permission then we were checking for the type of cell level
> permission
> {code}
> case CHECK_CELL_DEFAULT: {
> if (authManager.authorize(user, table, family, qualifier,
> Permission.Action.READ) ||
> authManager.authorize(user, table, cell, Permission.Action.READ))
> {
> return ReturnCode.INCLUDE;
> }
> }
> break;
> // Cell permissions must authorize
> case CHECK_CELL_FIRST: {
> if (authManager.authorize(user, table, cell, Permission.Action.READ)
> &&
> authManager.authorize(user, table, family, qualifier,
> Permission.Action.READ)) {
> return ReturnCode.INCLUDE;
> }
> {code}
> For CELL_FIRST_STRATEGY
> -> if the user had granted READ permission on the table itself then even if
> cell level was not granting access we were able to read the cell.
> ->If table level READ permission was not there then the && condition was
> failing from reading any cell even with READ permission.
> The 2nd one was an intended behaviour but for the first one I think we should
> see if really the cell was readable too.
--
This message was sent by Atlassian JIRA
(v6.2#6252)