how are you guys handling database access for analytics/debugging agents?

Reddit r/AI_Agents News

Summary

作者分享为生产环境中执行分析和调试任务的 AI 代理设计数据库访问控制的经验:为每次查询签发可过期的单次权限,并在使用时重新校验,同时指出设计中仍存在的缺口,最后向社区征求其他方案。

Earlier this year I worked on access control for agents that query production data, mostly analytics and debugging agents. The issue I kept running into is that you can't really give these agents a normal role. An analytics agent writes a different query for every question someone asks, and a debugging agent just goes wherever the problem is. So you end up giving it more access than it needs, or it can't do its job. What I ended up doing was giving each request its own permission instead. It only covers that one query, someone or some policy has to approve it, and it expires. If the agent runs the same query again it reuses it, but anything new needs a new approval. One thing I didn't think through enough at first was checking again when the permission is used, not just when it was approved. If the agent's role or environment changed in between, the old approval shouldn't still work. I was documenting it recently and found some gaps in my own design too. For example the agent's "purpose" text was part of how a query gets identified, so if it rewords the purpose it has to get approved all over again. I put it up as an engineering record with what I considered and the gaps I found, I'll drop the link in the comments. How are you handling this? scoped roles per agent, read replicas, a human approving stuff?
Original Article

Similar Articles

How are you securing your AI infrastructure?

Reddit r/AI_Agents

探讨随着 AI agents 开始访问内部系统并自主执行操作,传统围绕'人使用单一应用'构建的安全边界失效的问题,并讨论应在 agent 层、网关层还是系统层实施策略控制,以及被拦截时如何保留 agent 运行上下文以便审计。

We gave an AI agent a readonly Postgres login. It wasn’t as readonly as we thought

Reddit r/AI_Agents

作者分享了为 AI agent 提供只读 Postgres 账号后发现其权限并不真正只读的经历(通过角色继承等机制可获得写权限),并开源了一个名为 agent-db-scan 的工具,用于审计给定 Postgres 连接串的有效权限、继承角色、可写表、RLS 及敏感列访问等。