audit

Disable DELETE on table in PostgreSQL?

て烟熏妆下的殇ゞ 提交于 2019-11-30 06:22:23
For a security sensitive design, I'd like to disable DELETEs on certain tables. The DELETE should merely set a deleted flag on a row (which would be then visible on a view, which would be used by the application layer). As I understand a rule would generate additional queries - so a rule could not suppress the original query. As illustration a toy example with a trigger (not yet tested): -- data in this table should be 'undeletable' CREATE table article ( id serial, content text not null, deleted boolean default false ) -- some view that would only show articles, that are NOT deleted ... --

Implementing Audit Trail for Objects in C#?

点点圈 提交于 2019-11-30 05:34:32
I'm looking for ideas on how to implement audit trails for my objects in C#, for the current project,basically I need to: 1.Store the old values and new values of a given object. 2.Record creation of new objects. 3.Deletion of old object. Is there any generic way of doing this,like using C# Generics,so that I don't have to write code for events of the base object like on creation,on deletion etc.(ORM objects).The thing is that if there was a way to inject audit trail if one is using a .Anybody have any experiences or any methods they follow.Any way to do this in a Aspect-oriented (AOP) mannner

Audit Logging Strategies

≡放荡痞女 提交于 2019-11-30 02:27:35
I am trying to decide on the best method for audit logging within my application. The main reason for the log is reporting the sequence of events (changes). I have a hierarchy of Objects, I need to create reports when something changes on any part of that hierarchy, at a latter date. I think that I have three options: Have a log for each table and therefore matching the hierarchy of objects then creating a view for the report. Flatten the hierarchy and de-normalise the table, making reporting easier - simple select statement. Have one log table and have a record for each change making

Is this the best approach to creating an audit trail?

别等时光非礼了梦想. 提交于 2019-11-29 16:11:09
问题 I'm trying to create some functionality that keeps an audit trail of how data in a given user form has been changed over time, with a dated audit at the foot of that page. For example: 02/04/09 21:49 Name changed from "Tom" to "Chris". I'm doing this by storing the data in it's present format in the session and then on save checking whether there are any differences in the data being stored. If there are, I'm storing the data how it was before the latest edit in a table called history, and

What's the PostgreSQL equivalent of MSSQL's CONTEXT_INFO?

為{幸葍}努か 提交于 2019-11-29 15:44:53
In relation to my other question "What’s the best way to audit log DELETEs?" . What's the PostgreSQL equivalent of CONTEXT_INFO? [EDIT] I want to log deletes using trigger, but since i'm not using the database user as my app's logical user, I cannot log the CURRENT_USER from the trigger code as the user who deleted the record. But for INSERT and UPDATE it is possible to log the record changes from trigger since you can just add a user field in the record, say inserted_by and last_updated_by, and use these fields to log to audit table. Milen A. Radev http://www.postgres.cz/index.php/PostgreSQL

Auditing in Oracle

感情迁移 提交于 2019-11-29 15:10:45
I need some help in auditing in Oracle. We have a database with many tables and we want to be able to audit every change made to any table in any field. So the things we want to have in this audit are: user who modified time of change occurred old value and new value so we started creating the trigger which was supposed to perform the audit for any table but then had issues... As I mentioned before we have so many tables and we cannot go creating a trigger per each table. So the idea is creating a master trigger that can behaves dynamically for any table that fires the trigger. I was trying to

NHibernate Interceptor Auditing Inserted Object Id

守給你的承諾、 提交于 2019-11-29 15:00:54
问题 I am using NHibernate interceptors to log information about Updates/Inserts/Deletes to my various entities. Included in the information logged is the Entity Type and the Unique Id of the entity modified. The unique Id is marked as a <generator class="identity"> in the NHibernate mapping file. The obvious problem is when logging an Insert operation using IInterceptor.OnSave() the Id of the entity has not yet been assigned. How can I obtain the Id of the inserted entity before logging the audit

Google Audit Question

随声附和 提交于 2019-11-29 13:48:46
The following external CSS files were included after an external JavaScript file in the document head. To ensure CSS files are downloaded in parallel, always include external CSS before external JavaScript. 1 inline script block was found in the head between an external CSS file and another resource. To allow parallel downloading, move the inline script before the external CSS file, or after the next resource. My HTML is: <head> <link rel="Stylesheet" href="gStyle.css" /> <script type="text/javascript" src="gMain.js"></script> <script type="text/javascript" language="javascript"> // Your chart

How to log application auditing to separate file on Wildfly 8

可紊 提交于 2019-11-29 06:57:32
I have a Java EE application running on Wildfly 8 in which I want to enable audit logging. Using an InterceptorBinding and Interceptor I am able to catch all relevant API calls. What I want to do is to write these audit calls to a separate audit log file. I tried implementing this using logback, and with the help of the second answer in this stackoverflow question I finally managed to do this. The first reply, i.e. disabling the system logging, did not work. However, while this solution successfully writes my audit trace to a separate file, all other logging stopped being written to their

Can I use Spring Data JPA Auditing without the orm.xml file (using JavaConfig instead)?

北城余情 提交于 2019-11-29 05:51:10
I'm trying to get Spring Data Auditing to work in my Spring 3.2.8 / Spring Data 1.5 / Hibernate 4 project. As per the Spring Data Auditing docs , I've added the @CreatedBy , etc annotations to my entities, created by AuditorAware implementation, and instantiated it from within my JavaConfig. However, it never seems to fire. I find the docs a little confusing. It appears that the JavaConfig entry replaces the xml entry, but I am not sure. I don't currently have any orm.xml file in my application. To be entirely honest, I'm not even sure where/how to configure it, or why I need it. All my