Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[security] PlainSaslServerProvider conflicts with Hadoop SASL provider causing authentication failure

オープン 初心者向け
#4,490 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@xinzhang-hello がすでに取り組んでいます。

2026年9月28日 から。

  • #4491 @xinzhang-hello による — オープン

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
88/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
hadoop, java

調査の方向性

まず PlainSaslServerProvider.java とその initialize() メソッドを読み、次に Java Security provider の順序が Sasl.createSaslServer("PLAIN", ...) にどのような影響を与えるかを確認します。Fluss の provider が Hadoop の provider より前に登録され、CLIENT:SASL 認証が UnsupportedCallbackException で失敗しなくなれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Search before asking
  • I searched in the issues and found nothing similar.
Fluss version

main (development)

Please describe the bug 🐞

When running Fluss in an environment where Hadoop / HDFS dependencies are present on the classpath (for instance, when enabling HDFS remote log tiering or Paimon lake tiering), Hadoop's SaslRpcServer class registers its own SaslPlainServer.SecurityProvider into Java's Security providers.

Currently, Fluss initializes its SASL/PLAIN provider in PlainSaslServerProvider.java:

public static void initialize() {
    Security.addProvider(new PlainSaslServerProvider());
}

Security.addProvider() appends Fluss's PlainSaslServerProvider to the end of the provider list.

When a client attempts to connect to Fluss using SASL/PLAIN authentication (CLIENT:SASL), Java's Sasl.createSaslServer("PLAIN", ...) iterates through the registered providers and selects the first matching PLAIN provider, which is Hadoop's SaslPlainServer.SecurityProvider instead of Fluss's.

Because Hadoop's SASL PLAIN provider expects Hadoop-specific callbacks, it fails during authentication:

WARN org.apache.fluss.rpc.netty.server.NettyServerHandler - Connection is still in the authentication process. Unable to handle API key: 1012.
...
PLAIN auth failed: javax.security.auth.callback.UnsupportedCallbackException: Unrecognized Callback
    at org.apache.hadoop.security.SaslRpcServer$SaslPlainServer$SecurityProvider...

This causes all client SASL authentication attempts to fail.

Solution

In PlainSaslServerProvider.initialize(), use Security.insertProviderAt(new PlainSaslServerProvider(), 1); to register Fluss's PLAIN provider at the first position.

This guarantees that Fluss's own PlainSaslServer is always preferred over any third-party providers (such as Hadoop). This aligns with the implementation in Apache Kafka (org.apache.kafka.common.security.plain.PlainSaslServerProvider), which also uses Security.insertProviderAt(new PlainSaslServerProvider(), 1).

Are you willing to submit a PR?
  • I'm willing to submit a PR!
主要言語
Java
スター
2.2k
フォーク
656
平均マージ
2日 21時間
マージ済み PR(30日)
97

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/fluss のほかの issue

apache/fluss の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。