How to Configure Azure Postgres Create User
You run the azure postgres create user flow by making a login role first. Then you grant exact database and table rights to that new role. Most teams start by sharing one admin account across several apps and engineers. Shared accounts make it hard to track who ran a bad query. Broad rights also let one mistake drop tables or expose private rows. How the azure postgres create user workflow works In PostgreSQL, users and groups are both roles. A user is just a role with the right to log in. Wh
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 run the azure postgres create user flow by making a login role first. Then you grant exact database and table rights to that new role. Most teams start by sharing one admin account across several apps and engineers. Shared accounts make it hard to track who ran a bad query. Broad rights also let one mistake drop tables or expose private rows.
How the azure postgres create user workflow works
In PostgreSQL, users and groups are both roles. A user is just a role with the right to log in. When you set up an account on your cloud database, use an admin role. You make the new login role and set a strong secret for it. A fresh role cannot read your business tables right away. Yet the system has a special group called PUBLIC that holds every role. By default, PUBLIC gives every new user the right to connect to databases. It also lets them make temp tables and run functions. If you want a locked down setup, the owner can revoke these default rights.
In version 15 and newer, regular users cannot make objects in the public schema. Older instances or upgraded databases might still allow this action. On those older setups, admins must revoke schema creation rights from the PUBLIC role. After you lock down defaults, you grant exact rights to your new user. Managing grants for dozens of people one by one takes too much time. Instead, you should make group roles for each team or app function. You grant table rights to the group role once. Then you add each person or app user into that group role.
For read access, you grant the SELECT right on tables or views. You can even grant SELECT on specific columns of a table. Note that SELECT also lets the user export data out of the table. You must also check how future tables get their rights. Default privileges only apply to objects made by the specific role you name. If another admin makes a table later, your group role might miss out.
Why native roles leave a gap in daily operations
Native database roles do a great job of controlling who can log in. They also set clear boundaries on which tables a role can read or change. Still, static grants only check rights at the table or column level. They do not inspect what individual queries do during a live session.
Azure RBAC + User Provisioning (SCIM): architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
A user with read rights on a customer table can pull every row at once by default. If a column holds emails, phone numbers, card numbers, or national IDs, SELECT returns them. You have to maintain complex column grants to hide those fields from analysts. Even then, app support engineers often need access to the full table to fix bugs. When you grant a role for a quick fix, that grant often stays forever. Native roles lack built-in timers to remove access after an hour. They also cannot pause a risky update to ask a manager for approval first.
Run guardrails and masking on the Postgres connection
Role grants and firewall rules are needed setup. Setup alone cannot check single SQL statements or mask sensitive rows in a response. By design, hoop.dev sits inline in the Postgres protocol beside Postgres, RDS, or Aurora as a sidecar for your Postgres. On every production query from an engineer or AI agent, hoop.dev decides whether to pass, mask, block, or hold it for approval.
First, hoop.dev guardrails refuse disallowed drops or deletes before they run, and risky statements can pause for human review. Next, hoop.dev data masking rewrites sensitive fields in returned rows in memory. Furthermore, hoop.dev holds SOC 2 Type II and logs every statement and verdict per resource. Check out the project on GitHub.
Frequently asked questions
Why can a new user still connect to my database without explicit grants?
Every new role gets default rights from the built-in PUBLIC group. By default, PUBLIC lets all roles connect to the database and make temp tables. You must revoke those rights from PUBLIC if you want to block connections.
How do I stop users from making tables in the public schema?
PostgreSQL 15 and later block this action in the default setup. For older versions or upgraded databases, you must revoke the create right on the public schema from PUBLIC.
Should I grant table rights to each user or to a group role?
You should make a group role and grant table rights to that group. Then you grant membership in the group role to each individual user. This keeps your permission setup clean as your team grows.
Related guides
In this post