Bug 1793951

Summary: [RFE] Display request UUID on audits page
Product: Red Hat Satellite Reporter: Marek Hulan <mhulan>
Component: Audit LogAssignee: Marek Hulan <mhulan>
Status: CLOSED ERRATA QA Contact: Roman Plevka <rplevka>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 6.4CC: egolov, ehelms, inecas, kgaikwad, mmccune, rplevka
Target Milestone: 6.8.0Keywords: FutureFeature, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: foreman-2.0.0, hammer-cli-foreman-2.1.2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-27 13:00:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Marek Hulan 2020-01-22 10:52:49 UTC
We store the value for a long time but never displayed it in UI. We can add it in audit detail and filter audit records based on it. That allows to find all audits for a given HTTP request.

Comment 1 Marek Hulan 2020-01-22 10:52:54 UTC
Created from redmine issue https://projects.theforeman.org/issues/25762

Comment 2 Marek Hulan 2020-01-22 10:52:57 UTC
Upstream bug assigned to mhulan

Comment 4 Marek Hulan 2020-01-22 11:21:37 UTC
Test steps:

1) create some audits first
2) go to Monitor -> Audits page
3) click on some audit to unfold it's details, see the request UUID that is clickable
4) click on it to filter all Audits for a given request

Comment 5 Bryan Kearney 2020-01-23 11:01:52 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 6 Roman Plevka 2020-06-15 13:26:59 UTC
Hello,
The current implementation lacks integration with hammer.

```
# hammer audit info --id 58 --fields ALL
Id:              58
At:              2020/06/15 12:06:20
IP:              
User:            admin
Action:          sync
Audit type:      Katello::Repository
Audit record:    Red Hat Enterprise Linux 7 Server Kickstart x86_64 7.8
Audited changes:

```

Is there a chance to fit this in as a part of this RFE?

Comment 15 Roman Plevka 2020-07-16 08:29:43 UTC
VERIFIED
on sat6.8.0-9.0

the request uuid is now display in the hammer audit info output

```
# hammer audit info --id 60
Id:              60
At:              2020/07/16 08:14:14
IP:              127.0.0.1
User:            foreman_api_admin
Action:          create
Audit type:      Host::Base
Audit record:    [redacted]
Request UUID:    2b71738e-34c0-4dda-9c4e-bdab9d024323
Audited changes: 
 1) Attribute: name
    Value:     [redacted]

# hammer audit list --search="request_uuid=2b71738e-34c0-4dda-9c4e-bdab9d024323"
---|---------------------|-----------|-------------------|--------|--------------|----------------------------------
ID | AT                  | IP        | USER              | ACTION | AUDIT TYPE   | AUDIT RECORD                     
---|---------------------|-----------|-------------------|--------|--------------|----------------------------------
62 | 2020/07/16 08:14:14 | 127.0.0.1 | foreman_api_admin | update | Host::Base   |                                  
61 | 2020/07/16 08:14:14 | 127.0.0.1 | foreman_api_admin | update | Nic::Managed | [redacted]
60 | 2020/07/16 08:14:14 | 127.0.0.1 | foreman_api_admin | create | Host::Base   | [redacted]
59 | 2020/07/16 08:14:14 | 127.0.0.1 | foreman_api_admin | create | Nic::Managed | [redacted]
---|---------------------|-----------|-------------------|--------|--------------|----------------------------------


```

Comment 18 errata-xmlrpc 2020-10-27 13:00:04 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