Bug 1183 - Inconsistent log data for administrative actions || EAL2 ||

Review Request #475 — Created Sept. 23, 2024 and updated

kevin.poh
APV10
rel_apv_10_7
1183
timlai, weikai

Issue :
Behaviour by design is that whenever the WebUI runs a command, it calls the CLI for execution.
Therefore, when verifying with EAL2, the logs show that all commands are being executed through the CLI.
We need a way to distinguish where the command originates.
If the command is initiated by the WebUI, the log should indicate "WebUI", and if it comes from the CLI, it should show "CLI".

Solution :
Find the section of the code responsible for printing logs, and use an if statement to track the command's origin using sess_state.ui_type.

Preparation setting to see the log on the WebUI:
1. Go to Admin Tools -> System Logs (On Log Settings, turn on Logging and set Level to 7:DEBUG)
2. On Admin Tools -> System Logs (Go to "View Log Buffer" - this is where to view the log from the WebUI)

To check the changes for the CLI :
1. Open CLI that linked to the APV
2. Type any command, the simple one would be "show version"
3. Check on the WebUI - View Log Buffer
4. The result should be showing CLI: User "array" executed cmd "show version"

To check the changes for the WebUI:
1. Go to the WebUI that linked to the APV
2. Initiate any command, in this case for easier tracking I used the User Management -> Add new user by using distinguishable name
3. Check the log on the CLI ("show log buff backward") or on the WebUI - View Log Buffer. It works either way.

Loading...