shmilygkd opened a new pull request, #1184:
URL: https://github.com/apache/ranger/pull/1184

   ## What changes were proposed in this pull request?
   
   HBase 2.6.3/2.6.4 call the preSnapshot coprocessor hook with a null 
TableDescriptor when the table does not exist: HBASE-29361 moved the snapshot 
hooks ahead of the table-existence check and passes the descriptor from 
getTableDescriptors().get() without a null check. 
RangerAuthorizationCoprocessor dereferences the descriptor in 
preSnapshot/preCloneSnapshot/preRestoreSnapshot, so taking a snapshot of a 
non-existent table throws an NPE inside the coprocessor, and with 
hbase.coprocessor.abortonerror defaulting to true the HMaster aborts.
   
   HBase corrected the ordering in HBASE-29955 (2.6.5); this change makes the 
plugin tolerate a null descriptor: the permission check is skipped when the 
descriptor is null, and the operation is rejected by HBase itself.
   
   ## How was this patch tested?
   
   Unit tests added to RangerAuthorizationCoprocessorTest: the snapshot hooks 
skip the permission check when the table descriptor is null and run it when the 
descriptor is present. The failure mode was observed on a cluster running HBase 
2.6.3 with the ranger hbase plugin.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to