From 26ede80e932ad0d0d2391ef231f1498a891fc03c Mon Sep 17 00:00:00 2001 From: xunliu Date: Wed, 21 Aug 2024 21:20:56 +0800 Subject: [PATCH] update license --- LICENSE | 5 ----- .../apache/gravitino/authorization/ranger/RangerHelper.java | 4 ++++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/LICENSE b/LICENSE index 1f19688b9f5..e85d52e5e30 100644 --- a/LICENSE +++ b/LICENSE @@ -298,13 +298,8 @@ ./security-admin/src/main/java/org/apache/ranger/defines/JsonDateSerializer.java ./security-admin/src/main/java/org/apache/ranger/defines/RangerCommonEnums.java ./security-admin/src/main/java/org/apache/ranger/view/VList.java - ./security-admin/src/main/java/org/apache/ranger/view/VXGroupList.java - ./security-admin/src/main/java/org/apache/ranger/view/VXUserPermission.java ./security-admin/src/main/java/org/apache/ranger/view/VXDataObject.java ./security-admin/src/main/java/org/apache/ranger/view/VXGroup.java ./security-admin/src/main/java/org/apache/ranger/view/VXGroupList.java - ./security-admin/src/main/java/org/apache/ranger/view/VXGroupPermission.java - ./security-admin/src/main/java/org/apache/ranger/view/VXPortalUser.java ./security-admin/src/main/java/org/apache/ranger/view/VXUser.java ./security-admin/src/main/java/org/apache/ranger/view/VXUserList.java - ./security-admin/src/main/java/org/apache/ranger/view/VXUserPermission.java diff --git a/authorizations/authorization-ranger/src/main/java/org/apache/gravitino/authorization/ranger/RangerHelper.java b/authorizations/authorization-ranger/src/main/java/org/apache/gravitino/authorization/ranger/RangerHelper.java index 03f7add50b2..05c23f6468c 100644 --- a/authorizations/authorization-ranger/src/main/java/org/apache/gravitino/authorization/ranger/RangerHelper.java +++ b/authorizations/authorization-ranger/src/main/java/org/apache/gravitino/authorization/ranger/RangerHelper.java @@ -300,6 +300,10 @@ public RangerPolicy findManagedPolicy(MetadataObject metadataObject) throws AuthorizationPluginException { List nsMetadataObj = Lists.newArrayList(SecurableObjects.DOT_SPLITTER.splitToList(metadataObject.fullName())); + if (nsMetadataObj.size() > 4) { + // The max level of the securable object is `catalog.db.table.column` + throw new RuntimeException("The securable object than 4"); + } nsMetadataObj.remove(0); // skip `catalog` Map searchFilters = new HashMap<>(); Map preciseFilters = new HashMap<>();