For AI agents: the complete documentation index is at llms.txt. Every page is also available as markdown by appending .md to its URL, or by sending an Accept: text/markdown request header.

Role-based Access Control (RBAC)

Enterprise—

Role-based Access Control (RBAC) provides fine-grained permissions for your QuestDB instance.

Learn more

QuestDB Enterprise provides fine-grained access control that can restrict access at database, table, column, and even row level (using views).

Quick start​

Here's a complete example to create a read-only analyst user in under a minute: It assumes the trades table from the Create your first database guide.

-- 1. Create the user
CREATE USER analyst WITH PASSWORD 'secure_password_here';

-- 2. Grant endpoint access (required to connect)
GRANT HTTP, PGWIRE TO analyst;

-- 3. Grant read access to specific tables
GRANT SELECT ON trades TO analyst;

-- Done! The analyst can now connect and query the trades table

To verify:

SHOW PERMISSIONS analyst;

To cap the native memory each of a user's queries may allocate:

ALTER USER analyst SET MEMORY LIMIT 1G;

See Per-principal query memory limits for how user, group, and service-account limits resolve.

Access control depth​

QuestDB's access control operates across two dimensions:

Data access granularity​

Control what data users can access:

LevelWhat you can controlExample
DatabaseAll tables, global operationsGRANT SELECT ON ALL TABLES TO user
TableSpecific tablesGRANT SELECT ON trades TO user
ColumnSpecific columns within a tableGRANT SELECT ON trades(timestamp, price) TO user
RowSpecific rows via viewsCreate a view with WHERE clause, grant access to view

Connection access granularity​

Control how users can connect:

PermissionProtocolUse case
HTTPREST API, Web Console, QWP, ILP/HTTPInteractive users, web applications
PGWIREPostgreSQL Wire ProtocolSQL clients, BI tools, programmatic access
ILPInfluxDB Line Protocol (TCP)High-throughput data ingestion
-- User can connect via PostgreSQL protocol only (not web console)
GRANT PGWIRE TO analyst;

-- Service can only ingest via ILP, cannot query
GRANT ILP TO ingest_service;

-- Full interactive access
GRANT HTTP, PGWIRE TO developer;

These dimensions are independent: a user might have SELECT on all tables but only be allowed to connect via PGWIRE, or have INSERT permission but only via ILP.

Where to go next​

PageCovers
Users, service accounts, and groupsThe three principal types, and the statements that manage them
Per-principal query memory limitsSet, resolve, and inspect query memory limits for principals
Authentication and endpoint accessPasswords, JWK and REST tokens, OIDC, and the HTTP/PGWIRE/ILP permissions
Granting and revoking permissionsPermission levels, GRANT ALL, the grant option, and level re-adjustment
Permissions referenceEvery permission and the level it can be granted at
Common scenariosAnalysts, service accounts, teams, admins, failover operators
OpenID ConnectSSO against an external Identity Provider

SQL commands reference​

Where each section moved​

These anchors are kept so that existing links keep working. Prefer the pages above when adding new links.

SectionNow at
Column-level accessGranting permissions
Row-level access with viewsGranting permissions
Common scenariosCommon scenarios
Read-only analystCommon scenarios
Application service accountCommon scenarios
Team-based access with groupsCommon scenarios
Column-level restrictionsCommon scenarios
Row-level securityCommon scenarios
Database administratorCommon scenarios
Failover operatorCommon scenarios
Memory limitsPer-principal query memory limits
Memory limit upgradeUpgrading
Core conceptsUsers, service accounts, and groups
Users and service accountsUsers and groups
Why service accounts?Users and groups
GroupsUsers and groups
Authentication methodsAuthentication
Endpoint permissionsAuthentication
Built-in adminUsers and groups
Service account assumptionUsers and groups
Creating and removing principalsUsers and groups
Managing group membershipUsers and groups
Viewing informationUsers and groups
Managing authenticationAuthentication
User management referenceUsers and groups
Permission levelsGranting permissions
Granting ALLGranting permissions
The GRANT optionGranting permissions
Owner permissionsGranting permissions
Advanced topicsGranting permissions
Permission re-adjustmentGranting permissions
Implicit timestamp permissionsGranting permissions
Granting on non-existent objectsGranting permissions
Permissions referencePermissions reference
Database permissionsPermissions reference
User management permissionsPermissions reference
Special permissionsPermissions reference