Introducing JWT authentication in ClickHouse Cloud
ClickHouse Cloud (26.4+) can authenticate clients with short-lived JWTs from any OpenID Connect provider such as Okta or Microsoft Entra, replacing database passwords. ClickHouse verifies the token signature against the provider's JWKS, then creates an in-memory ephemeral user named JWT::<subject>::<claims_hash> carrying the roles from the token, and removes it after expiry, so no CREATE/DROP USER provisioning is needed. Quotas, settings profiles and row policies attach to a stable UUID derived from issuer, subject and audience, and definer views get a persistent non-login shadow user so they survive token expiry. Client libraries for JS, Python, Go and Java accept bearer tokens with refresh hooks, and custom providers require the Enterprise plan.
Related posts
- New Terraform provider: Manage ClickHouse database users, roles, and privileges with code
ClickHouse mediumAdept
ClickHouse's new clickhousedbops Terraform provider, now generally available, manages databases, users, roles and privilege grants on both ClickHouse Cloud and self-hosted instances. A walkthrough provisions a Cloud service with the existing clickhouse provider, then wires clickhousedbops to the service's native-secure endpoint to create a database, three users, table-scoped SELECT roles and role grants in a single apply. For self-hosted clusters with multiple replicas, set cluster_name so resources are created on every replica. It must stay null on ClickHouse Cloud and should be omitted when user_directory uses replicated storage.
- Build "Sign in with Your App" using Supabase Auth
Supabase mediumAdeptSupabase Auth can now act as an OAuth 2.1 and OpenID Connect identity provider, letting a project offer "Sign in with [Your App]" to third-party apps, MCP-based AI agents, partner integrations and enterprise SSO. It uses the authorization code flow with PKCE, issues JWT access tokens carrying a client_id claim alongside the usual user_id and role, and also provides ID tokens, a UserInfo endpoint, refresh tokens, a JWKS endpoint and discovery documents at /.well-known/oauth-authorization-server and /.well-known/openid-configuration. MCP clients can register themselves through dynamic client registration. Existing login methods, Custom Access Token Hooks and Row Level Security all apply to OAuth tokens, so RLS policies can limit each client to specific data by checking the client_id claim. Granular scopes are planned but not yet available.
- clickhousectl v0.2.0: Postgres, ClickPipes and more
ClickHouse mediumAdept
clickhousectl v0.2.0 adds Postgres management, both local (Docker-backed, keyed on name and major version 16–18) and as ClickHouse Cloud managed Postgres. It also adds ClickPipes commands for Kafka, Kinesis, object storage, CDC from Postgres/MySQL/MongoDB and BigQuery snapshots, plus SQL over HTTP through Query Endpoints so no local ClickHouse binary is needed. Query Endpoints are locked to a per-service API key whose only grant is a sql_console_admin binding, so a leaked key reaches one service only. Other changes include Markdown-style table output that uses fewer tokens for agents, a --debug flag for credential resolution, and a standalone typed async Rust crate, clickhouse-cloud-api.
- Building ClickHouse BYOC (Bring Your Own Cloud) on AWS
ClickHouse mediumAdept
ClickHouse BYOC on AWS splits a ClickHouse-hosted management plane from a data plane EKS cluster in the customer's VPC, provisioned automatically with CloudFormation and Crossplane. Support access is approved, audited, time-bound and routed through Tailscale. Engineers authenticate with temporary certificates tied to a ClickHouse user profile that can read only system tables such as query_log, never customer data. Custom Profiles with node-group labels and node selectors replaced the default scheduler plus cluster autoscaler, which had wasted resources because of DaemonSet overhead and poor scale-in behaviour on m7gd node pools. Customers choose maintenance windows for upgrades, and ClickHouse handles EKS version maintenance.
- WTF Are JWTs?
Neon mediumAdept
JSON Web Tokens are compact, signed, self-contained tokens made of three base64url segments (header, payload of registered and custom claims, and an HMAC or RSA signature). They replaced database-backed sessions for stateless, cross-service auth. A worked Node.js example builds an HS256 token by hand, and JWKS endpoints let services fetch an auth provider's public keys by kid to verify tokens and support key rotation. In Neon RLS, verified claims such as tenant_id drive Postgres row-level security policies. JWTs are signed but not encrypted, so sensitive data should stay out of the payload or use encrypted JWTs.