Bug 1647364

Summary: [RFE] Extend the audits by the http request id
Product: Red Hat Satellite Reporter: Roman Plevka <rplevka>
Component: Audit LogAssignee: Marek Hulan <mhulan>
Status: CLOSED ERRATA QA Contact: Roman Plevka <rplevka>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.5.0CC: egolov, inecas, mhulan, rplevka
Target Milestone: 6.8.0Keywords: FutureFeature, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: foreman-2.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-27 12:58:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
screenshot of the uadit page none

Description Roman Plevka 2018-11-07 10:57:49 UTC
Description of problem:
whenever a user tries to clone an existing role with many filters, many audit records are created.
- a single record for Role create
- and a record for Role update for each filter in the original role

Version-Release number of selected component (if applicable):
6.5.0-2

Steps to Reproduce:
1. take e.g. a viewer role
2. clone it
3. see audit logs

Actual results:
many audit logs for a simple action

Expected results:
perhaps recognizing the "clone" action would be nice, or aggregating the individual updates into a single one.

Comment 2 Brad Buckingham 2018-11-09 16:29:23 UTC
Roman, 

Can you paste the output?  It'll help w/ triaging.

Comment 3 Roman Plevka 2018-11-23 14:55:25 UTC
Created attachment 1508291 [details]
screenshot of the uadit page

this screenshot shows the audit page after cloning a manager role (the audit record at the bottom). since the original role had many filters attached to it, these have been added one by one to the newly created clone as well and each operation generated a standalone audit record.
there are actually 2 full pages of such records.

- could they be aggregated into a single record?

Comment 4 Roman Plevka 2018-11-27 09:30:14 UTC
After the discussion with mhulan and kavita we came to conclusion that the solution would be to incorporate the corresponding htt prequest in the audit and make the audits searchable by it, so user can filter/filter out the audits belonging to the same user action.
- changing the title and also the target milestone to sat6.6.0

Comment 5 Bryan Kearney 2019-01-28 13:07:23 UTC
Upstream bug assigned to mhulan

Comment 6 Bryan Kearney 2019-01-28 13:07:25 UTC
Upstream bug assigned to mhulan

Comment 7 Bryan Kearney 2020-01-23 11:06:05 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25762 has been resolved.

Comment 8 Roman Plevka 2020-06-24 10:43:44 UTC
I'm closing this in favor of:
https://bugzilla.redhat.com/show_bug.cgi?id=1793951

Comment 11 errata-xmlrpc 2020-10-27 12:58:03 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: Satellite 6.8 release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:4366