Bug 1394593 - "audit log" is logged with "new_value" instead of actual data when new user is created.
Summary: "audit log" is logged with "new_value" instead of actual data when new user ...
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.6.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: GA
: 5.8.0
Assignee: Greg Piatigorski
QA Contact: Aziza Karol
Depends On:
Blocks: 1404427 1404428
TreeView+ depends on / blocked
Reported: 2016-11-14 00:16 UTC by tachoi
Modified: 2019-12-16 07:23 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1404427 1404428 (view as bug list)
Last Closed: 2017-06-12 16:07:20 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:

Attachments (Terms of Use)

Description tachoi 2016-11-14 00:16:44 UTC
Description of problem:
When a new user is created, the name, userid, email and group are NOT logged with correct info.
They are just logged with "new_value" in audit.log which is not meaningful to use.

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

How reproducible:
1. Select Settings -> Configuration
2. Expand the Access Control accordion
3. Select Users
4. Select Configuration -> Add a new user
5. Specify new user values and Add
6. Inspect the CloudForms audit log (/var/www/miq/.vmdb/log/audit.log)

Steps to Reproduce:
1. NA

Actual results:
Not meaningful string "new_value" is specified for each new user attribute in the audit log

[----] I, [2016-11-14T08:04:03.179199 #23887:14b908c]  INFO -- Success: MIQ(OpsRbac.rbac_edit_save_or_add) userid: [admin] - [New Admin] Record added ( name:[] to [new_value],  userid:[] to [new_value],  email:[] to [new_value],  group:[] to [new_value])

Expected results:
Values specified during user creation are shown in the audit log.

Additional info:

Comment 3 Greg Piatigorski 2016-11-18 23:48:43 UTC
Working on it, should have a fix over the weekend. Let me change status to On Dev.

Greg Piatigorski

Comment 4 Greg Piatigorski 2016-11-22 00:49:10 UTC
Code fix applied: https://github.com/ManageIQ/manageiq/pull/12786

Comment 5 CFME Bot 2016-11-22 18:45:56 UTC
New commit detected on ManageIQ/manageiq/master:

commit 2948be72c1460738249b970d245d4e362760fcab
Author:     Greg Piatigorski <gpiatigo>
AuthorDate: Mon Nov 21 16:38:53 2016 -0800
Commit:     Greg Piatigorski <gpiatigo>
CommitDate: Mon Nov 21 16:38:53 2016 -0800

    Fix Audit Log to record settings/values when creating new user

 app/controllers/ops_controller.rb | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comment 8 Aziza Karol 2017-05-02 10:09:10 UTC

audit.log now displays the data:
[----] I, [2017-05-02T06:06:11.638948 #5793:17483fc]  INFO -- Success: MIQ(OpsRbac.rbac_edit_save_or_add) userid: [admin] - [test] Record added ( name:[] to [test],  group:[] to [18],  userid:[] to [test] password:[*] to [*])

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