Skip to content

fix: Use the correct key for the data transfer cipher suite - #854

Merged
lfrancke merged 3 commits into
mainfrom
fix/cipher-suites-key
Oct 29, 2026
Merged

lfrancke merged 3 commits into
mainfrom
fix/cipher-suites-key

Conversation

@lfrancke

@lfrancke lfrancke commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

The operator wrote dfs.encrypt.data.transfer.cipher.suite, but Hadoop reads dfs.encrypt.data.transfer.cipher.suites (HdfsClientConfigKeys.DFS_ENCRYPT_DATA_TRANSFER_CIPHER_SUITES_KEY).
The misspelt key is just ignored so it wrongly fell back to SASL DIGEST-MD5. This has been the case since #693.

The client and the server need to set this setting. We have it in the discovery ConfigMap so this should fix HBase, Hive, Trino, Spark and any other client using the discovery stuff.

Testing

On a k3d cluster with Hadoop 3.5.0, using a Kerberos test case that writes blocks and asserts the DataNodes log Using crypto codec org.apache.hadoop.crypto.OpensslAesCtrCryptoCodec.

  • with the 26.7.0 operator, no codec is logged and the check fails;
  • with this change (applied to 26.7.0), the discovery ConfigMap includes dfs.encrypt.data.transfer.cipher.suites, the DataNodes log the OpenSSL AES/CTR codec, and the whole case passes.

Hadoop reads dfs.encrypt.data.transfer.cipher.suites, plural. The
singular key was ignored, so the client never offered AES/CTR during the
SASL handshake, the DataNode never accepted it, and block data was only
protected by SASL DIGEST-MD5 with the privacy QOP.

Both sides have to set the key: the client only offers a cipher option
when it is set in its own configuration (SaslDataTransferClient), and
the DataNode only accepts one when it is set in its own
(DataTransferSaslUtil.negotiateCipherOption). The discovery ConfigMap
already carries the same wire encryption settings as the Pods, so
downstream clients pick the corrected key up from there. Config
overrides do not reach the discovery ConfigMap, which is why setting the
right key through an override was no workaround for clients.
@lfrancke lfrancke self-assigned this Oct 29, 2026
@lfrancke
lfrancke marked this pull request as ready for review October 29, 2026 11:05
@lfrancke lfrancke moved this to Development: Waiting for Review in Stackable Engineering Oct 29, 2026

@maltesander maltesander left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@maltesander maltesander moved this from Development: Waiting for Review to Development: In Review in Stackable Engineering Oct 29, 2026
@lfrancke
lfrancke added this pull request to the merge queue Oct 29, 2026
@lfrancke lfrancke moved this from Development: In Review to Development: Done in Stackable Engineering Oct 29, 2026
Merged via the queue into main with commit 0957689 Oct 29, 2026
13 checks passed
@lfrancke
lfrancke deleted the fix/cipher-suites-key branch October 29, 2026 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Development: Done

Development

Successfully merging this pull request may close these issues.

2 participants