Authorization & Role-Based Access Control (RBAC)
Once a user or service is authenticated, CrateDB ensures that every action they perform is authorized.
Through Role-Based Access Control (RBAC), administrators can define who can do what, controlling access to clusters, schemas, tables, and individual SQL operations with precision.
RBAC empowers organizations to enforce least privilege policies, meet compliance requirements, and confidently manage multi-user environments, from small teams to enterprise-scale deployments.
How authorization works
CrateDB’s authorization model is based on roles that encapsulate permissions.
A role represents a set of privileges that can be assigned to one or more users.
- Roles: Logical groupings of privileges (e.g., analyst, developer, admin).
- Privileges: Specific rights such as DQL (read/query), DML (write/modify), or DDL (schema changes).
- Inheritance: Roles can be nested, allowing hierarchical permission models that mirror organizational structure.
- Schema-level and table-level granularity: Define permissions precisely where they’re needed.
- Dynamic management: Roles and privileges can be modified on the fly, without downtime.
In self-managed deployments, RBAC is configured using standard SQL commands (e.g., CREATE ROLE, GRANT, REVOKE).
Why it matters
- Least privilege enforcement: Limit data access to what users actually need.
- Operational safety: Reduce the risk of accidental or unauthorized modifications.
- Multi-tenant security: Segregate access between teams, applications, or customers.
- Compliance-ready: Implement controls aligned with ISO 27001 and SOC 2 principles.
Best practices
- Create role hierarchies (e.g., viewer → editor → admin) for clarity and scalability.
- Regularly audit role assignments to detect unused or excessive privileges.
- Combine RBAC with Audit Logging for full traceability.
- Apply schema-based isolation in multi-tenant environments.
- Manage service accounts separately from human user accounts.
CrateDB architecture guide
This comprehensive guide covers all the key concepts you need to know about CrateDB's architecture. It will help you gain a deeper understanding of what makes it performant, scalable, flexible and easy to use. Armed with this knowledge, you will be better equipped to make informed decisions about when to leverage CrateDB for your data projects.
