How to Configure ScyllaDB Least Privilege
You set up scylladb least privilege by turning on role checks and granting narrow table rules. You must turn off the default superuser and create specific roles for each user or app. Most teams start by sharing one broad admin role across their whole engineering group. When a role has too much power, one bad query can wipe out whole tables. Attackers who steal a broad key can also read every row in your cluster. How to set up scylladb least privilege with native roles First, you must turn on
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 least privilege by turning on role checks and granting narrow table rules. You must turn off the default superuser and create specific roles for each user or app. Most teams start by sharing one broad admin role across their whole engineering group. When a role has too much power, one bad query can wipe out whole tables. Attackers who steal a broad key can also read every row in your cluster.
How to set up scylladb least privilege with native roles
First, you must turn on password or certificate checks in the cluster settings file. By default, the database lets anyone log in without checking who they are. You also need to turn on the role manager so the cluster checks user rules. Once the cluster restarts, you log in with the default admin role. Your next step is to make a new admin role with a strong key. After you test the new admin role, you must delete or lock the default one.
Next, you build functional roles that match how your team and apps work. Do not give full keyspace rights to an app that only reads one table. Create a read role for reporting tools and a write role for ingestion services. You then grant each role the exact rights it needs on specific tables or views. Finally, you create login roles for individual people and attach them to those group roles. The cluster stores these rules in an internal system keyspace and shares them across nodes.
Why you should separate human and app roles
Apps and human engineers use the database in very different ways. An app runs the same small set of queries all day long. You can lock an app role down to three or four exact actions. Give each microservice its own role so a bug stays in one place. If you rotate a key for one app, other services keep running without issues.
Human engineers need different rights depending on the task at hand. On a normal day, a developer only needs to check schema layouts or sample rows. During an outage, that same person might need to fix bad data or drop an index. If you grant emergency rights all the time, you break your own safety model. Teams often end up creating shared break-glass roles with passwords stored in a vault. Once two people share that login, your audit logs stop showing who ran what.
Least Privilege Principle + End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
What native roles solve and what they miss
Native database roles do a great job of blocking unknown users at the door. They also stop a read-only reporting app from dropping a production keyspace by mistake. When auditors ask for a list of database roles, you can show a clean table. For static services that never change their queries, native table rules work well.
Still, native roles only check who logs in and which table they touch. They cannot inspect the actual query text or limit how many rows return. A user with read rights on a customer table can still dump every record. Native roles also cannot rewrite sensitive fields like emails, phone numbers, or card numbers. If a table holds national IDs, anyone with select rights gets the raw values. Finally, static roles stay active forever until an admin remembers to revoke them by hand.
Govern statements and responses across databases and APIs
Good config and scoped roles are needed setup. They do not check single queries in flight or mask sensitive fields in returned rows. Across Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, and internal HTTP endpoints, hoop.dev sits inline in the protocol beside each supported service as an open-source proxy, a sidecar for your database or API. For every query or command an AI agent or engineer runs against production, hoop.dev decides to pass, mask, block, or hold it for human approval.
First, hoop.dev guardrails block banned queries before they run or hold risky ones for review, and hoop.dev data masking rewrites matched sensitive values in responses in memory. Furthermore, hoop.dev holds SOC 2 Type II and is open source on GitHub.
Frequently asked questions
How do I remove the default admin role safely?
First, create a new role with superuser rights and log in with it. Once you confirm the new role works, revoke login rights from the default role.
Can native roles hide sensitive columns in a table?
Native permissions work down to the table level in most setups. They do not rewrite emails, phone numbers, or card numbers inside query results.
How often should teams review database role grants?
Teams should check all human and app role grants at least once a quarter. Remove unused logins right away and shrink broad keyspace rules down to single tables.
Related guides
In this post