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

[Bug] AuthenticationFilter auth type check has bug while check equals of set and seq type #6709

Closed
3 of 4 tasks
lifulong opened this issue Sep 25, 2024 · 1 comment
Closed
3 of 4 tasks
Labels
kind:bug This is a clearly a bug priority:major

Comments

@lifulong
Copy link
Contributor

lifulong commented Sep 25, 2024

Code of Conduct

Search before asking

  • I have searched in the issues and found no similar issues.

Describe the bug

while check auth types in AuthenticationFilter.initAuthHandlers
authTypes == Set(NOSASL)
left side is seq, right side is set, the result is always false, even if authTypes values is Seq(NOSASL)

Affects Version(s)

master

Kyuubi Server Log Output

2024-09-25 14:55:22.330 DEBUG org.apache.kyuubi.server.http.authentication.AuthenticationFilter: No auth scheme matched for url: http://10.101.1.62:10100/api/v1/ping

Kyuubi Engine Log Output

No response

Kyuubi Server Configurations

kyuubi.authentication NOSASL

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.
@lifulong lifulong added kind:bug This is a clearly a bug priority:major labels Sep 25, 2024
Copy link

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

turboFei pushed a commit that referenced this issue Sep 26, 2024
… in AuthenticationFilter.initAuthHandlers

# 🔍 Description
## Issue References 🔗

This pull request fixes #6709

## Describe Your Solution 🔧

transfer the type of authTypes from seq to set before do equals check

## 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 🧪
test in our produce kyuubi env
#### Behavior Without This Pull Request ⚰️
<img width="1431" alt="image" src="https://github.com/user-attachments/assets/6fd40d49-8d6b-446a-8feb-70df8c92604d">
<img width="603" alt="image" src="https://github.com/user-attachments/assets/637e5788-bfe0-4bab-a2a5-f6a79fb93fa6">

always hint to login  in all sub tabs of management tab in kyuubi web ui, but can not login in actually, while use confkyuubi.authentication NOSASL, and our java version is 1.8 scala version is 2.12.18
#### Behavior With This Pull Request 🎉
<img width="1422" alt="image" src="https://github.com/user-attachments/assets/211b76ee-d937-456b-bed4-f94dd41896f0">

#### Related Unit Tests

none, no need i think
---

# Checklist 📝

- [ ] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html)

**Be nice. Be informative.**

Closes #6711 from lifulong/authentication_filter_auth_type_bug_fix.

Closes #6709

850bda4 [lifulong] fix seq and set equals check bug while check auth type in AuthenticationFilter.initAuthHandlers

Authored-by: lifulong <gglifulong@163.com>
Signed-off-by: Wang, Fei <fwang12@ebay.com>
(cherry picked from commit 14bf56f)
Signed-off-by: Wang, Fei <fwang12@ebay.com>
turboFei pushed a commit that referenced this issue Sep 26, 2024
… in AuthenticationFilter.initAuthHandlers

# 🔍 Description
## Issue References 🔗

This pull request fixes #6709

## Describe Your Solution 🔧

transfer the type of authTypes from seq to set before do equals check

## 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 🧪
test in our produce kyuubi env
#### Behavior Without This Pull Request ⚰️
<img width="1431" alt="image" src="https://github.com/user-attachments/assets/6fd40d49-8d6b-446a-8feb-70df8c92604d">
<img width="603" alt="image" src="https://github.com/user-attachments/assets/637e5788-bfe0-4bab-a2a5-f6a79fb93fa6">

always hint to login  in all sub tabs of management tab in kyuubi web ui, but can not login in actually, while use confkyuubi.authentication NOSASL, and our java version is 1.8 scala version is 2.12.18
#### Behavior With This Pull Request 🎉
<img width="1422" alt="image" src="https://github.com/user-attachments/assets/211b76ee-d937-456b-bed4-f94dd41896f0">

#### Related Unit Tests

none, no need i think
---

# Checklist 📝

- [ ] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html)

**Be nice. Be informative.**

Closes #6711 from lifulong/authentication_filter_auth_type_bug_fix.

Closes #6709

850bda4 [lifulong] fix seq and set equals check bug while check auth type in AuthenticationFilter.initAuthHandlers

Authored-by: lifulong <gglifulong@163.com>
Signed-off-by: Wang, Fei <fwang12@ebay.com>
(cherry picked from commit 14bf56f)
Signed-off-by: Wang, Fei <fwang12@ebay.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug This is a clearly a bug priority:major
Projects
None yet
1 participant