Search code examples
clickhouse

How to set the <secret> tag in the remote_servers tag?


experts I'm trying to configure a cluster setting that does not include < password >.

According to the ClickHouse documentation,( https://clickhouse.com/docs/en/engines/table-engines/special/distributed/#distributed-clusters ) I think it can be implemented by using the < secret > tag inside the < logs > tag.

However, there is no description for the < secret > tag.

Can I include user information using < secret > tag?

If you have this experience, please share. thank you.


Solution

  • You can put any random string. The idea that CH nodes with the same string trust each other.

    https://github.com/ClickHouse/ClickHouse/blob/b29e877f269e84ae452c446e70b406a695863470/tests/integration/test_distributed_inter_server_secret/configs/remote_servers_n2.xml

    <clickhouse>
        <remote_servers>
            <secure_disagree>
                <secret>bar_n2</secret>
                <node>
                    <host>n1</host>
                    <port>9000</port>
                </node>
                <node>
                    <host>n2</host>
                    <port>9000</port>
                </node>
            </secure_disagree>
        </remote_servers>
    </clickhouse>