TEST: Difference between revisions
No edit summary |
(#tagtest) |
||
(17 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
= 325145 Device Audit Log Improvements = | |||
== Requirements == | |||
* Send the device audit log through a new web service method, rather than through email. | |||
* Request that the device send through the audit log by making a setting on the server. | |||
* Allow configuration of the audit log: | |||
** Per device and default for the system. | |||
** What is to be audited (types of audit log messages). | |||
** Number of records to store on the audit log. | |||
* Admin screen available to OBSL users only, to configure audit logs and request them to be sent (Devices screen). | |||
== Overview of Solution == | |||
=== Device Audit Log Web Service Method === | |||
The PDA Audit Log screen will be modified to build a message onto the pending queue, containing all the logged data. | |||
A new message request will be created for this (AUDIT_LOG). | |||
Structure to be defined, but it is assumed this will follow the structure of the existing XF_AUDIT device table. | |||
The server PDA web service will be modified to receive this message and save this to a file in a server-side folder. The folder will be defined as a system web configuration parameter. The name to be confirmed, but will likely comprise: | |||
* "AUDIT_LOG_" | |||
* device_id | |||
* date | |||
* time | |||
* ".XML" | |||
=== Request Device Audit Log === | |||
The EPOD_DEVICE table will be modified to add the following fields: | |||
* EPD_AUDIT_LOG_REQUESTED_IND - int default 0 | |||
* EPD_LAST_AUDIT_LOG_REQUESTED_DATE - int default 0 | |||
* EPD_LAST_AUDIT_LOG_REQUESTED_TIME - int default 0 | |||
* EPD_LAST_AUDIT_LOG_RECEIVED_DATE - int default 0 | |||
* EPD_LAST_AUDIT_LOG_RECEIVED_TIME - int default 0 | |||
* EPD_LAST_AUDIT_LOG_RECEIVED - nvarchar(100) NULL | |||
The server PDA web service will be modified to recognise this flag on the following existing web service methods: | |||
* LOGON_REQUEST | |||
* AUTO_UPDATE_REQUEST | |||
The device will be extracted and, if EPD_AUDIT_LOG_REQUESTED_IND is set to 1, the following additional information will be returned on the message: | |||
* EPD_AUDIT_LOG_REQUESTED_IND - int default 0 | |||
* EPD_LAST_AUDIT_LOG_REQUESTED_DATE - int default 0 | |||
* EPD_LAST_AUDIT_LOG_REQUESTED_TIME - int default 0 | |||
Structure to be defined, but it is assumed this will follow the structure of the existing EPOD_DEVICE table. | |||
The device will be modified to check the responses to these messages (including a grace logon) and check the value of the indicator. If the flag is set to 1, the process will check the last requested date and time is different to the last request received. If so, the device will call the same code as the Audit screen i.e. generate a new AUDIT_LOG web service call. | |||
The server PDA web service AUDIT_LOG method will be modified to extract the device from the message and update the following fields: | |||
* EPD_AUDIT_LOG_REQUESTED_IND - set to 0 | |||
* EPD_LAST_AUDIT_LOG_RECEIVED_DATE - set to sysdate | |||
* EPD_LAST_AUDIT_LOG_RECEIVED_TIME - set to systime | |||
* EPD_LAST_AUDIT_LOG_RECEIVED - set to the name of the audit log file created. | |||
=== Device Audit Log Configuration === | |||
{{Note}} This supersedes the Audit Logging configuration on the device. | |||
The EPOD_DEVICE table will be modified to add the following fields: | |||
* EPD_AUDIT_LOGGING_IND - int, default 0 | |||
* EPD_AUDIT_LOG_TYPES - nvarchar(MAX) - | |||
* EPD_AUDIT_LOG_LIMIT - int, default 2000 | |||
Defaults for the system will be set to be: | |||
* EPD_AUDIT_LOGGING_IND - 0 | |||
* EPD_AUDIT_LOG_TYPES - "{}" | |||
* EPD_AUDIT_LOG_LIMIT - 2000 | |||
The | The server PDA web service will be modified for the LOGON_REQUEST method to return the content of the EPD_DEVICE table for the device. | ||
The device will be modified to check the LOGON_RESPONSE message and store the devices flags. The value of EPD_AUDIT_LOG_TYPES will be stored as a JSON object or as a delimited list of areas. | |||
{{Note}} | {{Note}} This list of all areas is defined as a list of all calls to logAudit or funLogMessage in the mobile device application. | ||
The device will store the log indicator and limit (EPD_AUDIT_LOGGING_IND and EPD_AUDIT_LOG_LIMIT) as new global variables or system properties. | |||
The device audit logging process (XF_AUDIT) will be modified to use the limit (EPD_AUDIT_LOG_LIMIT) instead of the fixed limit (2000). If the limit has changed, all messages will be removed from the table. | |||
The device logging process will be modified to check whether the area exists in EPD_AUDIT_LOG_TYPES. If so, and audit logging is enabled (EPD_AUDIT_LOGGING_IND = 1), the device will write the debug message to the audit log. | |||
Device: | |||
=== Devices Maintenance Screen === | |||
The EPOD_DEVICE table will be modified to add the following fields: | |||
* EPD_NAME - nvarchar(50) | |||
EPOD_LISTS and EPOD_LIST_ITEMS records will be created with all logging areas. | |||
{{Note}} This list of all areas is defined as a list of all calls to logAudit or funLogMessage in the mobile device application. | |||
A new Devices screen will be created to maintain the device table, including the new logging functionality. | |||
This screen is available to OBSL users only, to configure audit logs and request them to be sent. This screen will not be added to any menus. | |||
This will be created as a new MVC screen. This requires the existing EPOD_DEVICE and EPOD_DEVICE_TYPE DAL classes to be converted to the new models. | |||
The screen will allow work similarly to existing screens, for finding and editing data. | |||
New devices cannot be created from this screen. | |||
The screen will allow searching for devices using the following criteria: | |||
* ''Device ID'' - text box with fuzzy match. | |||
* ''Device Name'' - text box with fuzzy match. | |||
* ''Date Type'' selector, one of: | |||
** ''Last Used''. | |||
** ''Audit Requested''. | |||
** ''Audit Received''. | |||
* ''Date Range'' - a date range from/to, defaulting to the last week. | |||
* ''User'' - textbox. | |||
* ''Site'' - textbox, defaulting to the logged-on site. | |||
* ''Audit Logging'' - a checkbox, defaulting to unchecked. | |||
The results will be displayed in a jQuery datatable-enabled gridview. | |||
The columns will be: | |||
* ''Device ID''. | |||
* ''Device Name''. | |||
* ''Last Used'' (Date/Time). | |||
* ''User''. | |||
* ''Site''. | |||
Clicking on a row will display the actions: | |||
* '''Show Audit Logs''' - optional, allowing showing all logs associated to that device ID. This requires opening a folder on the IIS web server for browsing, like the PDAUpdates folder on the server. | |||
* '''Select'''. | |||
Pressing '''Select''' shows the details of the device: | |||
* ''Device ID'' - read only | |||
* ''Device Name'' - textbox. | |||
* ''Last Used Date/Time'' - read only | |||
* ''User'' - read only | |||
* ''Site'' - read only | |||
* ''Audit Logging'' section: | |||
** ''Last Requested Date/Time'' - read only | |||
** ''Last Received Date/Time'' - read only | |||
** ''Last Audit Log'' - read only | |||
** ''Enable Audit Logging'' - checkbox. | |||
** ''Audit Log Types'' - a multi-select list. This is disabled if audit logging is disabled. This list will be populated from EPOD_LIST_ITEMS for the requisite list. | |||
** '''Request Audit Log''' button - clicking this button enables the EPD_AUDIT_LOG_REQUESTED_IND field. This button is disabled if the indicator is already 1. This button is disabled if audit logging is disabled on the device. | |||
A '''Save''' and '''Cancel''' button will also be provided. |
Latest revision as of 17:13, 25 April 2019
325145 Device Audit Log Improvements
Requirements
- Send the device audit log through a new web service method, rather than through email.
- Request that the device send through the audit log by making a setting on the server.
- Allow configuration of the audit log:
- Per device and default for the system.
- What is to be audited (types of audit log messages).
- Number of records to store on the audit log.
- Admin screen available to OBSL users only, to configure audit logs and request them to be sent (Devices screen).
Overview of Solution
Device Audit Log Web Service Method
The PDA Audit Log screen will be modified to build a message onto the pending queue, containing all the logged data.
A new message request will be created for this (AUDIT_LOG).
Structure to be defined, but it is assumed this will follow the structure of the existing XF_AUDIT device table.
The server PDA web service will be modified to receive this message and save this to a file in a server-side folder. The folder will be defined as a system web configuration parameter. The name to be confirmed, but will likely comprise:
- "AUDIT_LOG_"
- device_id
- date
- time
- ".XML"
Request Device Audit Log
The EPOD_DEVICE table will be modified to add the following fields:
- EPD_AUDIT_LOG_REQUESTED_IND - int default 0
- EPD_LAST_AUDIT_LOG_REQUESTED_DATE - int default 0
- EPD_LAST_AUDIT_LOG_REQUESTED_TIME - int default 0
- EPD_LAST_AUDIT_LOG_RECEIVED_DATE - int default 0
- EPD_LAST_AUDIT_LOG_RECEIVED_TIME - int default 0
- EPD_LAST_AUDIT_LOG_RECEIVED - nvarchar(100) NULL
The server PDA web service will be modified to recognise this flag on the following existing web service methods:
- LOGON_REQUEST
- AUTO_UPDATE_REQUEST
The device will be extracted and, if EPD_AUDIT_LOG_REQUESTED_IND is set to 1, the following additional information will be returned on the message:
- EPD_AUDIT_LOG_REQUESTED_IND - int default 0
- EPD_LAST_AUDIT_LOG_REQUESTED_DATE - int default 0
- EPD_LAST_AUDIT_LOG_REQUESTED_TIME - int default 0
Structure to be defined, but it is assumed this will follow the structure of the existing EPOD_DEVICE table.
The device will be modified to check the responses to these messages (including a grace logon) and check the value of the indicator. If the flag is set to 1, the process will check the last requested date and time is different to the last request received. If so, the device will call the same code as the Audit screen i.e. generate a new AUDIT_LOG web service call.
The server PDA web service AUDIT_LOG method will be modified to extract the device from the message and update the following fields:
- EPD_AUDIT_LOG_REQUESTED_IND - set to 0
- EPD_LAST_AUDIT_LOG_RECEIVED_DATE - set to sysdate
- EPD_LAST_AUDIT_LOG_RECEIVED_TIME - set to systime
- EPD_LAST_AUDIT_LOG_RECEIVED - set to the name of the audit log file created.
Device Audit Log Configuration
Note: This supersedes the Audit Logging configuration on the device.
The EPOD_DEVICE table will be modified to add the following fields:
- EPD_AUDIT_LOGGING_IND - int, default 0
- EPD_AUDIT_LOG_TYPES - nvarchar(MAX) -
- EPD_AUDIT_LOG_LIMIT - int, default 2000
Defaults for the system will be set to be:
- EPD_AUDIT_LOGGING_IND - 0
- EPD_AUDIT_LOG_TYPES - "{}"
- EPD_AUDIT_LOG_LIMIT - 2000
The server PDA web service will be modified for the LOGON_REQUEST method to return the content of the EPD_DEVICE table for the device.
The device will be modified to check the LOGON_RESPONSE message and store the devices flags. The value of EPD_AUDIT_LOG_TYPES will be stored as a JSON object or as a delimited list of areas.
Note: This list of all areas is defined as a list of all calls to logAudit or funLogMessage in the mobile device application.
The device will store the log indicator and limit (EPD_AUDIT_LOGGING_IND and EPD_AUDIT_LOG_LIMIT) as new global variables or system properties.
The device audit logging process (XF_AUDIT) will be modified to use the limit (EPD_AUDIT_LOG_LIMIT) instead of the fixed limit (2000). If the limit has changed, all messages will be removed from the table.
The device logging process will be modified to check whether the area exists in EPD_AUDIT_LOG_TYPES. If so, and audit logging is enabled (EPD_AUDIT_LOGGING_IND = 1), the device will write the debug message to the audit log.
Devices Maintenance Screen
The EPOD_DEVICE table will be modified to add the following fields:
- EPD_NAME - nvarchar(50)
EPOD_LISTS and EPOD_LIST_ITEMS records will be created with all logging areas.
Note: This list of all areas is defined as a list of all calls to logAudit or funLogMessage in the mobile device application.
A new Devices screen will be created to maintain the device table, including the new logging functionality.
This screen is available to OBSL users only, to configure audit logs and request them to be sent. This screen will not be added to any menus.
This will be created as a new MVC screen. This requires the existing EPOD_DEVICE and EPOD_DEVICE_TYPE DAL classes to be converted to the new models.
The screen will allow work similarly to existing screens, for finding and editing data.
New devices cannot be created from this screen.
The screen will allow searching for devices using the following criteria:
- Device ID - text box with fuzzy match.
- Device Name - text box with fuzzy match.
- Date Type selector, one of:
- Last Used.
- Audit Requested.
- Audit Received.
- Date Range - a date range from/to, defaulting to the last week.
- User - textbox.
- Site - textbox, defaulting to the logged-on site.
- Audit Logging - a checkbox, defaulting to unchecked.
The results will be displayed in a jQuery datatable-enabled gridview.
The columns will be:
- Device ID.
- Device Name.
- Last Used (Date/Time).
- User.
- Site.
Clicking on a row will display the actions:
- Show Audit Logs - optional, allowing showing all logs associated to that device ID. This requires opening a folder on the IIS web server for browsing, like the PDAUpdates folder on the server.
- Select.
Pressing Select shows the details of the device:
- Device ID - read only
- Device Name - textbox.
- Last Used Date/Time - read only
- User - read only
- Site - read only
- Audit Logging section:
- Last Requested Date/Time - read only
- Last Received Date/Time - read only
- Last Audit Log - read only
- Enable Audit Logging - checkbox.
- Audit Log Types - a multi-select list. This is disabled if audit logging is disabled. This list will be populated from EPOD_LIST_ITEMS for the requisite list.
- Request Audit Log button - clicking this button enables the EPD_AUDIT_LOG_REQUESTED_IND field. This button is disabled if the indicator is already 1. This button is disabled if audit logging is disabled on the device.
A Save and Cancel button will also be provided.