Web应用程序审计
当应用程序作为系统帐户连接到数据库时,如何审核 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您使用的是 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.