Skip to content

ClickHouseInstallation user settings support for auth_methods #1958

@petergvizd-s1

Description

@petergvizd-s1

Hello,
I am trying to enable auth_methods definition for clickhouse - doc. According to doc, it is possible to use just one of auth_methods, password_sha256_hex, password or ssh_keys. Unfortunately looks like operator is injecting password_sha256_hex field to the user defintion even though it is not specified in ClickHouseInstallation object. Please is there some way how to disable this operator behaviour, so that I can use auth_methods definition and possibly multiple authentication mechanisms?

Current user definition in ClickHouseInstallation object:

users:
  backup/auth_methods/method1/password:
    valueFrom:
      secretKeyRef:
        key: password
        name: clickhouse-backup-creds

Generated /etc/clickhouse-server/users.d/chop-generated-users.xml:

<clickhouse>
    <users>
        <backup>
            <auth_methods>
                <method1>
                    <password from_env="CONFIGURATION_USERS_BACKUP_AUTH_METHODS_METHOD1_PASSWORD"></password>
                </method1>
            </auth_methods>
            <password_sha256_hex>RANDOM_HASH_GENERATED_BY_OPERATOR?</password_sha256_hex>
            <profile>default</profile>
            <quota>default</quota>
        </backup>
    </users>
</clickhouse>    

Operator version: 0.24.5
Operator access configuration:

clickhouse:
  access:
    password: ""
    port: 8123
    rootCA: ""
    scheme: auto
    secret:
      name: ""
      namespace: ""
    timeouts:
      connect: 1
      query: 4
    username: ""

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions