How to Configure ScyllaDB Read Only User

Published
Length
3 min read

Luis Felipe Dias

All posts

You create a scylladb read only user by making a new database role. Then you grant that role select rights on specific keyspaces or tables. Many teams start by sharing one admin login across apps and engineers. Shared admin logins create huge risks during live debugging sessions. One wrong write command can delete live customer rows in seconds. A dedicated read role stops people from changing or dropping data. How to set up a scylladb read only user First, check that your cluster has role che

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 create a scylladb read only user by making a new database role. Then you grant that role select rights on specific keyspaces or tables. Many teams start by sharing one admin login across apps and engineers. Shared admin logins create huge risks during live debugging sessions. One wrong write command can delete live customer rows in seconds. A dedicated read role stops people from changing or dropping data.

How to set up a scylladb read only user

First, check that your cluster has role checks and login rules turned on. If login checks are off, anyone on the network can change data. Log in with an admin account that has full role rights. Next, create a new role and allow it to log in. Give this role a strong password and store that password in a safe vault.

A new role starts with zero rights to read or write data. You must grant select rights to this role so it can read rows. You can grant select rights across every keyspace in the cluster. You can also limit those select rights to one single keyspace. Some teams grant select rights on one specific table for tighter control. Test the new role by logging in and trying a write query. The database should block the write and allow the select query.

Why teams group read roles for people and apps

Setting up individual permissions for fifty engineers takes a lot of time. Instead, you can create one base read role with select rights. Then you create personal login roles for each person on the team. You grant the base read role to each personal login role. When a new engineer joins, you grant them that same base role. When someone leaves the team, you remove their personal login role. This setup keeps your permission list clean and easy to check.

Reporting tools and dashboard apps also need read roles to pull metrics. Give each reporting app its own login role with select rights. Do not let apps and humans share the exact same login role. Separate roles help you see which app or person ran a slow query. If an app key leaks, you can rotate that single password right away. Your human engineers can keep working without changing their own login keys.

Read-Only Root Filesystem + User Provisioning (SCIM): architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Where native database roles fall short in production

Native database roles solve a big part of the safety puzzle. They stop people and apps from running insert, update, or delete statements. They also block anyone from dropping tables or changing keyspace settings. Still, native roles only check who logs in and which tables they read. They do not inspect what happens inside the query results in flight.

A person with a read role can still pull raw customer records. Those records often hold emails, phone numbers, card numbers, or national IDs. Masking rewrites matched fields in results before they reach the screen. Native read roles do not mask sensitive fields on the fly. Also, static passwords for read roles still sit on laptops and in scripts. Teams must rotate those passwords by hand when people change jobs. Finally, basic role checks do not give a central log across different databases. Security teams have to dig through local cluster tables to review past queries.

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

Can a scylladb read only user still view system tables?

Yes, most login roles can read local system tables to discover cluster topology. Client drivers need this metadata to route queries to the right nodes. You do not need to grant extra rights for basic driver routing.

How do I limit a read role to one single keyspace?

Grant the select right on that named keyspace instead of all keyspaces. The role will read tables inside that keyspace and get blocked elsewhere. You can repeat this step if the user needs a second keyspace later.

Why can my new read role change data right after setup?

Check if your cluster config still uses the open default login mode. If password checks are off in the node settings, role rules do not run. You must turn on password checks and restart the nodes to enforce roles.

The query runs. The emails stay hidden.