kyuubi/docs
fwang12 24cf1bd720
[KYUUBI #1262] Support both KERBEROS and PLAIN authentication at the same time
<!--
Thanks for sending a pull request!

Here are some tips for you:
  1. If this is your first time, please read our contributor guidelines: https://kyuubi.readthedocs.io/en/latest/community/contributions.html
  2. If the PR is related to an issue in https://github.com/apache/incubator-kyuubi/issues, add '[KYUUBI #XXXX]' in your PR title, e.g., '[KYUUBI #XXXX] Your PR title ...'.
  3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][KYUUBI #XXXX] Your PR title ...'.
-->

### _Why are the changes needed?_
<!--
Please clarify why the changes are needed. For instance,
  1. If you add a feature, you can talk about the use case of it.
  2. If you fix a bug, you can clarify why it is a bug.
-->

Support both KERBEROS and PLAIN authentication at the same time.

### _How was this patch tested?_

Added UT & IT.
I make integration testing on our dev cluster with KERBEROS and CUSTOM authentication.
```
kyuubi.authentication	KERBEROS,CUSTOM
kyuubi.authentication.custom.class=org.apache.kyuubi.ZeusCustom
```

For org.apache.kyuubi.ZeusCustom,  it checks whether the user equals password.
```
package org.apache.kyuubi

import javax.security.sasl.AuthenticationException

import org.apache.kyuubi.service.authentication.PasswdAuthenticationProvider

class ZeusCustom
  extends PasswdAuthenticationProvider with Logging {

  override def authenticate(user: String, password: String): Unit = {
    if (user == password) {
      info(s"Success log in of user: $user")
    } else {
      throw new AuthenticationException("Username or password is not valid!")
    }
  }
}
```

1. kerberos testing with user b_zeus
![image](https://user-images.githubusercontent.com/6757692/138547539-23ce62cf-07bc-4027-ba91-d5099126afde.png)

2. CUTOM authentication testing with user b_zeus
![image](https://user-images.githubusercontent.com/6757692/138547423-e68b3d82-64ab-450a-8fe7-990cab292fd7.png)

Note that: they share the same backend spark engine, because they are the same user.

Closes #1266 from turboFei/multiple_auth_KYUUBI-1262.

Closes #1262

71053aef [fwang12] adress nit
850d6b5d [fwang12] fix ut
ea7db79f [fwang12] complete
11f409cb [fwang12] Update docs
b1f83e55 [fwang12] add ut
8d137db9 [fwang12] make ldap password diff with custom
d227aa74 [fwang12] fix ut
d7cfaf4c [fwang12] only the first is valid
2e2283ba [fwang12] after all
ee0e8bc0 [fwang12] make kerberoes enabled
4fc63081 [fwang12] refactor kerbereos helper
6691cc57 [fwang12] save
cd813ecf [fwang12] refactor
dd706740 [fwang12] retest
f4038e93 [fwang12] fix code style
7b590a23 [fwang12] add ut
e39e19e6 [fwang12] add it
7dc7c927 [fwang12] with password
8dadfd32 [fwang12] refactor ldap suite
8545a033 [fwang12] add ut
1aa30a5c [fwang12] refactor
8cc2ea66 [fwang12] fix ut
10f788ae [fwang12] before all
98f93640 [fwang12] revert sth
bb75f8e9 [fwang12] save
314579f1 [fwang12] update default
ac8b195f [fwang12] [KYUUBI #1262] Support multiple kinds of SASL authentication type

Authored-by: fwang12 <fwang12@ebay.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2021-10-25 13:03:55 +08:00
..
appendix [KYUUBI #951] [LICENSE] Add license header on all docs 2021-08-19 09:53:52 +08:00
client [KYUUBI #951] [LICENSE] Add license header on all docs 2021-08-19 09:53:52 +08:00
community [KYUUBI #1257] [BUILD] Reduce unnecessary maven profile 2021-10-22 14:51:42 +08:00
deployment [KYUUBI #1262] Support both KERBEROS and PLAIN authentication at the same time 2021-10-25 13:03:55 +08:00
develop_tools [KYUUBI #951] [LICENSE] Add license header on all docs 2021-08-19 09:53:52 +08:00
imgs [KYUUBI #1246] [DOC] Share kyuubi_ecosystem.drawio with the Kyuubi community 2021-10-18 14:31:47 +08:00
integrations [KYUUBI #951] [LICENSE] Add license header on all docs 2021-08-19 09:53:52 +08:00
monitor [KYUUBI #951] [LICENSE] Add license header on all docs 2021-08-19 09:53:52 +08:00
overview [KYUUBI #460] Upgrade Hive dependency to 2.3.9 2021-10-23 13:47:22 +08:00
quick_start [KYUUBI #1269] Online documentation section in the readme is outdated 2021-10-22 14:22:46 +08:00
security [KYUUBI #1090] Add deployment document about Hadoop Credentials Manager 2021-09-15 10:02:09 +08:00
sql [KYUUBI #1277] Add KDF engine_id 2021-10-23 21:05:16 +08:00
tools [KYUUBI #951] [LICENSE] Add license header on all docs 2021-08-19 09:53:52 +08:00
conf.py [KYUUBI #874] [ASF] ASF Publish 2021-08-16 11:48:21 +08:00
index.rst [KYUUBI #951] [LICENSE] Add license header on all docs 2021-08-19 09:53:52 +08:00
make.bat [KYUUBI #874] [ASF] ASF Publish 2021-08-16 11:48:21 +08:00
Makefile [KYUUBI #874] [ASF] ASF Publish 2021-08-16 11:48:21 +08:00
requirements.txt [KYUUBI #874] [ASF] ASF Publish 2021-08-16 11:48:21 +08:00