kyuubi icon indicating copy to clipboard operation
kyuubi copied to clipboard

[FEATURE] JDBC Authentication Provider for server

Open bowenliang123 opened this issue 2 years ago • 0 comments

Code of Conduct

Search before asking

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

Describe the feature

Add JDBC authentication provider as implementation of PasswdAuthenticationProvider out of box.

Compared to currently support authentication methods like Kerberos and LDAP, JDBC source is a much easy and stable source for practical deployment.

The solution should provide:

  • easy to use and config jdbc connection details
  • handy to customize query statements for authentication
  • provide efficient db connection pooling (optional)

Motivation

No response

Describe the solution

Add JDBC to AuthMethods enum and JDBCPasswdAuthenticationProvider into package org.apache.kyuubi.service.authentication with listed features:

  • specify JDBC driver name and load the driver class
  • configs of JDBC url, username and password
  • select query with placeholders for checking user and password , like SELECT * from user_pass_hash where username = ${user} and password = MD5(${password})
  • cache and reuse jdbc connections (optional)

Additional context

No response

Are you willing to submit PR?

  • [X] Yes I am willing to submit a PR!

bowenliang123 avatar Aug 12 '22 05:08 bowenliang123