fault/fm-mgr
Joao Victor Portal 7fd26e0d15 Fault Management API request audit logging
Here is added a hook to the WSGI compliant Pecan server that receives
the Fault Management API requests. This hook logs the needed request
data to "/var/log/fm-api.log". All requests are logged except the
ones of "GET" type.

The code is a port from the same hook that exists in
"starlingx/config" repository, also called "AuditLogging".

Note: there are no "POST" or "PUT" requests available in Fault
Management API v1.

Test Plan:

PASS: Successfully deploy an AIO-SX and verify that the logs of
"fm-api" service are present in file "/var/log/fm-api.log".
PASS: In the deployed AIO-SX, execute command "fm alarm-list" and
check that no GET requests was logged in "fm-api.log".
PASS: In the deployed AIO-SX, execute command "fm alarm-delete 1111"
and check that a "DELETE /v1/alarms/1111" request was logged in
"fm-api.log" with status "404".
PASS: In the deployed AIO-SX, execute command
"fm event-suppress --alarm_id <alarm_id>" and check that a
"PATCH /v1/event_suppression/<uuid>" request was logged in
"fm-api.log" with status "200".
PASS: Successfully build all packages of this repository as Debian
packages: fm-api, fm-common, fm-doc, fm-mgr, fm-rest-api and
python-fmclient.

Story: 2009824
Task: 44468

Depends-On: https://review.opendev.org/c/starlingx/config-files/+/828200
Signed-off-by: Joao Victor Portal <Joao.VictorPortal@windriver.com>
Change-Id: I25bf662ed9e792b30ae1f90329bd35b918f0a5f7
2022-02-18 00:39:43 -03:00
..
centos Add auto-versioning to starlingx/fault packages 2020-05-27 15:19:34 -04:00
debian Add Debian packaging for fm-mgr and fm-rest-api 2021-10-20 06:22:36 -05:00
opensuse Add missing Requires to fault components for opensuse 2019-10-08 18:24:30 -05:00
sources Fault Management API request audit logging 2022-02-18 00:39:43 -03:00
PKG-INFO StarlingX open source release updates 2018-05-31 07:36:00 -07:00