-
Notifications
You must be signed in to change notification settings - Fork 919
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 #641]Support custom authentication #642
Conversation
val AUTHENTICATION_CUSTOM_CLASS: OptionalConfigEntry[String] = | ||
buildConf("authentication.custom.class") | ||
.doc("User define authentication class.") | ||
.version("1.0.0") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1.3.0
@@ -0,0 +1,47 @@ | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we rename to xxxSuite?
ef7beca
to
15c93cc
Compare
import org.apache.kyuubi.Logging | ||
import org.apache.kyuubi.config.KyuubiConf | ||
|
||
class UserDefineAuthenticationProviderImpl(conf: KyuubiConf) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
passing conf
here seems unnecessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
passing
conf
here seems unnecessary?
Yes, it's not used. Just want to test constructor. Will remove if needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, I mean can we make the custom.class
implementation a zero-arg constructor? or kyuubiConf is necessary for them to call
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, had address it.
" <li>LDAP: Lightweight Directory Access Protocol authentication.</li></ul>") | ||
.version("1.0.0") | ||
.stringConf | ||
.transform(_.toUpperCase(Locale.ROOT)) | ||
.checkValues(AuthTypes.values.map(_.toString)) | ||
.createWithDefault(AuthTypes.NONE.toString) | ||
|
||
val AUTHENTICATION_CUSTOM_CLASS: OptionalConfigEntry[String] = | ||
buildConf("authentication.custom.class") | ||
.doc("User defined authentication class.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
User-defined authentication implementation of org.apache.kyuubi.service.authentication.PasswdAuthenticationProvider
Hi @hddong, thanks very much for driving this feature! BTW, please update the Also, we need to update https://kyuubi.readthedocs.io/en/latest/security/authentication.html manually according to this change. Would you mind if we can have a section right after using-kerberos, e.g. |
@yaooqinn : thanks for your review, and of course not. |
Codecov Report
@@ Coverage Diff @@
## master #642 +/- ##
============================================
- Coverage 79.87% 79.81% -0.06%
- Complexity 0 132 +132
============================================
Files 120 120
Lines 4671 4692 +21
Branches 562 567 +5
============================================
+ Hits 3731 3745 +14
- Misses 624 627 +3
- Partials 316 320 +4
Continue to review full report at Codecov.
|
Thanks for your first contribution and welcome! |
Why are the changes needed?
Users may have their own authentication system
How was this patch tested?
Add some test cases that check the changes thoroughly including negative and positive cases if possible
Add screenshots for manual tests if appropriate
Run test locally before make a pull request