Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0040886Openbravo ERPA. Platformpublic2019-05-16 11:272019-05-21 15:17
alostale 
alostale 
immediatemajorhave not tried
closedfixed 
5
 
3.0PR19Q3 
caristu
Core
Production - Confirmed Stable
2017-01-30
3.0PR17Q2
https://code.openbravo.com/erp/devel/pi/rev/15f5de36349f [^]
No
0040886: incorrect audit trail for DAL WebServices
Data changes performed by DAL WebServices are incorrectly audited.

User and process is set randomly. As these requests are not updating ad_context_info table, in case it was previously set within the same database connection that has now been retrieved from the connection pool, it will be reused.
1. Log in as System Administrator
2. Open Tables and Columns window
3. Select C_City table and set it to fully audited
4. Rebuild and restart Tomcat
5. Execute WSUpdateTest (which creates entries in C_City)
6. Query ad_audit_trail
   -> Check that entries for c_city have random user + process

No tags attached.
depends on backport 00408873.0PR19Q2.1 closed alostale incorrect audit trail for DAL WebServices 
depends on backport 00408883.0PR19Q1.2 closed alostale incorrect audit trail for DAL WebServices 
caused by design defect 0035007 closed alostale audit trail causes excessive overhead 
Issue History
2019-05-16 11:27alostaleNew Issue
2019-05-16 11:27alostaleAssigned To => platform
2019-05-16 11:27alostaleModules => Core
2019-05-16 11:27alostaleTriggers an Emergency Pack => No
2019-05-16 11:29alostaleReview Assigned To => caristu
2019-05-16 11:29alostaleRegression level => Production - Confirmed Stable
2019-05-16 11:29alostaleRegression date => 2017-01-30
2019-05-16 11:29alostaleRegression introduced in release => 3.0PR17Q2
2019-05-16 11:29alostaleRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/15f5de36349f [^]
2019-05-16 11:29alostaleAssigned Toplatform => alostale
2019-05-16 11:29alostalePrioritynormal => immediate
2019-05-16 11:30alostaleStatusnew => scheduled
2019-05-16 12:04alostaleRelationship addedcaused by 0035007
2019-05-16 12:12hgbotCheckin
2019-05-16 12:12hgbotNote Added: 0111714
2019-05-16 12:12hgbotStatusscheduled => resolved
2019-05-16 12:12hgbotResolutionopen => fixed
2019-05-16 12:12hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/2e0c74eeeea1093196680dbdaf8d676cce60bda3 [^]
2019-05-17 09:53caristuNote Added: 0111765
2019-05-17 09:53caristuStatusresolved => closed
2019-05-17 09:53caristuFixed in Version => 3.0PR19Q3
2019-05-21 15:17hudsonbotCheckin
2019-05-21 15:17hudsonbotNote Added: 0112032

Notes
(0111714)
hgbot   
2019-05-16 12:12   
Repository: erp/devel/pi
Changeset: 2e0c74eeeea1093196680dbdaf8d676cce60bda3
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu May 16 12:11:51 2019 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/2e0c74eeeea1093196680dbdaf8d676cce60bda3 [^]

fixed bug 40886: incorrect audit trail for DAL WebServices

  DAL WebServices were incorrectly audited because ad_context_info was not set as
  it was disabled for the thread during login and they are executed in the same
  thread.

  This fix consists in:
    1. Now after login completion, thread is reset to allow auditing of actions
       occurred afterward.
    2. Correct user id and new WebService process type is set to be audited. Note
       this didn't occur even before the regression was introduced, reulting in
       records in ad_audit_trail without user or process information.

---
M src-db/database/sourcedata/AD_REF_LIST.xml
M src/org/openbravo/erpCommon/security/SessionLogin.java
M src/org/openbravo/service/web/BaseWebServiceServlet.java
---
(0111765)
caristu   
2019-05-17 09:53   
Reviewed + tested
(0112032)
hudsonbot   
2019-05-21 15:17   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/9b8f37d9d85e [^]
Maturity status: Test