[ 
https://issues.apache.org/jira/browse/HBASE-28534?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17838673#comment-17838673
 ] 

Nikita Pande edited comment on HBASE-28534 at 4/18/24 2:28 PM:
---------------------------------------------------------------

I had kinit done with a user. Then had run spark-shell command and got error
{code:java}
No matching SASL authentication provider and supporting token found from 
providers for user: <kerb principal name> 
(auth:KERBEROS) {code}
NOTE: I didnt get auth:PROXY but it did fail
{code:java}
Failed on local exception: java.io.IOException: 
org.apache.hadoop.security.AccessControlException: Client cannot authenticate 
via:[TOKEN, KERBEROS]{code}
When I do not pass "--master local[*]", it picked yarn mode and it passes 
successfully.


was (Author: JIRAUSER298527):
I had kinit done with a user. Then had run spark-shell command and got error

```

No matching SASL authentication provider and supporting token found from 
providers for user: <kerb principal name> 

(auth:KERBEROS)

```

NOTE: I didnt get auth:PROXY but it did fail

```

Failed on local exception: java.io.IOException: 
org.apache.hadoop.security.AccessControlException: Client cannot authenticate 
via:[TOKEN, KERBEROS]

```

When I do not pass "--master local[*]", it picked yarn mode and it passes 
successfully.

> Authentication failure when running hbase-spark in local mode
> -------------------------------------------------------------
>
>                 Key: HBASE-28534
>                 URL: https://issues.apache.org/jira/browse/HBASE-28534
>             Project: HBase
>          Issue Type: Bug
>          Components: spark
>    Affects Versions: connector-1.0.0
>            Reporter: Junegunn Choi
>            Assignee: Junegunn Choi
>            Priority: Major
>
> h2. Problem
> When running Spark in local mode, hbase-spark fails to authenticate to a 
> Kerberos secured HBase cluster. The error message is:
> {quote}No matching SASL authentication provider and supporting token found 
> from providers for user: x...@xxx.xxx (auth:PROXY)
> {quote}
> That is because {{applyCreds}} changes the authentication method of the 
> current user to {{{}PROXY{}}}, when it should still be {{KERBEROS}} for local 
> mode to run correctly.
> h2. Suggested solution
> To fix this, I propose removing {{{}applyCreds{}}}. The function is no longer 
> needed and should be removed:
> 1. Because we should not change the authentication mode of the current user 
> in local mode
> 2. And because the purpose of the function is no longer valid. It is not 
> doing anything meaningful since the broadcasting of the user credentials was 
> removed in this commit:
> [https://github.com/apache/hbase-connectors/commit/75e41365207408f5b47d5925469a49fd60078b5e]
> A pull request is on the way.
> h2. Testing
> The fix was manually tested against Kerberos secured HBase 2.4.17 + Hadoop 
> 3.3.5 cluster using Spark 3.5.1, both in local mode and with Yarn master, 
> running the following Python code.
> {code:java}
> df = (spark.read.format("org.apache.hadoop.hbase.spark")
>                 .option("hbase.columns.mapping", "key STRING :key, state 
> STRING info:state")
>                 .option("hbase.table", "hbase:meta").load())
> df.first()
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to