You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by rm...@apache.org on 2022/10/03 17:09:32 UTC

[ranger] branch master updated: RANGER-3918:Namespace policy that is created in Ranger by HBase Grant command not getting honored

This is an automated email from the ASF dual-hosted git repository.

rmani pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ranger.git


The following commit(s) were added to refs/heads/master by this push:
     new c4517287c RANGER-3918:Namespace policy that is created in Ranger by HBase Grant command not getting honored
c4517287c is described below

commit c4517287cc436f32a0a5329e5e14b00ae12947c7
Author: Ramesh Mani <rm...@cloudera.com>
AuthorDate: Mon Oct 3 10:08:05 2022 -0700

    RANGER-3918:Namespace policy that is created in Ranger by HBase Grant command not getting honored
---
 .../org/apache/ranger/authorization/hbase/RangerHBaseResource.java   | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/hbase-agent/src/main/java/org/apache/ranger/authorization/hbase/RangerHBaseResource.java b/hbase-agent/src/main/java/org/apache/ranger/authorization/hbase/RangerHBaseResource.java
index 8f8466256..bfa5d7a59 100644
--- a/hbase-agent/src/main/java/org/apache/ranger/authorization/hbase/RangerHBaseResource.java
+++ b/hbase-agent/src/main/java/org/apache/ranger/authorization/hbase/RangerHBaseResource.java
@@ -57,11 +57,14 @@ public class RangerHBaseResource extends RangerAccessResourceImpl {
                 String tableName = (String) value;
 
                 if (!tableName.contains(NAMESPACE_SEPARATOR)) {
-                    List<String> tableNames = new ArrayList<>(2);
+                    List<String> tableNames = new ArrayList<>(3);
 
                     tableNames.add(tableName);
                     tableNames.add(DEFAULT_NAMESPACE + tableName);
 
+                    // special hanlding for table resource as Namespace in RANGER-3918
+                    tableNames.add(tableName + NAMESPACE_SEPARATOR);
+
                     value = tableNames;
                 } else if (StringUtils.startsWith(tableName, DEFAULT_NAMESPACE)) {
                     List<String> tableNames = new ArrayList<>(2);