To enable JWT providers for your organization, reach out to support.
Before you begin
To configure JWT providers for a service, you need:- An organization on the Enterprise plan.
- A service running ClickHouse version 26.4 or later.
- A role with the
control-plane:service:managepermission on the service (for example, Admin or Service admin). Members without it see the section as read only. - A publicly reachable HTTPS JWKS URL that publishes at least one RSA key (tokens must be signed with RS256).
JWKS-based providers accept RSA keys only. Tokens signed with HMAC (
HS256) or EC (ES256) keys cannot be verified against a JWKS endpoint and are rejected. A JWKS document may contain other key types, but at least one usable RSA key must be present.How it works
The client (your identity provider or application) generates a JWT and signs it with its private key. The token must follow the expected token format. ClickHouse then verifies it against the public keys published at your JWKS URL:- ClickHouse reads the token’s
kid(key ID) header and selects the matching key from your JWKS document. - It verifies the token signature against that RSA public key and checks the
iss(issuer) andaud(audience) claims against your provider configuration. - On success, the connection runs as an ephemeral user whose access rights come from the token’s
clickhouse:grantsandclickhouse:rolesclaims, capped by the permission limit (thedefaultuser). See Access rights for details.
Add a JWT provider
1
Open the service security settings
Navigate to your service, open Settings, and scroll to the Security section. Find the JWT authentication card.
2
Open the providers flyout
Select Set up JWT providers (or Manage JWT providers if you already have some). The flyout opens with a new provider form ready to fill in.
3
Fill in the provider details
Complete the provider form and select Save.
4
Add more providers if needed
Use Add another provider to configure additional providers. A service can have at most five JWT providers.
Limits
- A maximum of five JWT providers per service.
- JWKS providers accept RSA / RS256 keys only.
- The JWKS URL must be a public HTTPS endpoint. Private, internal, or link-local addresses are rejected.
Related
- JWT Authentication — token claims, ephemeral users, and client usage.