How to Integrate Appsmith and Azure Postgres Safely

Published
Length
3 min read

Luis Felipe Dias

All posts

Teams pair appsmith and azure postgres to build internal web apps over cloud data. The app server sends SQL queries to the cloud database and shows the results. This setup lets support and ops staff view records and run updates through forms. Without strict rules, a single shared login can expose every table to every user. How login and data flow between appsmith and azure postgres Appsmith runs as a backend server that holds your database login details. When a user opens a page, the server

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.

Teams pair appsmith and azure postgres to build internal web apps over cloud data. The app server sends SQL queries to the cloud database and shows the results.

This setup lets support and ops staff view records and run updates through forms. Without strict rules, a single shared login can expose every table to every user.

How login and data flow between appsmith and azure postgres

Appsmith runs as a backend server that holds your database login details. When a user opens a page, the server logs in to Azure Postgres.

The server sends the SQL query over an encrypted link and reads the reply. Your browser only sees the final data that the page widgets need.

Database admins control what that login can do by setting up Postgres roles. You can set up group roles to manage permissions when you have many users.

Individual database accounts then join the group role to get the right table access. For read-only tools, you grant the SELECT right on the needed tables or views.

Postgres also lets you grant SELECT on specific columns of a table or view. This helps when a support tool needs user emails but not card numbers.

Keep in mind that the SELECT right also allows the COPY TO command. You should also check what the special PUBLIC role can do in your database.

By default, PUBLIC gets the right to log in and make temp tables. It also gets the right to run functions and procedures unless the owner revokes it.

In Postgres 15 and newer, regular users cannot make objects in the public schema. Older or upgraded databases still need an admin to revoke that create right from PUBLIC.

Common risks with shared database logins and broad access

Many teams use one master database account for all their internal apps. If one developer builds a bad query, it can drop tables or leak data.

Azure RBAC + End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Shared accounts also ruin your audit logs inside the cloud database. Every query in the log shows the exact same app user name.

When someone changes a row or pulls phone numbers, you do not know who. You cannot tell which person clicked the button or ran the query.

To reduce risk, create separate database roles for each app you run. Give read-only dashboards a role that only has SELECT rights on safe columns.

Give write tools a role that can only update the specific tables they need. Revoke default rights from PUBLIC so new roles start with zero extra access.

Lock down the network path between the app server and the database as well. Do not open your database port to the whole public internet.

Put the app server inside a private network or allow only its IP address. Require TLS encryption on every link so network traffic stays safe in transit.

Auditing queries and protecting sensitive fields in internal tools

Scoping database roles is a good start, but static passwords still carry risk. Someone with app editor rights can often write any SQL query they want.

If the data source has access to sensitive columns, an editor can query them. A simple mistake in a query can expose national IDs or card numbers.

Masking rules help by rewriting matched fields like emails or phone numbers in results. Teams also need clear logs that tie each query back to a real person.

Tracking who ran each query makes security reviews fast and accurate. Good controls let builders move fast while keeping production data safe.

Check every Postgres query on the wire

Database roles and network rules decide who can open a session. They do not read what each SQL statement does after login. With hoop.dev, you run an open-source proxy, a sidecar for your Postgres. It runs beside your database and reads the Postgres wire protocol. Your apps and agents keep their login details and change only the host and port in the connection string their tool uses.

Before a query runs, hoop.dev guardrails check the statement by its effect, table, or pattern. They refuse bad deletes or drops with a real Postgres error. On the way back, hoop.dev data masking rewrites sensitive values in returned rows based on your rules. Every query and verdict goes to the audit trail. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and generates evidence for HIPAA, GDPR, and PCI DSS. See the code on GitHub.

Frequently asked questions

How do I make an Azure Postgres login read-only for an app?

Create a dedicated role and grant it SELECT on only the needed tables. You can also grant SELECT on specific columns and revoke default rights from PUBLIC.

Why do shared data source logins hurt database audit logs?

The app server sends every query using the same static database user account. The database log records that single account instead of the human who clicked the button.

Should I expose my database to the public internet for cloud apps?

No, you should keep the database on a private network whenever you can. If you use public networks, restrict access to fixed outbound IPs and enforce TLS.

The query runs. The emails stay hidden.