pan3793 commented on code in PR #7081:
URL: https://github.com/apache/kyuubi/pull/7081#discussion_r2191622334


##########
extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/ranger/AccessRequest.scala:
##########
@@ -68,17 +70,43 @@ object AccessRequest {
     req
   }
 
+  private val getRolesFromUserAndGroupsMethod: Option[UnboundMethod] =
+    getMethod(
+      SparkRangerAdminPlugin.getClass,
+      "getRolesFromUserAndGroups",
+      classOf[String],
+      classOf[JSet[String]])
+
+  private val setUserRolesMethod: Option[UnboundMethod] =
+    getMethod(classOf[AccessRequest], "setUserRoles", classOf[JSet[String]])
+
   private def getUserGroupsFromUgi(user: UserGroupInformation): JSet[String] = 
{
     user.getGroupNames.toSet.asJava
   }
 
+  private lazy val getUserStoreEnricherMethod: Option[UnboundMethod] =
+    getMethod(SparkRangerAdminPlugin.getClass, "getUserStoreEnricher")
+
+  private lazy val getRangerUserStoreMethod: Option[UnboundMethod] =
+    getMethod(
+      
Class.forName("org.apache.ranger.plugin.contextenricher.RangerUserStoreEnricher"),
+      "getRangerUserStore")
+
+  private lazy val getUserGroupMappingMethod: Option[UnboundMethod] =
+    getMethod(
+      Class.forName("org.apache.ranger.plugin.util.RangerUserStore"),

Review Comment:
   it's located at `ranger-plugins-common`, should be always accessible?



-- 
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: notifications-unsubscr...@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@kyuubi.apache.org
For additional commands, e-mail: notifications-h...@kyuubi.apache.org

Reply via email to