clickhouse-security-basics

Featured

Secure ClickHouse with user management, network restrictions, TLS, and audit logging. Use when hardening a ClickHouse deployment, creating restricted users, or configuring network-level access controls. Trigger: "clickhouse security", "clickhouse user management", "secure clickhouse", "clickhouse TLS", "clickhouse access control", "clickhouse firewall".

AI & Automation 2,944 stars 440 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# ClickHouse Security Basics ## Overview Secure a ClickHouse deployment with SQL-based user management, network restrictions, TLS encryption, and query audit logging. ## Prerequisites - ClickHouse admin access - `CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT=1` for SQL-based user management - For self-hosted: access to server config files ## Instructions ### Step 1: Create Restricted Users (SQL-Based RBAC) ```sql -- Create a read-only analyst user CREATE USER analyst IDENTIFIED WITH sha256_password BY 'strong-password-here' DEFAULT DATABASE analytics SETTINGS readonly = 1, -- Read-only mode max_memory_usage = 5000000000, -- 5GB per query max_execution_time = 60; -- 60s timeout GRANT SELECT ON analytics.* TO analyst; -- Create an application user with insert permissions CREATE USER app_writer IDENTIFIED WITH sha256_password BY 'another-strong-password' DEFAULT DATABASE analytics; GRANT SELECT, INSERT ON analytics.* TO app_writer; -- Explicitly deny destructive operations REVOKE DROP, ALTER, CREATE ON *.* FROM app_writer; -- Create an admin user CREATE USER ch_admin IDENTIFIED WITH sha256_password BY 'admin-password' SETTINGS PROFILE 'default'; GRANT ALL ON *.* TO ch_admin WITH GRANT OPTION; ``` ### Step 2: Use Roles for Permission Groups ```sql -- Create reusable roles CREATE ROLE data_reader; GRANT SELECT ON analytics.* TO data_reader; CREATE ROLE data_writer; GRANT SELECT, INSERT ON analytics.* TO ...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category