User Management
KalamDB includes built-in authentication and role-based access control (RBAC).
CREATE USER
CREATE USER '<username>'
WITH <PASSWORD '<password>' | OAUTH | INTERNAL>
ROLE <user|service|dba|system>
[EMAIL '<email>'];Roles
| Role | Description |
|---|---|
user | Standard user — access to own tables |
service | Service account — for bots and integrations |
dba | Database administrator — full table management |
system | System-level — unrestricted access |
Examples
-- Create a regular user with password
CREATE USER 'alice'
WITH PASSWORD 'SecurePass123!'
ROLE user
EMAIL 'alice@example.com';
-- Create a service account
CREATE USER 'chat_bot'
WITH PASSWORD 'BotSecret456!'
ROLE service;
-- Create a DBA
CREATE USER 'admin'
WITH PASSWORD 'AdminPass789!'
ROLE dba
EMAIL 'admin@example.com';ALTER USER
-- Change password
ALTER USER '<username>' SET PASSWORD '<new_password>';
-- Change role
ALTER USER '<username>' SET ROLE <user|service|dba|system>;
-- Update email
ALTER USER '<username>' SET EMAIL '<new_email>';Examples
ALTER USER 'alice' SET PASSWORD 'NewSecurePass!';
ALTER USER 'alice' SET ROLE dba;
ALTER USER 'alice' SET EMAIL 'alice.new@example.com';DROP USER
DROP USER '<username>';
DROP USER IF EXISTS '<username>';Dropping a user also removes their per-user storage directory, providing GDPR-compliant data deletion.
DROP USER IF EXISTS 'alice';Last updated on