8000 fix: don't add default password to users with other auth methods by ringerc · Pull Request #2156 · Altinity/clickhouse-operator · GitHub
[go: up one dir, main page]

Skip to content

fix: don't add default password to users with other auth methods - #2156

Merged
alex-zaitsev merged 1 commit into
Altinity:0.28.0from
ringerc:fix/cert-user-no-default-password
Nov 16, 2026
Merged

alex-zaitsev merged 1 commit into
Altinity:0.28.0from
ringerc:fix/cert-user-no-default-password

Conversation

@ringerc
@ringerc ringerc commented Nov 16, 2026
Copy link
Copy Markdown

Don't add the template default password to a user that already has a non-password authentication method. Doing so makes ClickHouse reject the user, and the pod fails to start. This operator behaviour prevents users with other authentication methods from being successfully configured as operator-managed users.

Fix by skipping injection of a default password if any of the following auth methods are already present in the user definition:

  • no_password
  • ssl_certificates
  • ssh_keys
  • ldap
  • kerberos
  • http_authentication

The list is in an array in the operator source code because there's no well-defined sub-key of the user definition that the operator can match for user authentication modes. So this list will need to be updated if the ClickHouse server adds new user authentication modes.

Fixes #2155

Details of the problem and a full test case & repro are in #2155 . The commit message for this PR also carries more information.

The normalizer gave every password-less user the template default
password, except when ssl_certificates/common_name was set. A user
with any other non-password method (ssl_certificates/subject_alt_name,
ldap, kerberos, http_authentication, ssh_keys, no_password) ended up
with two authentication methods, which ClickHouse rejects, so the pod
failed to start.

Skip the default password when the user already has one of those
methods.

LLM-assisted PR.

Fixes Altinity#2155

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Craig Ringer <craig.ringer@enterprisedb.com>
@alex-zaitsev alex-zaitsev 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.

Follow-up in #2157

@alex-zaitsev
alex-zaitsev merged commit 89a2737 into Altinity:0.28.0 Nov 16, 2026
alex-zaitsev added a commit that referenced this pull request Nov 16, 2026
…#2155)

Rebased on 0.28.0 including merged #2156; retain only existing SAN e2e.
alex-zaitsev added a commit that referenced this pull request Nov 16, 2026
@ringerc
ringerc commented Nov 17, 2026
Copy link
Copy Markdown
Author

Thanks for the quick review. Appreciated.

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.

2 participants

0