ClickHouse can be interconnected with OpenLDAP. You can manage accounts and permissions in a centralized manner by adding the OpenLDAP server configuration and creating users on ClickHouse. You can use this method to import users from the OpenLDAP server to ClickHouse in batches.
This section applies only to MRS 3.1.0 or later.
Parameter |
Description |
Example Value |
---|---|---|
ldap_servers.ldap_server_name.host |
OpenLDAP server host name or IP address. This parameter cannot be empty. |
localhost |
ldap_servers.ldap_server_name.port |
OpenLDAP server port number. If enable_tls is set to true, the default port number is 636. Otherwise, the default port number is 389. |
636 |
ldap_servers.ldap_server_name.auth_dn_prefix |
Prefix and suffix used to construct the DN to bind to. The generated DN will be constructed as a string in the following format: auth_dn_prefix + escape(user_name) + auth_dn_suffix. Use a comma (,) as the first non-space character of auth_dn_suffix. |
uid= |
ldap_servers.ldap_server_name.auth_dn_suffix |
,ou=Group,dc=node1,dc=com |
|
ldap_servers.ldap_server_name.enable_tls |
A tag to trigger the use of the secure connection to the OpenLDAP server.
|
yes |
ldap_servers.ldap_server_name.tls_require_cert |
SSL/TLS peer certificate verification behavior. The value can be never, allow, try, or require. |
allow |
cd ${BIGDATA_HOME}/FusionInsight_ClickHouse_*/x_x_ClickHouseServer/etc
cat config.xml
ls ${BIGDATA_HOME}/FusionInsight_ClickHouse_*/install/FusionInsight-ClickHouse-*/clickhouse/keytab/clickhouse.keytab
cd /opt/client
source bigdata_env
clickhouse client --host IP address of the node where the ClickHouseServer instance is located --user clickhouse/hadoop.<System domain name> --password clickhouse.keytab path obtained in 8 --port ClickHouse port number
The default system domain name is hadoop.com. Log in to FusionInsight Manager and choose System > Permission > Domain and Mutual Trust. The value of Local Domain is the system domain name. Change the letters to lowercase letters when running a command.
clickhouse client --host IP address of the node where the ClickHouseServer instance is located --user clickhouse --port ClickHouse port number
Run the following statement to create user testUser in cluster default_cluster and set ldap_server to the OpenLDAP server name in the <ldap_servers> tag in 6. In this example, the name is ldap_server_name.
CREATE USER testUser ON CLUSTER default_cluster IDENTIFIED WITH ldap_server BY 'ldap_server_name';
testUser indicates an existing username in OpenLDAP. Change it based on the site requirements.
exit;
clickhouse client --host IP address of the ClickHouseServer instance --user testUser --password --port ClickHouse port number
Enter the password of testUser.
OpenLDAP server host name or IP address. This parameter is mandatory and cannot be empty.
Port number of the OpenLDAP server. If enable_tls is set to true, the default value is 636. Otherwise, the value is 389.
Prefix and suffix used to construct the DN to bind to.
The generated DN will be constructed as a string in the following format: auth_dn_prefix + escape(user_name) + auth_dn_suffix.
Note that you should use a comma (,) as the first non-space character of auth_dn_suffix.
A tag to trigger the use of the secure connection to the OpenLDAP server.
Set it to no for the plaintext (ldap://) protocol (not recommended).
Set it to yes for LDAP over SSL/TLS (ldaps://) protocol (recommended and default).
Minimum protocol version of SSL/TLS.
The value can be ssl2, ssl3, tls1.0, tls1.1, or tls1.2 (default).
SSL/TLS peer certificate verification behavior.
The value can be never, allow, try, or require (default).
Certificate file.
Certificate key file.
CA certificate file.
Directory where the CA certificate is stored.
Allowed encryption suite.