- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我已经安装了 audit-logging
插件到我的应用程序。 grails 版本是 2.1.1
插件版本是1.0.1
.
在我的 Config.groovy
类,我添加了这个
auditLog {
verbose = true // verbosely log all changed values to db
logIds = true // log db-ids of associated objects.
// Note: if you change next 2 properties, you must update your database schema!
tablename = 'audit_logs' // table name for audit logs.
transactional = false
actorClosure = { request, session ->
org.apache.shiro.SecurityUtils.getSubject()?.getPrincipal()
}
class Survey {
static auditable = true
static final int NO_RUNNING_SURVERY = 0
static final int RUNNING_SURVERY = 1
static final int CALL_NO_Record_SURVEY = 0
static final int CALL_Record_SURVEY = 1
static final int REALTIME_SURVEY = 0
static final int HISTORICAL_SURVEY = 1
static final int STANDARD_SURVERY = 2
String name
String description
int status
}
audit_logs
表,针对一项操作插入双记录,例如
def stopSurvey(Long id) {
def survey = Survey.findById(params['stop'])
survey.status = Survey.NO_RUNNING_SURVERY
redirect(action: "list")
}
最佳答案
@Bertl
我找到了问题,我想,问题出在插件上。我的应用程序使用三个数据库,一个是主数据库,另外两个用于其他目的。我的数据源如下。
dataSource.driverClassName = net.sourceforge.jtds.jdbcx.JtdsDataSource
dataSource.dbCreate = update
dataSource.url = jdbc:jtds:sqlserver://localhost:1433/test
dataSource.username = test
dataSource.password = 123
#TEST1
dataSource_TEST1.driverClassName = net.sourceforge.jtds.jdbcx.JtdsDataSource
dataSource_TEST1.readOnly = true
dataSource_TEST1.url = jdbc:jtds:sqlserver://xxx.xxx.xxx.xxx:1433/test1
dataSource_TEST1.username = test1
dataSource_TEST1.password = 123
# TEST2
dataSource_TEST2.driverClassName = net.sourceforge.jtds.jdbcx.JtdsDataSource
dataSource_TEST2.readOnly = true
dataSource_TEST2.url = jdbc:jtds:sqlserver://xxx.xxx.xxxx.xxx:1433/test2
dataSource_TEST2.username = test2
dataSource_TEST2.password = 123
test
数据源并删除其他
dataSources
,它插入一条记录。当我使用两个数据源时,它会在
audit logging
中插入两个记录 table 。
关于grails - 使用审计日志插件在 grails 中插入双记录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24241355/
在我正在开发的应用程序中,我使用 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。 像上面的例子一样,我在两个表中都有几列。 现在我想审核表格。所以我
我是一名优秀的程序员,十分优秀!