From f2d08e4436c319df1a835275391f3cb117d26469 Mon Sep 17 00:00:00 2001 From: manishmowall Date: Mon, 4 Dec 2023 06:43:44 +0100 Subject: [PATCH] ODP-785|Druid-issue-13225: adding ODP's ranger v2.3.0 and other changes into druid --- .../druid/security/ranger/authorizer/RangerAuthorizer.java | 3 ++- .../security/ranger/authorizer/RangerAdminClientImpl.java | 5 +++-- licenses.yaml | 4 ++-- pom.xml | 4 ++-- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/extensions-core/druid-ranger-security/src/main/java/org/apache/druid/security/ranger/authorizer/RangerAuthorizer.java b/extensions-core/druid-ranger-security/src/main/java/org/apache/druid/security/ranger/authorizer/RangerAuthorizer.java index 129088e65816..ec529e0e9407 100644 --- a/extensions-core/druid-ranger-security/src/main/java/org/apache/druid/security/ranger/authorizer/RangerAuthorizer.java +++ b/extensions-core/druid-ranger-security/src/main/java/org/apache/druid/security/ranger/authorizer/RangerAuthorizer.java @@ -42,6 +42,7 @@ import java.io.IOException; import java.util.Arrays; import java.util.Date; +import java.util.Collections; import java.util.HashSet; import java.util.Locale; import java.util.Set; @@ -134,7 +135,7 @@ class RangerDruidAccessRequest extends RangerAccessRequestImpl { public RangerDruidAccessRequest(RangerDruidResource resource, String user, Set userGroups, Action action) { - super(resource, action.name().toLowerCase(Locale.ENGLISH), user, userGroups,null); + super(resource, action.name().toLowerCase(Locale.ENGLISH), user, userGroups, Collections.emptySet()); setAccessTime(new Date()); } } diff --git a/extensions-core/druid-ranger-security/src/test/java/org/apache/druid/security/ranger/authorizer/RangerAdminClientImpl.java b/extensions-core/druid-ranger-security/src/test/java/org/apache/druid/security/ranger/authorizer/RangerAdminClientImpl.java index 3d72018ff2b0..2af60a3618fe 100644 --- a/extensions-core/druid-ranger-security/src/test/java/org/apache/druid/security/ranger/authorizer/RangerAdminClientImpl.java +++ b/extensions-core/druid-ranger-security/src/test/java/org/apache/druid/security/ranger/authorizer/RangerAdminClientImpl.java @@ -22,6 +22,7 @@ import com.google.gson.Gson; import com.google.gson.GsonBuilder; import org.apache.druid.java.util.common.logger.Logger; +import org.apache.hadoop.conf.Configuration; import org.apache.ranger.admin.client.AbstractRangerAdminClient; import org.apache.ranger.plugin.util.ServicePolicies; @@ -39,9 +40,9 @@ public class RangerAdminClientImpl extends AbstractRangerAdminClient protected Gson gson; @Override - public void init(String serviceName, String appId, String configPropertyPrefix) + public void init(String serviceName, String appId, String configPropertyPrefix, Configuration config) { - super.init(serviceName, appId, configPropertyPrefix); + super.init(serviceName, appId, configPropertyPrefix, config); try { gson = new GsonBuilder().setDateFormat("yyyyMMdd-HH:mm:ss.SSS-Z").setPrettyPrinting().create(); diff --git a/licenses.yaml b/licenses.yaml index 9050ac88aaa0..40716d42fbc0 100644 --- a/licenses.yaml +++ b/licenses.yaml @@ -4943,7 +4943,7 @@ libraries: name: org.apache.ranger ranger-plugins-audit license_category: binary -version: 2.0.0 +version: 2.3.0 module: druid-ranger-security license_name: Apache License version 2.0 libraries: @@ -4953,7 +4953,7 @@ libraries: name: org.apache.ranger ranger-plugins-common license_category: binary -version: 2.0.0 +version: 2.3.0 module: druid-ranger-security license_name: Apache License version 2.0 libraries: diff --git a/pom.xml b/pom.xml index 66e3891762eb..480d1f21778e 100644 --- a/pom.xml +++ b/pom.xml @@ -1311,7 +1311,7 @@ - + com.github.spotbugs spotbugs-maven-plugin