diff --git a/README.md b/README.md index ddc4b2a..b42c82d 100644 --- a/README.md +++ b/README.md @@ -192,6 +192,21 @@ clickhouse_ldap_servers: tls_require_cert: "demand" ``` +F: You can manage [LDAP External User Directory](https://clickhouse.com/docs/en/operations/external-authenticators/ldap/#ldap-external-user-directory) +```yaml +# Helpful guide on https://altinity.com/blog/integrating-clickhouse-with-ldap-part-two +clickhouse_ldap_user_directories: + - server: "example_ldap_server" + roles: + - "ldap_user" + role_mapping: + base_dn: "ou=groups,dc=example,dc=com" + attribute: "CN" + scope: "subtree" + search_filter: "(&(objectClass=group)(member={bind_dn}))" + prefix: "clickhouse_ +``` + F: You can manage Merge Tree config. For the list of available parameters, see [MergeTreeSettings.h](https://github.com/yandex/ClickHouse/blob/master/dbms/src/Storages/MergeTree/MergeTreeSettings.h). ```yaml clickhouse_merge_tree_config: diff --git a/templates/config.j2 b/templates/config.j2 index 13c1141..1d977d9 100644 --- a/templates/config.j2 +++ b/templates/config.j2 @@ -475,4 +475,26 @@ {% endif %} +{% if clickhouse_ldap_user_directories is defined %} + + {% for ldap_user_directory in clickhouse_ldap_user_directories %} + + {{ ldap_user_directory['server'] }} + + {% for role in ldap_user_directory['roles'] %} + <{{ role }}/> + {% endfor %} + + {% if ldap_user_directory['role_mapping'] is defined %} + + {% for key, value in ldap_user_directory['role_mapping'].items() %} + <{{ key }}>{{ value }} + {% endfor %} + + {% endif %} + + {% endfor %} + +{% endif %} +