Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[KYUUBI #5968] Support set authentication user for Trino engine #5970

Closed
wants to merge 2 commits into from

Conversation

lsm1
Copy link
Contributor

@lsm1 lsm1 commented Jan 13, 2024

🔍 Description

Issue References 🔗

This pull request fixes #5968

Describe Your Solution 🔧

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Types of changes 🔖

  • 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 🧪

Behavior Without This Pull Request ⚰️

Behavior With This Pull Request 🎉

Related Unit Tests


Checklist 📝

Be nice. Be informative.

@codecov-commenter
Copy link

codecov-commenter commented Jan 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (162e72b) 61.14% compared to head (580eb45) 61.12%.
Report is 3 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #5970      +/-   ##
============================================
- Coverage     61.14%   61.12%   -0.03%     
  Complexity       23       23              
============================================
  Files           622      622              
  Lines         37059    37063       +4     
  Branches       5027     5027              
============================================
- Hits          22660    22654       -6     
- Misses        11958    11966       +8     
- Partials       2441     2443       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -141,7 +144,7 @@ class TrinoSessionImpl(
require(
serverScheme.equalsIgnoreCase("https"),
"Trino engine using username/password requires HTTPS to be enabled")
builder.addInterceptor(OkHttpUtil.basicAuth(username, password))
builder.addInterceptor(OkHttpUtil.basicAuth(trinoUser, password))
Copy link
Member

@pan3793 pan3793 Jan 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ClientSession still uses username(session user), will this cause issues?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ClientSession still uses username(session user), will this cause issues?

It only used for http verification, will have no other impact.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as trinoUser is only used for auth, move the definition to here, and rename variable to user

@@ -57,6 +57,9 @@ class TrinoSessionImpl(
private val username: String = sessionConf
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's rename it to sessionUser

@lsm1 lsm1 force-pushed the branch-kyuubi-5968 branch from 1c0bccf to 580eb45 Compare January 19, 2024 06:28
@pan3793 pan3793 added this to the v1.9.0 milestone Jan 21, 2024
@pan3793 pan3793 closed this in 777b784 Jan 21, 2024
@pan3793
Copy link
Member

pan3793 commented Jan 21, 2024

Thanks, merged to master

zhaohehuhu pushed a commit to zhaohehuhu/incubator-kyuubi that referenced this pull request Feb 5, 2024
# 🔍 Description
## Issue References 🔗

This pull request fixes apache#5968

## Describe Your Solution 🔧

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

## Types of changes 🔖

- [ ] 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 🧪

#### Behavior Without This Pull Request ⚰️

#### Behavior With This Pull Request 🎉

#### Related Unit Tests

---

# 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 apache#5970 from lsm1/branch-kyuubi-5968.

Closes apache#5968

580eb45 [senmiaoliu] fix style
a36380c [senmiaoliu] add auth user conf for trino engine

Authored-by: senmiaoliu <[email protected]>
Signed-off-by: Cheng Pan <[email protected]>
zhaohehuhu pushed a commit to zhaohehuhu/incubator-kyuubi that referenced this pull request Mar 21, 2024
# 🔍 Description
## Issue References 🔗

This pull request fixes apache#5968

## Describe Your Solution 🔧

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

## Types of changes 🔖

- [ ] 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 🧪

#### Behavior Without This Pull Request ⚰️

#### Behavior With This Pull Request 🎉

#### Related Unit Tests

---

# 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 apache#5970 from lsm1/branch-kyuubi-5968.

Closes apache#5968

580eb45 [senmiaoliu] fix style
a36380c [senmiaoliu] add auth user conf for trino engine

Authored-by: senmiaoliu <[email protected]>
Signed-off-by: Cheng Pan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Improvement] Support set authentication user for Trino engine
4 participants