- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试确定是否有办法删除 ASP.NET 样板代码中默认提供的审核日志记录。
查看文档,似乎使用以下应该 从审核配置中删除选择器,但事实并非如此。
Configuration.Auditing.Selectors.Clear()
原因是,比如说,如果我想启用审计,但只想审计某些服务而不是 IApplicationService
类型的所有服务。
我曾尝试将上述行放入各种模块中,但都没有成功。所有服务调用都记录在 AbpAuditLogs
表中。
最佳答案
ASP.NET Boilerplate provides the infrastructure to create application services.
The CreateControllersForAppServices method gets an assembly and converts all the application services to MVC controllers in that assembly.
ABP defines some pre-built filters for ASP.NET Core. All of them are added to all actions of all controllers by default.
— https://aspnetboilerplate.com/Pages/Documents/AspNet-Core
Configuration.Auditing.Selectors.Clear()
为 AuditingInterceptor
处理它,而不是 Action 过滤器。
AbpAuditActionFilter
将 defaultValue
作为 true
传递给 _auditingHelper.ShouldSaveAudit(...)
。
defaultValue
最终由 AuditingHelper
返回.
我们不能轻易替换AbpAuditActionFilter
,但是我们可以替换AuditingHelper
:
复制 AuditingHelper
并将其重命名为 IgnoreDefaultAuditingHelper
。
修改AuditingHelper.ShouldSaveAudit
的最后一行忽略defaultValue
:
public bool ShouldSaveAudit(MethodInfo methodInfo, bool defaultValue = false)
{
// ...
return false;
// return defaultValue;
}
替换模块的 PreInitialize
方法中的 IAuditingHelper
:
public override void PreInitialize()
{
Configuration.ReplaceService<IAuditingHelper, IgnoreDefaultAuditingHelper>();
}
关于c# - 在 ASP.NET 样板中为应用程序服务配置审计日志记录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52956865/
在我正在开发的应用程序中,我使用 spring、hibernate 和 envers 进行审计。 envers 适用于 hibernateTemplate.insert、hibernateTempla
我可以审核 Oracle 约束违规吗? 我在表中创建了一个约束,我想在某些进程违反此约束时对其进行审核。这可能吗?我该怎么做? 我正在使用 Oracle 11g。 最佳答案 作为选项之一,您可以创建架
我正在使用 IPostUpdateEventListener现在进行更新审计日志的接口(interface),获取旧值和新值,然后将每个更新的字段存储在“审计”表中以及所有这些内容。效果很好,但是我很
我目前正在尝试对公司 Web 应用程序的 UI 进行性能调整。该应用程序只会被员工访问,因此服务器和客户端之间的连接速度将始终比在互联网上快得多。 我一直在使用 Y Slow 等性能审计工具!和谷歌浏
如何获取 MySQL 中特定数据库的审核日志文件。由于数据库位于服务器中,我没有任何管理员权限。但我需要审核日志文件。是否有查询或方法来获取所有审核文件 最佳答案 据我所知,无法通过 sql 检索审核
我正在处理一个非常大的 PHP 代码库(主要是程序代码库),该代码库是在过去 10 年中由我之前的开发人员拼凑而成的,现在我们正承受着沉重的数据库负载。查看一些文件会发现执行了 40 到 60 个以上
我想知道是否有人成功地使用 Hibernate Envers 审核了 native 查询 (SQL)?我知道这可能是错误的,但它会节省我很多重构时间。 干杯 尼克 最佳答案 我只想在这里留下我的想法,
Python 3.8 引入了 PEP 578 -- Python Runtime Audit Hooks它 promise “使 Python 运行时采取的操作对审计工具可见。” 此 pep 提供了一
什么是适合以下的数据库?我对你在非关系领域的经历特别感兴趣 NoSQL系统。 它们对这种用法有好处吗,您使用过并推荐哪种系统,还是应该使用普通的关系数据库 (DB2)? 我需要从一堆来源收集审计跟踪/
据我了解,安全事件日志无法复制到 WAD 诊断存储,并且 SQL Server 审核不适用于 SQL Azure。 您提出了哪些解决方案来审核对 SQL Azure 数据库的访问? 至少应该是登录名、
我们正在使用 kafka 构建异常管理工具。将有源连接器 - 它将从物理文件中提取记录。另一方面,将会有接收器连接(mongodb-sinkconnect),它将从主题中拉取记录并将其推送到 mong
我试图实现一种跟踪数据更改并为我的应用程序创建历史日志的方法。因为我正在使用 EclipseLink,所以应该很容易并且有可能获得像他们这样的更改 write on the EclipseLink F
我有一个对象,在将它发送到 Spring Cloud Stream 之前我试图对其进行审核,当我将对象作为 application/json 发送时出现问题,因此拦截器将对象作为序列化接收字符串。是否
是否有审计工具可以检查 Linux 上打开和关闭哪些端口以及何时打开和关闭?我的目标是运行我的应用程序并检查其端口使用情况。lsof 或 netstat 不适合,因为它们只是告诉我当前打开了哪些端口,
TLDR:是否可以利用npm audit的漏洞检测能力?作为一种 Restful 服务而不是当前的 CLI 实现? npm针对 Node 安全平台 (NSP) 漏洞数据库,针对每个安装请求提供自动漏洞
背景我有一个生产 SQL Server 2005 服务器,4 个不同的应用程序连接到该服务器并进行更改。没有外键,在某些情况下也没有主键。不幸的是,放弃整个事情并从头开始不是一种选择。所以我的解决方案
我有项目要维护,使用 node-sass npm 模块。 从 node 10.x 开始,有一个工具(称为 npm audit)会在我们每次执行 npm install 时运行。这似乎是防止漏洞问题的好
我刚刚为我们的开发团队设置了一个 Phabricator 服务器,我已经很喜欢了!首先,我们仅将其用于代码审查。 UI 在长度上远远优于 GitHub 的评论。 无论如何,因为我想在我们的团队中简化它
作为新 PCI-DSS 服务器部署的一部分,我正在配置一个完全可审计的 NTP 时间更改历史记录。一切都按预期工作,但是我现在看到每一秒都写入与时间更改操作相关的审计日志。经过大量搜索后,我仍然无法理
我有一个带有数据的表格。任何更改或插入,这些数据都应该在两个不同的表中更新,例如一个表中的姓名、薪水和另一个表中的地址、邮件 ID。 像上面的例子一样,我在两个表中都有几列。 现在我想审核表格。所以我
我是一名优秀的程序员,十分优秀!