Skip to content

[helm] Enable SASL authentication configurations#2506

Merged
loserwang1024 merged 13 commits intoapache:mainfrom
morazow:mor-2503
Mar 16, 2026
Merged

[helm] Enable SASL authentication configurations#2506
loserwang1024 merged 13 commits intoapache:mainfrom
morazow:mor-2503

Conversation

@morazow
Copy link
Copy Markdown
Contributor

@morazow morazow commented Jan 28, 2026

Purpose

Linked issue: close #2503

Brief change log

Adds configuration options to Helm charts to enable SASL authentication.

Tests

API and Format

Documentation

Updated the deploying-with-helm documentation

@morazow morazow marked this pull request as ready for review January 29, 2026 11:09
@morazow morazow force-pushed the mor-2503 branch 6 times, most recently from ebf267c to 743acef Compare February 6, 2026 16:27
Copy link
Copy Markdown
Contributor

@affo affo left a comment

Choose a reason for hiding this comment

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

Thanks for the great job!
I think there is a bit of confusion 👍

I left many comments here and there, but let me wrap up my thoughts:

About the JAAS configuration, I think we can safely move the helper to directly template stringData into the secret and also remove all the clutter in the command section to avoid setting things there 👍

In general, I think the values provided are not enough: if INTERNAL does not have any SASL enabled, then FlussClient is not required to be configured, as Fluss needs to authenticate only if the internal listener is protected. I think this demands for a re-design of this feature 🤝

Comment thread .github/workflows/helm-chart.yaml
Comment thread helm/templates/_helpers.tpl Outdated
Comment thread helm/templates/_helpers.tpl Outdated
Comment thread helm/templates/_helpers.tpl Outdated
Comment thread helm/templates/_helpers.tpl Outdated
Comment thread .github/workflows/helm-chart.yaml Outdated
Comment thread helm/templates/_helpers.tpl
Comment thread helm/values.yaml Outdated
Comment thread helm/templates/_helpers.tpl Outdated
Comment thread helm/templates/secret-sasl.yaml Outdated
@morazow morazow requested a review from affo February 10, 2026 07:47
@morazow
Copy link
Copy Markdown
Contributor Author

morazow commented Feb 10, 2026

Hello @affo ,

Thanks for the review! Please have another look 🤝

Comment thread helm/templates/sts-coordinator.yaml Outdated
Copy link
Copy Markdown
Contributor

@affo affo left a comment

Choose a reason for hiding this comment

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

Just a couple of nits 🤝

Comment thread helm/templates/sts-coordinator.yaml Outdated
Comment thread helm/tests/sasl_test.yaml Outdated
Comment thread website/docs/install-deploy/deploying-with-helm.md Outdated
Copy link
Copy Markdown
Contributor

@affo affo left a comment

Choose a reason for hiding this comment

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

Looks good now 🚀

@swuferhong what do you think?

Copy link
Copy Markdown
Contributor

@xx789633 xx789633 left a comment

Choose a reason for hiding this comment

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

Hi @morazow thanks for the pull request. I left some comments.

Comment thread helm/values.yaml Outdated
Comment thread helm/templates/secret-jaas-config.yaml
Comment thread helm/templates/sts-coordinator.yaml Outdated
Comment thread helm/templates/sts-tablet.yaml Outdated
Comment thread helm/tests/sasl_test.yaml Outdated
Comment thread helm/templates/secret-jaas-config.yaml
Comment thread helm/templates/sts-coordinator.yaml
Comment thread helm/values.yaml Outdated
Comment thread website/docs/install-deploy/deploying-with-helm.md Outdated
@morazow
Copy link
Copy Markdown
Contributor Author

morazow commented Feb 17, 2026

Hello @xx789633, @affo

Thanks for the suggestions! Please have a look to the PR again.

I have identified two follow-up issues that need to be addressed separately.

  • Separate SASL communication for inter tablets and clients
  • Special character escaping

I will follow up with issues and PR for each.

[DONE] Separating SASL Communication

For this to work we would need to prefix the JAAS contents with listener name, for example:

internal.FlussServer {
    ...
}

But this does not work for the client, as on this line the client listener name is hard coded as null. So we will have to fix the core also and then enable separate SASL for inter tablets and clients in helm charts.

Special Character for SASL Usernames and Passwords

This is also indeed an issue, which requires core change for SASL client authentication.

Without escaping we would have something like below jaas.conf file:

root@coordinator-server-0:/opt/fluss# cat /etc/fluss/conf/jaas.conf

FlussServer {
   org.apache.fluss.security.auth.sasl.plain.PlainLoginModule required
   user_admin="pa$$wo\rd!@#%&""
   user_user1="5zFqhXGY0FgXzxUVpzRoA";
};

FlussClient {
   org.apache.fluss.security.auth.sasl.plain.PlainLoginModule required
   username="admin"
   password="pa$$wo\rd!@#%&"";
};

This fails on server with configuration error.

It should be correctly escaped as below:

FlussServer {
   org.apache.fluss.security.auth.sasl.plain.PlainLoginModule required
   user_admin="pa$$wo\\rd!@#%&\""
   user_user1="5zFqhXGY0FgXzxUVpzRoA";
};

FlussClient {
   org.apache.fluss.security.auth.sasl.plain.PlainLoginModule required
   username="admin"
   password="pa$$wo\\rd!@#%&\"";
};

But this again causes issues on client side since the SaslClientAuthenticator does not escape the user provided username and password.

This is the failing test for SaslAuthenticationITCase:

@Test
void testSpecialCharactersForPassword() throws Exception {
    final String specialPassword = "pa$$wo\\rd!@#%&\"";
    final Configuration clientConfig = new Configuration();
    clientConfig.setString("client.security.protocol", "sasl");
    clientConfig.setString("client.security.sasl.username", "admin");
    clientConfig.setString("client.security.sasl.password", specialPassword);
    testAuthentication(clientConfig, getDefaultServerConfig());
}

Since both of these points require changes to Fluss core packages, let's address them separately.

@morazow morazow requested review from affo and xx789633 February 17, 2026 08:13
@morazow
Copy link
Copy Markdown
Contributor Author

morazow commented Feb 17, 2026

Discussed offline with @affo, we don't have to worry about the prefixing the FlussClient block in JAAS configuration file, since there would be only one client for inter tablet communication 🤝

@morazow morazow force-pushed the mor-2503 branch 4 times, most recently from 05999c4 to f6d123b Compare February 19, 2026 12:30
Comment thread helm/templates/secret-jaas-config.yaml Outdated
Comment thread helm/templates/_security.tpl Outdated
Comment thread helm/templates/_security.tpl Outdated
Comment thread helm/templates/NOTES.txt Outdated
Comment thread helm/templates/_security.tpl Outdated
@morazow morazow requested a review from affo March 11, 2026 23:54
Comment thread helm/templates/_security.tpl Outdated
Comment thread helm/templates/_security.tpl Outdated
Comment thread helm/values.yaml Outdated
Co-authored-by: Lorenzo Affetti <lorenzo.affetti@gmail.com>
Copy link
Copy Markdown
Contributor

@affo affo left a comment

Choose a reason for hiding this comment

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

This is now very clean!

Do we wait for #2846 to land to remove unnecessary documentation in the README?

Otherwise you can remove those changes to avoid conflicts, would be best!

Copy link
Copy Markdown
Contributor

@loserwang1024 loserwang1024 left a comment

Choose a reason for hiding this comment

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

LGTM

@loserwang1024 loserwang1024 merged commit f7e4498 into apache:main Mar 16, 2026
7 checks passed
wxplovecc pushed a commit to tongcheng-elong/fluss that referenced this pull request Apr 17, 2026
wxplovecc pushed a commit to tongcheng-elong/fluss that referenced this pull request Apr 20, 2026
polyzos pushed a commit that referenced this pull request Apr 23, 2026
* [helm] Enable pulling from private Docker registry (#2692)

* [helm] Enable pulling from private Docker registry

Added instructions for using a private Docker registry and included image values reference.

---------

Co-authored-by: xx789 <348448708@qq.com>
(cherry picked from commit 43f76a5)

* [helm] Fix wrong resource name in coordinator sts (#2834)

(cherry picked from commit 2c49fbc)

* [helm] Add CI workflow to run Helm tests (#2777)

* [helm] Add CI workflow to run Helm tests

(cherry picked from commit dd181eb)

* [Helm] Chart Component Configuration Isolation (#2472)

* Helm Chart Component Configuration Isolation

* Retrigger CI tests

* Retriggering CI/CD build pipeline

(cherry picked from commit d956e75)

* [Helm] Revert Chart Component Configuration Isolation (#2472) (#2863)

This reverts commit d956e75.

(cherry picked from commit 8cd9a6f)

* [helm] Enable SASL authentication configurations (#2506)

(cherry picked from commit f7e4498)

* [helm] Rewrite README to point to website docs (#2846)

(cherry picked from commit aa5d166)

* [helm][hotfix] Go template whitespace trimming caused exceptions (#2893)

* [helm][hotfix] Go template whitespace trimming caused exceptions

* Update and use without trimming

(cherry picked from commit 22ece48)

* [helm] Enable metrics reporting in helm charts (#2711)

---

Co-authored-by: Lorenzo Affetti <lorenzo.affetti@gmail.com>
(cherry picked from commit 2b207a4)

* [helm] Fix .helmignore to not package tests (#2847)

(cherry picked from commit d4748f2)

* [helm] Enable SASL authenticated connection to Zookeeper nodes (#2700)

---

Co-authored-by: Lorenzo Affetti <lorenzo.affetti@gmail.com>
(cherry picked from commit bdbbbce)

* [helm] Fix Zookeeper client config path (#3015)

(cherry picked from commit e9bfd72)

* [helm] Fix wrong resource name in coordinator sts (#3044)

(cherry picked from commit 8df3873)

* [helm] Add extraVolumes, extraVolumeMounts, initContainers (#3034)

(cherry picked from commit 17f5400)

---------

Co-authored-by: Lorenzo Affetti <lorenzo.affetti@gmail.com>
Co-authored-by: xx789 <348448708@qq.com>
Co-authored-by: Hemanth Savasere <hemanth.savasere@gmail.com>
Ugbot pushed a commit to Ugbot/fluss that referenced this pull request Apr 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[helm] Enable SASL authentication configurations

5 participants