You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ju...@apache.org on 2026/01/05 06:49:25 UTC
(hbase) branch HBASE-29144 created (now ecc9c1c2048)
This is an automated email from the ASF dual-hosted git repository.
junegunn pushed a change to branch HBASE-29144
in repository https://gitbox.apache.org/repos/asf/hbase.git
at ecc9c1c2048 HBASE-29144 Fall back to legacy version of the method
This branch includes the following new commits:
new ecc9c1c2048 HBASE-29144 Fall back to legacy version of the method
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(hbase) 01/01: HBASE-29144 Fall back to legacy version of the method
Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
junegunn pushed a commit to branch HBASE-29144
in repository https://gitbox.apache.org/repos/asf/hbase.git
commit ecc9c1c204855d99fdea846629c994602c9eb4fc
Author: Junegunn Choi <ju...@apache.org>
AuthorDate: Mon Jan 5 15:48:26 2026 +0900
HBASE-29144 Fall back to legacy version of the method
---
.../main/java/org/apache/hadoop/hbase/ipc/RpcConnection.java | 4 ++++
.../security/provider/SaslClientAuthenticationProviders.java | 11 ++++++++++-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcConnection.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcConnection.java
index 06204046820..f88b68a2938 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcConnection.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcConnection.java
@@ -139,6 +139,10 @@ abstract class RpcConnection {
Pair<SaslClientAuthenticationProvider, Token<? extends TokenIdentifier>> pair;
if (useSasl && securityInfo != null) {
pair = providers.selectProvider(conf, clusterId, ticket);
+ if (pair == null) {
+ LOG.trace("Falling back to selectProvider using the cached configuration");
+ pair = providers.selectProvider(clusterId, ticket);
+ }
if (pair == null) {
if (LOG.isTraceEnabled()) {
LOG.trace("Found no valid authentication method from providers={} with tokens={}",
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/security/provider/SaslClientAuthenticationProviders.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/security/provider/SaslClientAuthenticationProviders.java
index 6c220e3bd0b..48863cb5625 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/security/provider/SaslClientAuthenticationProviders.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/security/provider/SaslClientAuthenticationProviders.java
@@ -202,13 +202,22 @@ public final class SaslClientAuthenticationProviders {
/**
* Chooses the best authentication provider and corresponding token given the HBase cluster
- * identifier and the user.
+ * identifier, the user, and the supplied {@link Configuration}.
*/
public Pair<SaslClientAuthenticationProvider, Token<? extends TokenIdentifier>>
selectProvider(Configuration conf, String clusterId, User clientUser) {
return selector.selectProvider(conf, clusterId, clientUser);
}
+ /**
+ * Chooses the best authentication provider and corresponding token given the HBase cluster
+ * identifier and the user. This version was kept for backward compatibility.
+ */
+ public Pair<SaslClientAuthenticationProvider, Token<? extends TokenIdentifier>>
+ selectProvider(String clusterId, User clientUser) {
+ return selector.selectProvider(clusterId, clientUser);
+ }
+
@Override
public String toString() {
return providers.stream().map((p) -> p.getClass().getName())