[ 
https://issues.apache.org/jira/browse/DRILL-8548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18100998#comment-18100998
 ] 

ASF GitHub Bot commented on DRILL-8548:
---------------------------------------

shfshihuafeng commented on code in PR #3056:
URL: https://github.com/apache/drill/pull/3056#discussion_r3696919575


##########
drill-ranger/drill-ranger-plugin/src/main/java/org/glassfish/jersey/media/multipart/MultiPartFeatureAutodiscoverable.java:
##########
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.glassfish.jersey.media.multipart;

Review Comment:
   @pjfanning 
   **Background: Upgrading Ranger to Jersey 2.35 and the Necessity of 
ClassLoader Isolation**
      Drill (Jersey 3.1.9, jakarta.ws.rs.*) and Ranger 2.8.0 (Jersey 2.35, 
javax.ws.rs.*) require two binary-incompatible Jersey versions — isolated via 
RangerPluginClassLoader.
   
   **1.why a shim is needed**
      RangerPluginClassLoader.getResources() merges the parent's 3.1.9 SPI 
entry → ServiceFinder loads the 3.1.9 MultiPartFeatureAutodiscoverable → cast 
to 2.35 ForcedAutoDiscoverable fails → ClassCastException. Since this class 
does not exist in Jersey 2.x (verified via jar tf), it cannot be pulled from a 
dependency — the shim is the only way to provide a 2.35-compatible impl with 
the same FQN(Fully Qualified Name).
   
   **2.The shim is safe and scoped to the Ranger plugin only**
      The shim lives exclusively in the Ranger plugin's isolated directory 
(jars/ranger-drill-plugin-impl/). It is invisible to Drill's 3.1.9 REST server, 
so there is no functional risk or unintended side‑effect on Drill's main 
codebase.
   
   Given the above, do you have any concerns about this approach, or any 
suggestions for further improvements?





> Integrate Apache Ranger authorization for Drill
> -----------------------------------------------
>
>                 Key: DRILL-8548
>                 URL: https://issues.apache.org/jira/browse/DRILL-8548
>             Project: Apache Drill
>          Issue Type: New Feature
>          Components:  Server
>    Affects Versions: 1.23.0
>            Reporter: shihuafeng
>            Priority: Major
>             Fix For: 1.23.0
>
>
> This issue introduces Apache Ranger as a pluggable authorization framework 
> for Drill, enabling centralized table-level and column-level access control 
> for Drill queries. It is a substantial feature spanning three layers: a new 
> drill-ranger module , integration hooks in exec/java-exec, and distribution 
> packaging. The design follows Drill's existing AccessAuthorizer SPI and 
> Calcite's RelShuttle mechanism so that column-level checks happen in the 
> toRel phase before physical planning



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to