@@ -688,42 +688,31 @@ Set `--disable-version-update-checks=true` in air-gapped environments or when eg
688688# ## Default user password {#default-user-password}
689689
690690` spec.settings.defaultUserPassword` sets the password for the built-in `default`
691- user. The value is not stored inline; it is read from a key in a Secret or a
692- ConfigMap that you create, and injected into the pod as an environment variable.
691+ user. Provide the value from a key in a Secret (recommended) or a ConfigMap that
692+ you create, rather than inline in the CR :
693693
694694` ` ` yaml
695695spec:
696696 settings:
697697 defaultUserPassword:
698698 passwordType: password # default; see "Password types" below
699- secret: # exactly one of secret OR configMap
699+ secret: # exactly one of secret or configMap
700700 name: clickhouse-password # name of the Secret/ConfigMap
701- key: password # the KEY inside it, not the password value
701+ key: password # the key inside it, not the password value
702702` ` `
703703
704- You must specify **exactly one** of `secret` or `configMap` (setting both, or
705- neither, is rejected by the validating webhook), and both `name` and `key` are
706- required. `name` is the Secret/ConfigMap object, `key` is the entry within it whose
707- value holds the password. The password itself is never written in the CR.
704+ Provide exactly one of `secret` or `configMap`, each with both `name` (the object)
705+ and `key` (the entry that holds the password).
708706
709707# ### Password types {#password-types}
710708
711709` passwordType` tells ClickHouse how to interpret the value. It defaults to
712- ` password` (plaintext). The common alternatives are hashed forms such as
713- ` password_sha256_hex` and `password_double_sha1_hex`. See the
710+ ` password` (plaintext); the alternatives are hashed forms such as
711+ ` password_sha256_hex` and `password_double_sha1_hex`. Prefer a hashed type so the
712+ plaintext is never stored. See the
714713[ClickHouse user settings](https://clickhouse.com/docs/operations/settings/settings-users#user-namepassword)
715714for the full list.
716715
717- - Use `password_sha256_hex` (or another hashed type) so the plaintext never has to
718- exist in the cluster; store only the hash.
719- - Use `password` only when you need the in-pod `clickhouse-client` to authenticate
720- as `default` automatically : the operator writes the value into the client
721- configuration (`/etc/clickhouse-client/config.yaml`) **only for the plaintext
722- ` password` type**. With a hashed type the server still authenticates the `default`
723- user normally, but `clickhouse-client` run inside the pod is not pre-filled with
724- the password (a hash cannot be used as a client-side password). This does not
725- affect the operator itself, which manages the cluster as a separate `operator` user.
726-
727716# ### Full example with a Secret {#default-password-secret-example}
728717
729718Create the Secret, then reference its key :
@@ -747,6 +736,11 @@ spec:
747736 key: password
748737` ` `
749738
739+ <Note>
740+ With `passwordType : password`, the in-pod `clickhouse-client` is configured with
741+ this password, which is handy for debugging.
742+ </Note>
743+
750744For a hashed password, store the hash instead of the plaintext :
751745
752746` ` ` bash
@@ -767,10 +761,9 @@ spec:
767761
768762# ### Using a ConfigMap {#using-configmap-for-user-passwords}
769763
770- A ConfigMap works the same way but stores its value in plaintext on the API server,
771- so use it **only for non-sensitive or already-hashed values**, for example a
772- ` password_sha256_hex` digest, which does not contain the plaintext password
773- (though a weak password may still be recoverable from the hash by brute force) :
764+ A ConfigMap works the same way, but its contents are not protected like a Secret.
765+ Use it only for non-sensitive or already-hashed values, such as a
766+ `password_sha256_hex` digest :
774767
775768` ` ` yaml
776769spec:
@@ -783,8 +776,8 @@ spec:
783776` ` `
784777
785778<Note>
786- Do not put a plaintext password in a ConfigMap. ConfigMap data is not protected
787- like Secret data. Use a Secret for any plaintext (`passwordType : password`) value.
779+ Do not put a plaintext password in a ConfigMap. Use a Secret for any plaintext
780+ (`passwordType : password`) value.
788781</Note>
789782
790783# ## Custom users in configuration {#custom-users-in-configuration}
0 commit comments