You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by GitBox <gi...@apache.org> on 2023/01/06 15:00:57 UTC

[GitHub] [kyuubi] ASiegeLion opened a new issue, #4116: [Bug] The spark authz module reports an error when using the ranger version 1.2.0

ASiegeLion opened a new issue, #4116:
URL: https://github.com/apache/kyuubi/issues/4116

   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   
   
   ### Search before asking
   
   - [X] I have searched in the [issues](https://github.com/apache/kyuubi/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### Describe the bug
   
   current environment:
        kyuubi authz version : master
        ranger version: 1.2.0
   
   desc:
      When I use ranger version 1.2.0, kyuubi authz reports
      “RuntimeException: getConfig not in class org.apache.kyuubi.plugin.spark.authz.ranger.SparkRangerAdminPlugin"
     The reason is that the invoke method of AuthZUtils throws RuntimeException, and the getRangerConf method of RangerConfigProvider captures NoSuchMethodException, so it cannot enter the case branch.
   
   ![image](https://user-images.githubusercontent.com/30170267/211038168-ba501f93-1d4c-4458-ad6b-99b16979c404.png)
   ![image](https://user-images.githubusercontent.com/30170267/211038209-38c0522c-877d-44b8-afaa-beedd2ecbbf7.png)
   
   
   
   ### Affects Version(s)
   
   master/1.6.0
   
   ### Kyuubi Server Log Output
   
   _No response_
   
   ### Kyuubi Engine Log Output
   
   ```logtalk
   java.lang.RuntimeException: getConfig not in class org.apache.kyuubi.plugin.spark.authz.ranger.SparkRangerAdminPlugin$ [getRangerConf,authorizeInSingleCall,useUserGroupsFromUserStoreEnabled,getFilterExpr,$anonfun$getFilterExpr$1$adapted,$anonfun$getFilterExpr$2,$anonfun$getFilterExpr$3$adapted,getMaskingExpr,$anonfun$getMaskingExpr$1$adapted,$anonfun$getMaskingExpr$2,$anonfun$verify$1$adapted,$anonfun$verify$2$adapted,$anonfun$verify$3$adapted,$anonfun$verify$5,$anonfun$getFilterExpr$1,$anonfun$getFilterExpr$3,$anonfun$getMaskingExpr$1,$anonfun$verify$1,$anonfun$verify$2,$anonfun$verify$4,$anonfun$verify$3,verify,getServiceType,evalRowFilterPolicies,evalDataMaskPolicies,isAccessAllowed,isAccessAllowed,isAccessAllowed,isAccessAllowed,getServicePluginMap,getAuditProvider,getClusterName,setClusterName,createRangerAuthContext,getCurrentRangerAuthContext,getServiceDef,getServiceDefId,getAuditProviderFactory,setPolicies,contextChanged,setResultProcessor,getResultProcessor,getResourceAcc
 essInfo,grantAccess,revokeAccess,registerAuthContextEventListener,unregisterAuthContextEventListener,createAdminClient,getDefaultServiceDef,logErrorMessage,getServiceName,getAppId,init,cleanup,wait,wait,wait,equals,toString,hashCode,getClass,notify,notifyAll]
   	at org.apache.kyuubi.plugin.spark.authz.util.AuthZUtils$.invoke(AuthZUtils.scala:65) ~[kyuubi-spark-authz_2.12-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
   	at org.apache.kyuubi.plugin.spark.authz.util.AuthZUtils$.invokeAs(AuthZUtils.scala:73) ~[kyuubi-spark-authz_2.12-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
   	at org.apache.kyuubi.plugin.spark.authz.util.RangerConfigProvider.getRangerConf(RangerConfigProvider.scala:39) ~[kyuubi-spark-authz_2.12-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
   	at org.apache.kyuubi.plugin.spark.authz.util.RangerConfigProvider.getRangerConf$(RangerConfigProvider.scala:36) ~[kyuubi-spark-authz_2.12-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
   	at org.apache.kyuubi.plugin.spark.authz.ranger.SparkRangerAdminPlugin$.getRangerConf(SparkRangerAdminPlugin.scala:31) ~[kyuubi-spark-authz_2.12-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
   	at org.apache.kyuubi.plugin.spark.authz.ranger.SparkRangerAdminPlugin$.useUserGroupsFromUserStoreEnabled(SparkRangerAdminPlugin.scala:59) ~[kyuubi-spark-authz_2.12-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
   	at org.apache.kyuubi.plugin.spark.authz.ranger.AccessRequest$.getUserGroups(AccessRequest.scala:125) ~[kyuubi-spark-authz_2.12-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
   	at org.apache.kyuubi.plugin.spark.authz.ranger.AccessRequest$.apply(AccessRequest.scala:48) ~[kyuubi-spark-authz_2.12-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
   	at org.apache.kyuubi.plugin.spark.authz.ranger.RuleApplyRowFilterInfo.applyFilterAndMasking(RuleApplyRowFilterInfo.scala:64) ~[kyuubi-spark-authz_2.12-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
   	at org.apache.kyuubi.plugin.spark.authz.ranger.RuleApplyRowFilterInfo.$anonfun$apply$2(RuleApplyRowFilterInfo.scala:52) ~[kyuubi-spark-authz_2.12-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
   	at scala.Option.map(Option.scala:230) ~[scala-library-2.12.15.jar:?]
   	at org.apache.kyuubi.plugin.spark.authz.ranger.RuleApplyRowFilterInfo.$anonfun$apply$1(RuleApplyRowFilterInfo.scala:52) ~[kyuubi-spark-authz_2.12-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
   	at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:286) ~[scala-library-2.12.15.jar:?]
   	at scala.collection.Iterator.foreach(Iterator.scala:943) ~[scala-library-2.12.15.jar:?]
   	at scala.collection.Iterator.foreach$(Iterator.scala:943) ~[scala-library-2.12.15.jar:?]
   	at scala.collection.AbstractIterator.foreach(Iterator.scala:1431) ~[scala-library-2.12.15.jar:?]
   	at scala.collection.IterableLike.foreach(IterableLike.scala:74) ~[scala-library-2.12.15.jar:?]
   	at scala.collection.IterableLike.foreach$(IterableLike.scala:73) ~[scala-library-2.12.15.jar:?]
   	at scala.collection.AbstractIterable.foreach(Iterable.scala:56) ~[scala-library-2.12.15.jar:?]
   	at scala.collection.TraversableLike.map(TraversableLike.scala:286) ~[scala-library-2.12.15.jar:?]
   	at scala.collection.TraversableLike.map$(TraversableLike.scala:279) ~[scala-library-2.12.15.jar:?]
   	at scala.collection.AbstractTraversable.map(Traversable.scala:108) ~[scala-library-2.12.15.jar:?]
   	at org.apache.kyuubi.plugin.spark.authz.ranger.RuleApplyRowFilterInfo.mapChildren(RuleApplyRowFilterInfo.scala:42) ~[kyuubi-spark-authz_2.12-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
   	at org.apache.kyuubi.plugin.spark.authz.ranger.RuleApplyRowFilterInfo.apply(RuleApplyRowFilterInfo.scala:48) ~[kyuubi-spark-authz_2.12-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
   	at org.apache.kyuubi.plugin.spark.authz.ranger.RuleApplyRowFilterInfo.$anonfun$apply$1(RuleApplyRowFilterInfo.scala:53) ~[kyuubi-spark-authz_2.12-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT
   Caused by: java.lang.NoSuchMethodException: org.apache.kyuubi.plugin.spark.authz.ranger.SparkRangerAdminPlugin$.getConfig()
   	at java.lang.Class.getMethod(Class.java:1786) ~[?:1.8.0_201]
   	at org.apache.kyuubi.plugin.spark.authz.util.AuthZUtils$.invoke(AuthZUtils.scala:59) ~[kyuubi-spark-authz_2.12-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
   ```
   
   
   ### Kyuubi Server Configurations
   
   _No response_
   
   ### Kyuubi Engine Configurations
   
   _No response_
   
   ### Additional context
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes. I would be willing to submit a PR with guidance from the Kyuubi community to fix.
   - [ ] No. I cannot submit a PR at this time.


-- 
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-unsubscribe@kyuubi.apache.org.apache.org

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


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


[GitHub] [kyuubi] pan3793 commented on issue #4116: [Bug] The spark authz module reports an error when using the ranger version 1.2.0

Posted by GitBox <gi...@apache.org>.
pan3793 commented on issue #4116:
URL: https://github.com/apache/kyuubi/issues/4116#issuecomment-1373746689

   Close since it was fixed by https://github.com/apache/kyuubi/pull/4114


-- 
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-unsubscribe@kyuubi.apache.org

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


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


[GitHub] [kyuubi] github-actions[bot] commented on issue #4116: [Bug] The spark authz module reports an error when using the ranger version 1.2.0

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #4116:
URL: https://github.com/apache/kyuubi/issues/4116#issuecomment-1373741906

   Hello @ASiegeLion,
   Thanks for finding the time to report the issue!
   We really appreciate the community's efforts to improve Apache Kyuubi.


-- 
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-unsubscribe@kyuubi.apache.org

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


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


[GitHub] [kyuubi] bowenliang123 commented on issue #4116: [Bug] The spark authz module reports an error when using the ranger version 1.2.0

Posted by GitBox <gi...@apache.org>.
bowenliang123 commented on issue #4116:
URL: https://github.com/apache/kyuubi/issues/4116#issuecomment-1373746074

   Thanks for reporting it. And based on your detailed report , it's fixed in https://github.com/apache/kyuubi/pull/4114 .
   Feel free to close this issue, if you make sure it works as expected with the build on the latest master branch.


-- 
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-unsubscribe@kyuubi.apache.org

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


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


[GitHub] [kyuubi] ASiegeLion commented on issue #4116: [Bug] The spark authz module reports an error when using the ranger version 1.2.0

Posted by GitBox <gi...@apache.org>.
ASiegeLion commented on issue #4116:
URL: https://github.com/apache/kyuubi/issues/4116#issuecomment-1373742421

   邮件已收到,,,稍后我会亲自回复。。。谢谢!——柳培岳


-- 
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-unsubscribe@kyuubi.apache.org

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


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


[GitHub] [kyuubi] pan3793 closed issue #4116: [Bug] The spark authz module reports an error when using the ranger version 1.2.0

Posted by GitBox <gi...@apache.org>.
pan3793 closed issue #4116: [Bug]  The spark authz module reports an error when using the ranger version 1.2.0
URL: https://github.com/apache/kyuubi/issues/4116


-- 
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-unsubscribe@kyuubi.apache.org

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


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