apache / apache/kyuubi

[FEATURE] Make the RangerSparkExtension compatible with spark-connect

Open Beginner friendly
#7,454 1 comment 1 reaction 0 assignees View on GitHub
kind:feature priority:major
Dominant language
Scala
Stars
2.4k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

### 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 feature

Currently the RangerSparkExtension checks for kyuubi.session.user for getting the user name from SparkContext. Need to add a fallback to check for spark.connect.session.user if the above is null

### Motivation

Using spark-connect and Ranger for the RBAC, need this to identify the user.

### Describe the solution

Similar to how we check kyuubi.session.user, we would also check spark.connect.session.user

### Additional context

PR for propagating spark.connect.session.user from SparkConnect - https://github.com/apache/spark/pull/55917/changes

### Are you willing to submit PR?

- [x] Yes. I would be willing to submit a PR with guidance from the Kyuubi community to improve.
- [ ] No. I cannot submit a PR at this time.

Contributor guide

Open the contributing guide

Research direction

Locate the RangerSparkExtension and the existing lookup for kyuubi.session.user. Read how the extension obtains the current user, then add the spark.connect.session.user fallback when the first value is null. Done means Spark Connect sessions can identify the user for Ranger RBAC without changing the existing lookup behavior; run the relevant Ranger and Spark Connect tests if available.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala, spark
Domain
authorization
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.