How to Configure ScyllaDB Grant Permissions

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up scylladb grant permissions by assigning read, write, or admin rules to database roles. A superuser logs in and binds those roles to specific keyspaces or tables. Most teams start by creating broad roles for apps and staff. Over time, those wide roles give users too much power over production data. How scylladb grant permissions work ScyllaDB uses role-based rules to control who can do what inside the cluster. Every user or app logs in with a specific database role. Some roles can l

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

You set up scylladb grant permissions by assigning read, write, or admin rules to database roles. A superuser logs in and binds those roles to specific keyspaces or tables. Most teams start by creating broad roles for apps and staff. Over time, those wide roles give users too much power over production data.

How scylladb grant permissions work

ScyllaDB uses role-based rules to control who can do what inside the cluster. Every user or app logs in with a specific database role. Some roles can log in directly, while others only hold groups of rules. You can nest roles inside other roles to reflect your team structure.

First, an admin enables the internal auth manager in the main cluster settings. Once enabled, ScyllaDB stores all roles and rules inside a dedicated system keyspace. Every node in the cluster reads from this system keyspace to check user actions. When a role changes, the cluster shares that update across all nodes.

Next, the admin creates a role for an app or a team group. A new role has no rights to read or change data by default. The admin must grant specific rights like select, modify, create, alter, or drop. You can apply these rights to all keyspaces, one keyspace, or a single table.

For example, a reporting app only needs select rights on one analytics keyspace. A backend service needs both select and modify rights on its own tables. Admins reserve drop and alter rights for migration tools or senior staff. This setup keeps basic apps from deleting tables by mistake.

Planning role hierarchies for teams and apps

A clean role plan separates human users from machine apps right from the start. Apps should use dedicated roles that only touch the tables they own. Human engineers should inherit rights from group roles based on their job duties. When an engineer changes teams, you just swap their group role membership.

You should also avoid sharing the default superuser account for daily work. Create named admin roles for the few people who manage the cluster. Then remove or lock down the default login credentials right away. Named roles make it much easier to see who made a schema change.

AI Agent Permissions + End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Still, database roles require constant upkeep as your schema grows over time. Every new keyspace or table needs a fresh set of grant rules. When teams rush a release, they often grant rights on all keyspaces instead. That shortcut stays in place for months and leaves sensitive tables exposed.

What native roles solve and what they miss

Native roles are great for stopping unauthorized apps from touching the wrong keyspaces. They enforce clear boundaries between services that share the same ScyllaDB cluster. If a billing service logs in, it cannot read tables in the user auth keyspace. This baseline setup is a vital first step for any production cluster.

Still, native database rules only check permissions at the table or keyspace level. Once a user has select rights on a table, they can read every column by default. If that table holds emails, phone numbers, or card numbers, any query returns them. Native roles cannot rewrite matched fields in results to hide private data from engineers.

Native roles also stay active twenty-four hours a day once you grant them. An engineer who needs write rights for one quick fix keeps those rights forever. If someone steals their static password, the attacker gets those same standing rights. Also, tracking every single query across nodes adds load to the database itself.

Check database and API queries on the wire

Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev sits inline in the wire protocol beside those services as an open-source proxy, a sidecar for your Postgres or API. On every query an AI agent or engineer runs against production, hoop.dev decides to pass, mask, block, or hold it for human review.

Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run, and hoop.dev data masking rewrites matched sensitive values in responses in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.

Frequently asked questions

How do you give a user read-only rights in ScyllaDB?

Create a role with login rights and grant it select permissions on the target keyspace. Do not grant modify, create, alter, or drop rules to that role.

Do ScyllaDB role changes take effect right away?

ScyllaDB caches permission checks on each node to keep queries fast. Because of this cache, new grant rules take a brief moment to update everywhere.

Can one ScyllaDB role inherit rules from another role?

Yes, you can grant a group role to an individual user role. The user role then receives all the keyspace and table rules of that group.

The query runs. The emails stay hidden.