Web应用程序审计

发布于 2024-08-27 18:28:55 字数 146 浏览 7 评论 0原文

当应用程序作为系统帐户连接到数据库时,如何审核 Web 应用程序(特别是数据库更改)?

我想使用一个简单的数据库触发器写入审计表,但我不确定如何添加已登录的用户而不是实际正在执行工作的帐户。

我读过一些关于身份流的文章,但我并不完全理解这个概念。

How can I audit a web application specifically database changes, when the application is connecting to the database as a system account?

I would like to use a simple database trigger to write to an audit table but I am unsure of how I would be able to add the user that is logged on instead of the account that is actually doing the work.

I have read a few articles on identity flow but I do not fully understand the concept.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

残花月 2024-09-03 18:28:55

如果您使用的是 MSSQL 2008,则应该查看 CDC(更改数据捕获):

http://www.simple-talk.com/sql/learn-sql-server/introduction-to-change -data-capture-%28cdc%29-in-sql-server-2008/

正如 exeshu 提到的,tiggers/CDC 不会审核您的网络应用程序用户是谁,除非您的所有表上都有一些审核列(createdBy、lastModifiedBy 等 - 在每次插入/更新时填充),所以也许可以研究类似的东西。

If you're on MSSQL 2008, you should look into CDC (Change Data Capture):

http://www.simple-talk.com/sql/learn-sql-server/introduction-to-change-data-capture-%28cdc%29-in-sql-server-2008/

As exeshu mentions, tiggers/CDC won't audit who your web-app user was unless you have some audit columns on all your tables (createdBy, lastModifiedBy etc - populated on every insert/update), so maybe look into something like that.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文