# 🔍 Description I faced the following error when trying to run authz with Spark 4.0 ``` Cause: java.lang.NoClassDefFoundError: javax/ws/rs/core/Cookie at java.base/java.lang.Class.forName0(Native Method) at java.base/java.lang.Class.forName(Class.java:375) at org.apache.ranger.plugin.policyengine.RangerPluginContext.createAdminClient(RangerPluginContext.java:96) at org.apache.ranger.plugin.util.PolicyRefresher.<init>(PolicyRefresher.java:90) at org.apache.ranger.plugin.service.RangerBasePlugin.init(RangerBasePlugin.java:251) at org.apache.kyuubi.plugin.spark.authz.ranger.SparkRangerAdminPlugin$.initialize(SparkRangerAdminPlugin.scala:68) ``` The `javax.ws.rs:jsr311-api` is the transitive dep of `jersey-client`, we should shade and relocate it correctly. Why does it work with Spark 3? Spark 3 provides `jakarta.ws.rs:jakarta.ws.rs-api:2.1.6` which provides `java.ws.rs.*` classes, but Spark 4 upgrades to `jakarta.ws.rs:jakarta.ws.rs-api:3.0.0` which changed package name to`jakarta.ws.rs.*`. ## Types of changes 🔖 - [x] Bugfix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) ## Test Plan 🧪 Pass GHA and manually tested with Spark 4 --- # Checklist 📝 - [x] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html) **Be nice. Be informative.** Closes #6638 from pan3793/jsr311. Closes #6638 5699200cf [Cheng Pan] Shade jsr311-api in Authz Authored-by: Cheng Pan <chengpan@apache.org> Signed-off-by: Cheng Pan <chengpan@apache.org> |
||
|---|---|---|
| .. | ||
| src | ||
| pom.xml | ||
| README.md | ||
Kyuubi Spark AuthZ Extension
Functions
- Column-level fine-grained authorization
- Row-level fine-grained authorization, a.k.a. Row-level filtering
- Data masking
Build
build/mvn clean package -DskipTests -pl :kyuubi-spark-authz_2.12 -am -Dspark.version=3.2.1 -Dranger.version=2.4.0
Supported Apache Spark Versions
-Dspark.version=
- master
- 3.5.x (default)
- 3.4.x
- 3.3.x
- 3.2.x
- 3.1.x
- 3.0.x
- 2.4.x and earlier
Supported Apache Ranger Versions
-Dranger.version=
- 2.4.x (default)
- 2.3.x
- 2.2.x
- 2.1.x
- 2.0.x
- 1.2.x
- 1.1.x
- 1.0.x
- 0.7.x
- 0.6.x