SQL Server Proxy Settings

Published
Length
3 min read

Luis Felipe Dias

All posts

You use sql server proxy settings to route database traffic through a middle layer. This layer checks who is logging in and filters queries before they run. Teams rely on these rules to stop direct network connections to data stores. Instead of sharing raw database passwords, engineers and AI agents log in through one path. The proxy checks the user, applies security rules, and logs every query. How sql server proxy settings work for teams and AI agents When an engineer or AI agent runs a qu

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 use sql server proxy settings to route database traffic through a middle layer. This layer checks who is logging in and filters queries before they run.

Teams rely on these rules to stop direct network connections to data stores. Instead of sharing raw database passwords, engineers and AI agents log in through one path. The proxy checks the user, applies security rules, and logs every query.

How sql server proxy settings work for teams and AI agents

When an engineer or AI agent runs a query, the request hits the proxy first. The proxy holds the real database keys and opens the backend link. In the database, a database user represents the login identity during the session. Teams often create a user tied to a login in the master database. That setup works well when people need to reach many databases on one server.

For one or a few databases, admins can use a contained database user. This user has a password and does not need a login in master. An admin must turn on contained databases on the server and database first. Microsoft supports 13 types of database users for different login needs.

Once the proxy connects, database roles control what the session can do. Every role, including the public role, has basic permission to connect. Admins add users to fixed roles to grant read or write rights. The permissions inside these fixed database roles cannot be changed by admins.

Security tradeoffs of static roles versus active session controls

Native database roles handle broad table rules well, but they leave gaps during live sessions. For example, members of the fixed reader role can read all user tables and views. If you want to block reads, you can assign the deny reader role. That role stops a user from reading any user tables, views, or metadata.

Write rules work the same way across the database. The fixed writer role lets users add, change, or delete data in all user tables. The deny writer role blocks a user from adding, changing, or deleting any data. At the top level, the owner role can run all maintenance tasks. Members of the owner role can even drop the whole database.

Database Proxy (ProxySQL, PgBouncer) + Kubernetes API Server Access: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

These built-in roles are all-or-nothing across user tables. A reader role gives an engineer or AI agent access to all column by default. If a table holds emails, phone numbers, card numbers, or national IDs, the query returns them. Static passwords also create risk when developers store them on laptops. If a key leaks, anyone with network reach can read or change data.

Good proxy settings fix this by acting on the query stream itself. The proxy links to your team identity provider so engineers do not need passwords. It can pause risky commands and ask a peer for approval in chat. Dynamic data masking can also run in the proxy layer. Masking rewrites matched fields like emails or card numbers in the query results. This lets teams and AI tools query production data safely.

Setting up proxy rules for safe database workflows

To get the best results, combine narrow database roles with proxy controls. Give the proxy service account only the specific database roles it needs. Split read traffic and write traffic into separate proxy profiles. Use the reader role for daily checks and AI agents.

Keep the writer and owner roles locked behind strict approval rules. Require a peer review before anyone runs a write session. Check your proxy logs often to see who ran which query and when. This layered plan keeps your data safe without blocking daily engineering work.

Add runtime guardrails beside SQL Server

Role grants and network rules are needed setup for SQL Server. Still, an allowed user or agent tool can send a bad delete or read raw customer fields over a valid session. In practice, hoop.dev sits inline in the TDS protocol beside the database as a sidecar for your SQL Server. For every query an agent or human runs in production, hoop.dev decides whether to pass, mask, block, or escalate it for review.

With hoop.dev SQL Server controls, rules refuse banned statements before they run, hold risky queries for human review, and mask matched sensitive values in supported result columns in memory. Furthermore, hoop.dev holds SOC 2 Type II and generates evidence for HIPAA, PCI DSS, SOX, and GDPR audits. See the source on GitHub.

Frequently asked questions

What is the difference between a SQL login and a database user?

A login lets you enter the server instance through the master database. A database user is the identity thatlogin uses inside a specific database. Admins can also enable contained users that log right into one database with a password.

Can I change the permissions of fixed database roles in SQL Server?

No, you cannot change the permissions assigned to fixed database roles. For instance, the built-in reader role always allows reading all user tables and views. To limit column exposure, you need custom roles or a proxy that masks results.

How do proxy settings protect sensitive data from AI agents?

A proxy sits between the AI agent and the database to inspect traffic. It uses a read-only role and applies data masking to the return stream. Masking rewrites fields like phone numbers and national IDs in the final results.

The query runs. The emails stay hidden.