Bug 2024576 - Extra audit record created on Organization create action
Summary: Extra audit record created on Organization create action
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Audit Log
Version: 6.10.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: 6.12.0
Assignee: Ondřej Ezr
QA Contact: Sam Bible
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-11-18 11:40 UTC by Roman Plevka
Modified: 2022-11-16 13:33 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-16 13:32:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 33952 0 Normal New Creating Organization produces two Audit logs 2021-11-18 16:25:37 UTC
Red Hat Issue Tracker SAT-12531 0 None None None 2022-08-26 19:33:22 UTC
Red Hat Product Errata RHSA-2022:8506 0 None None None 2022-11-16 13:33:13 UTC

Description Roman Plevka 2021-11-18 11:40:15 UTC
Description of problem:
introduced in 6.10

When a new Organization is created, there is an extra "update" audit record generated:


```
[
  {
    "user_id": 4,
    "user_type": null,
    "user_name": "admin",
    "version": 2,
    "comment": null,
    "associated_id": null,
    "associated_type": null,
    "remote_address": "10.0.115.152",
    "associated_name": null,
    "created_at": "2021-11-10 18:09:34 UTC",
    "request_uuid": "4bd95f8f-a8b7-4fcc-a2be-888348cffce5",
    "id": 82,
    "auditable_id": 4,
    "auditable_name": "ABDkuTvlqzZ",
    "auditable_type": "Organization",
    "action": "update",
    "audited_changes": {
      "created_in_katello": [
        false,
        true
      ]
    },
    "locations": [],
    "organizations": [
      {
        "id": 4,
        "name": "ABDkuTvlqzZ",
        "title": "ABDkuTvlqzZ",
        "description": null
      }
    ]
  },
  {
    "user_id": 4,
    "user_type": null,
    "user_name": "admin",
    "version": 1,
    "comment": null,
    "associated_id": null,
    "associated_type": null,
    "remote_address": "10.0.115.152",
    "associated_name": null,
    "created_at": "2021-11-10 18:09:32 UTC",
    "request_uuid": "4bd95f8f-a8b7-4fcc-a2be-888348cffce5",
    "id": 76,
    "auditable_id": 4,
    "auditable_name": "ABDkuTvlqzZ",
    "auditable_type": "Organization",
    "action": "create",
    "audited_changes": {
      "name": "ABDkuTvlqzZ",
      "ignore_types": [],
      "description": null,
      "label": "ABDkuTvlqzZ",
      "ancestry": null,
      "manifest_refreshed_at": null,
      "created_in_katello": false
    },
    "locations": [],
    "organizations": [
      {
        "id": 4,
        "name": "ABDkuTvlqzZ",
        "title": "ABDkuTvlqzZ",
        "description": null
      }
    ]
  },
]
```

prior 6.10.0, the update-action record was not generated




Version-Release number of selected component (if applicable):
sat6.10.0

How reproducible:
always

Steps to Reproduce:
1. create a new organization
2. observer, there is an "update" audit record generated besides the "Create" one


Expected results:
only 1 record of type: create is expected to be generated

Additional info:

Comment 2 Bryan Kearney 2021-11-18 20:05:38 UTC
Upstream bug assigned to oezr

Comment 3 Bryan Kearney 2021-11-18 20:05:40 UTC
Upstream bug assigned to oezr

Comment 4 Bryan Kearney 2022-01-11 16:04:55 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/33952 has been resolved.

Comment 6 Sam Bible 2022-09-12 15:56:41 UTC
Version: Sat 6.12.0 - 10

Steps to Reproduce:
1) Create a new Organization
2) Check the audit logs

Expected Results: only 1 record of type: create is generated.

Actual Results: only 1 record of type: create is generated.

Comment 10 errata-xmlrpc 2022-11-16 13:32:59 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.12 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-2022:8506


Note You need to log in before you can comment on or make changes to this bug.