User-based Access Control

Published
Length
3 min read

Luis Felipe Dias

All posts

User based access control assigns permissions straight to individual user accounts instead of shared groups. Admins grant read, write, or admin rights to each person on each target system. Many small teams start with this model because it feels fast and simple. Over time, people change jobs and keep old permissions they no longer need. Broad grants pile up across servers and databases, which creates major security risks. How user based access control works in practice In a user based access c

Role-Based Access Control (RBAC) + User Provisioning (SCIM): the complete guide

Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.

Free white paper. No spam. Unsubscribe anytime.

User based access control assigns permissions straight to individual user accounts instead of shared groups. Admins grant read, write, or admin rights to each person on each target system. Many small teams start with this model because it feels fast and simple. Over time, people change jobs and keep old permissions they no longer need. Broad grants pile up across servers and databases, which creates major security risks.

How user based access control works in practice

In a user based access control setup, every person gets a unique account. Admins create these accounts inside each database, server, or cloud app. Next, the admin attaches specific rules to each user profile. For example, one engineer gets read rights on a customer table. Another engineer gets write rights on a test server.

When a user logs in, the system checks their name and password. Then the system looks up the access list tied to that specific user. If the user is on the list, the system lets them in. If the user is not on the list, the system blocks the request. Every change requires an admin to edit that one user account by hand.

This manual process works fine when a team has five people and two servers. As the team grows to fifty people, the setup breaks down fast. Admins must update dozens of systems whenever one person joins or leaves the team. Missing just one system leaves an old account open to attackers.

Why direct user grants create security gaps

Direct user grants solve one basic problem for small teams. They tell a database or server who can log in at the start. They also make it easy to see which accounts exist on a single host. Still, this native setup leaves a huge gap during daily work.

First, direct grants cause permission sprawl across your systems. When an engineer needs to fix a bug, an admin grants them write rights. After the fix is done, nobody removes that extra permission. Months later, that engineer still has full write rights to live data.

Role-Based Access Control (RBAC) + User Provisioning (SCIM): architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Second, static user grants only check who logs in at the door. They do not inspect what individual queries or commands do in flight. A user with read rights can still run a query that dumps every table. That query pulls emails, phone numbers, card numbers, and national IDs in plain text. A user with write rights can drop a table by mistake without a check.

Moving from static grants to live query and command checks

To reduce account sprawl, teams often group users into roles through an identity provider. Grouping users makes it easier to add or remove people in one place. Yet roles still share the same core limit as direct user grants. Once a session starts, the database trusts every command from that account.

Real security requires control over the actions inside the session, not just the login. Teams need a way to require peer approval before a risky command runs. They also need data masking that rewrites matched fields like card numbers in results. By checking each action in flight, teams stop bad queries before they cause harm.

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

What is the difference between user based and role based access?

User based models attach permissions straight to single user accounts on each system. Role based models group permissions into job roles and assign users to those roles.

When does direct user permission management fail?

It fails when a team grows past a few people and a few databases. Admins lose track of manual grants, and old accounts stay active with high rights.

Can database user grants hide sensitive columns in query results?

Standard user grants usually block or allow an entire table or column. Dynamic data masking is needed to rewrite emails or card numbers inside query results.

Save the open-source gateway.

hoop is MIT-licensed infrastructure for controlling how AI agents reach production data. Star hoophq/hoop so you can inspect it, deploy it, or share it when your team starts governing agent access.